Send Linux-ha-cvs mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."


Today's Topics:

   1. Linux-HA CVS: tools by andrew from 
      ([email protected])
   2. Linux-HA CVS: tools by andrew from 
      ([email protected])
   3. Linux-HA CVS: crm by andrew from 
      ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Tue,  9 May 2006 03:17:36 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: tools by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Project : linux-ha
Module  : tools

Dir     : linux-ha/tools


Modified Files:
        pingd.c 


Log Message:
Update the pingd usage information

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/tools/pingd.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- pingd.c     11 Apr 2006 07:37:07 -0000      1.2
+++ pingd.c     9 May 2006 09:17:35 -0000       1.3
@@ -1,4 +1,4 @@
-/* $Id: pingd.c,v 1.2 2006/04/11 07:37:07 andrew Exp $ */
+/* $Id: pingd.c,v 1.3 2006/05/09 09:17:35 andrew Exp $ */
 
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -95,8 +95,20 @@
        stream = exit_status ? stderr : stdout;
 
        fprintf(stream, "usage: %s [-%s]\n", cmd, OPTARGS);
-       fprintf(stream, "\t--%s (-%c) \t: This text\n", "help", '?');
-       fprintf(stream, "\t--%s (-%c) <filename>\t: Daemon pid file 
location\n", "pid-file", 'p');
+       fprintf(stream, "\t--%s (-%c) \t\t\tThis text\n", "help", '?');
+       fprintf(stream, "\t--%s (-%c) \t\tRun in daemon mode\n", "daemonize", 
'D');
+       fprintf(stream, "\t--%s (-%c) <filename>\tFile in which to store the 
process' PID\n"
+               "\t\t\t\t\t* Default=/tmp/pingd.pid\n", "pid-file", 'p');
+       fprintf(stream, "\t--%s (-%c) <string>\tName of the node attribute to 
set\n"
+               "\t\t\t\t\t* Default=pingd\n", "attr-name", 'a');
+       fprintf(stream, "\t--%s (-%c) <string>\tName of the set in which to set 
the attribute\n"
+               "\t\t\t\t\t* Default=cib-bootstrap-options\n", "attr-set", 's');
+       fprintf(stream, "\t--%s (-%c) <string>\tWhich part of the CIB to put 
the attribute in\n"
+               "\t\t\t\t\t* Default=status\n", "attr-section", 'S');
+       fprintf(stream, "\t--%s (-%c) <single_host_name>\tMonitor a subset of 
the ping nodes listed in ha.cf (can be specified multiple times)\n", 
"ping-host", 'h');
+       fprintf(stream, "\t--%s (-%c) <integer>\t\tHow long to wait for no 
further changes to occur before updating the CIB with a changed attribute\n", 
"attr-dampen", 'd');
+       fprintf(stream, "\t--%s (-%c) <integer>\tFor every connected node, add 
<integer> to the value set in the CIB\n"
+               "\t\t\t\t\t\t* Default=1\n", "value-multiplier", 'm');
 
        fflush(stream);
 
@@ -278,6 +290,9 @@
                        case 'D':
                                daemonize = TRUE;
                                break;
+                       case '?':
+                               usage(crm_system_name, LSB_EXIT_GENERIC);
+                               break;
                        default:
                                printf("Argument code 0%o (%c) is not (?yet?) 
supported\n", flag, flag);
                                crm_err("Argument code 0%o (%c) is not (?yet?) 
supported\n", flag, flag);




------------------------------

Message: 2
Date: Tue,  9 May 2006 03:18:18 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: tools by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Project : linux-ha
Module  : tools

Dir     : linux-ha/tools


Modified Files:
        attrd.c 


Log Message:
Support changes to the attr being updated
 - always use the new values

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/tools/attrd.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- attrd.c     10 Apr 2006 14:45:45 -0000      1.5
+++ attrd.c     9 May 2006 09:18:17 -0000       1.6
@@ -1,4 +1,4 @@
-/* $Id: attrd.c,v 1.5 2006/04/10 14:45:45 andrew Exp $ */
+/* $Id: attrd.c,v 1.6 2006/05/09 09:18:17 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -460,39 +460,40 @@
 static attr_hash_entry_t *
 find_hash_entry(HA_Message * msg) 
 {
+       const char *value = NULL;
        const char *attr  = ha_msg_value(msg, F_ATTRD_ATTRIBUTE);
        attr_hash_entry_t *hash_entry = g_hash_table_lookup(attr_hash, attr);
-       if(hash_entry == NULL) {
-               const char *value = NULL;
-               
+
+       if(hash_entry == NULL) {        
                /* create one and add it */
                crm_info("Creating hash entry for %s", attr);
                crm_malloc0(hash_entry, sizeof(attr_hash_entry_t));
                hash_entry->id = crm_strdup(attr);
 
-               value = ha_msg_value(msg, F_ATTRD_SET);
-               if(value != NULL) {
-                       hash_entry->set = crm_strdup(value);
-                       crm_debug("\t%s->set: %s", attr, value);
-               }
-
-               value = ha_msg_value(msg, F_ATTRD_SECTION);
-               if(value != NULL) {
-                       hash_entry->section = crm_strdup(value);
-                       crm_debug("\t%s->section: %s", attr, value);
-               }
-
-               value = ha_msg_value(msg, F_ATTRD_DAMPEN);
-               if(value != NULL) {
-                       hash_entry->dampen = crm_strdup(value);
-                       hash_entry->timeout = crm_get_msec(value);
-                       crm_debug("\t%s->timeout: %s", attr, value);
-               }
-
                g_hash_table_insert(attr_hash, hash_entry->id, hash_entry);
                hash_entry = g_hash_table_lookup(attr_hash, attr);
-               CRM_CHECK(hash_entry != NULL, ;);
+               CRM_CHECK(hash_entry != NULL, return NULL);
+       }
+
+       value = ha_msg_value(msg, F_ATTRD_SET);
+       if(value != NULL) {
+               hash_entry->set = crm_strdup(value);
+               crm_debug("\t%s->set: %s", attr, value);
+       }
+       
+       value = ha_msg_value(msg, F_ATTRD_SECTION);
+       if(value != NULL) {
+               hash_entry->section = crm_strdup(value);
+               crm_debug("\t%s->section: %s", attr, value);
        }
+       
+       value = ha_msg_value(msg, F_ATTRD_DAMPEN);
+       if(value != NULL) {
+               hash_entry->dampen = crm_strdup(value);
+               hash_entry->timeout = crm_get_msec(value);
+               crm_debug("\t%s->timeout: %s", attr, value);
+       }
+
        return hash_entry;
 }
 




------------------------------

Message: 3
Date: Tue,  9 May 2006 03:27:29 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Project : linux-ha
Module  : crm

Dir     : linux-ha/crm/pengine


Modified Files:
        unpack.c 


Log Message:


Logging

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/unpack.c,v
retrieving revision 1.192
retrieving revision 1.193
diff -u -3 -r1.192 -r1.193
--- unpack.c    5 May 2006 13:08:49 -0000       1.192
+++ unpack.c    9 May 2006 09:27:29 -0000       1.193
@@ -1,4 +1,4 @@
-/* $Id: unpack.c,v 1.192 2006/05/05 13:08:49 andrew Exp $ */
+/* $Id: unpack.c,v 1.193 2006/05/09 09:27:29 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -1279,7 +1279,7 @@
                crm_data_t *local_params = copy_xml(params);
 
                crm_info("Faking parameter digest creation for %s", ID(xml_op));
-
+               
                filter_action_parameters(local_params, NULL);
                local_param_digest = calculate_xml_digest(local_params, TRUE);
                param_digest = local_param_digest;
@@ -1303,21 +1303,21 @@
 #endif
 */
        if(safe_str_neq(pnow_digest, param_digest)) {
-               crm_data_t *params = find_xml_node(xml_op,XML_TAG_PARAMS,FALSE);
+#if CRM_DEPRECATED_SINCE_2_0_4
                if(params) {
                        crm_data_t *local_params = copy_xml(params);
-                       filter_action_parameters(local_params, "1.0.5");
+                       filter_action_parameters(local_params, NULL);
                        
-                       crm_log_xml_err(pnow, "params:calc");
                        crm_log_xml_err(local_params, "params:used");
                        free_xml(local_params);
                }
-
+#endif
                did_change = TRUE;
                crm_info("Parameters to %s on %s changed: calculated %s vs. 
actual %s",
                         ID(xml_op), active_node->details->uname,
                         pnow_digest, crm_str(param_digest));
-               
+
+               crm_log_xml_debug(pnow, "params:calc");
                
                key = generate_op_key(rsc->id, task, interval);
                custom_action(rsc, key, task, NULL, FALSE, TRUE, data_set);




------------------------------

_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 30, Issue 23
********************************************

Reply via email to