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: mgmt by zhenh from 
      ([email protected])
   2. Linux-HA CVS: heartbeat by lars from 
      ([email protected])
   3. Linux-HA CVS: mgmt by zhenh from 
      ([email protected])


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

Message: 1
Date: Thu, 11 May 2006 01:50:30 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : zhenh
Host    : 
Project : linux-ha
Module  : mgmt

Dir     : linux-ha/mgmt/daemon


Modified Files:
        mgmt_crm.c 


Log Message:
add the id to instance_attributes
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/daemon/mgmt_crm.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -3 -r1.36 -r1.37
--- mgmt_crm.c  11 May 2006 06:44:51 -0000      1.36
+++ mgmt_crm.c  11 May 2006 07:50:29 -0000      1.37
@@ -793,22 +793,22 @@
        }
        if (clone) {
                snprintf(buf, MAX_STRLEN,
-                        "<clone id=\"%s\"><instance_attributes><attributes>" \
+                        "<clone id=\"%s\"><instance_attributes 
id=\"ias_%s\"><attributes>" \
                         "<nvpair id=\"%s_clone_max\" name=\"clone_max\" 
value=\"%s\"/>" \
                         "<nvpair id=\"%s_clone_node_max\" 
name=\"clone_node_max\" value=\"%s\"/>" \
                         "</attributes> </instance_attributes> ",
-                        argv[7], argv[7], argv[8],argv[7], argv[9]);
+                        argv[7], argv[7], argv[7], argv[8],argv[7], argv[9]);
                strncat(xml, buf, MAX_STRLEN);
        }
        if (master) {
                snprintf(buf, MAX_STRLEN,
-                        "<master_slave 
id=\"%s\"><instance_attributes><attributes>" \
+                        "<master_slave id=\"%s\"><instance_attributes 
id=\"ias_%s\"><attributes>" \
                         "<nvpair id=\"%s_clone_max\" name=\"clone_max\" 
value=\"%s\"/>" \
                         "<nvpair id=\"%s_clone_node_max\" 
name=\"clone_node_max\" value=\"%s\"/>" \
                         "<nvpair id=\"%s_master_max\" name=\"master_max\" 
value=\"%s\"/>" \
                         "<nvpair id=\"%s_master_node_max\" 
name=\"master_node_max\" value=\"%s\"/>" \
                         "</attributes> </instance_attributes>",
-                        argv[7], argv[7], argv[8], argv[7], argv[9],
+                        argv[7], argv[7], argv[7], argv[8], argv[7], argv[9],
                         argv[7], argv[10], argv[7], argv[11]);
                strncat(xml, buf, MAX_STRLEN);
        }
@@ -822,8 +822,8 @@
        else {
                snprintf(buf, MAX_STRLEN,
                         "<primitive id=\"%s\" class=\"%s\" type=\"%s\" 
provider=\"%s\">" \
-                        "<instance_attributes> <attributes>"
-                        , argv[1],argv[2], argv[3],argv[4]);
+                        "<instance_attributes id=\"ias_%s\"> <attributes>"
+                        , argv[1],argv[2], argv[3],argv[4], argv[1]);
                strncat(xml, buf, MAX_STRLEN);
        
                for (i = 12; i < argc; i += 3) {
@@ -979,8 +979,8 @@
        char xml[MAX_STRLEN];
        char buf[MAX_STRLEN];
        
-       snprintf(xml, MAX_STRLEN,"<group id=\"%s\">", argv[1]);
-       strncat(xml,"<instance_attributes> <attributes>", MAX_STRLEN);
+       snprintf(xml, MAX_STRLEN,"<group id=\"%s\"><instance_attributes 
id=\"ias_%s\">" \
+               "<attributes>", argv[1], argv[1]);
        for (i = 2; i < argc; i += 3) {
                snprintf(buf, MAX_STRLEN,
                         "<nvpair id=\"%s\" name=\"%s\" value=\"%s\"/>",
@@ -1233,7 +1233,8 @@
        }
 
        snprintf(xml, MAX_STRLEN,
-                "%s<instance_attributes><attributes>", prefix);
+                "%s<instance_attributes id=\"ias_%s\"><attributes>",
+                prefix ,argv[1]);
        for (i = 2; i < argc; i += 3) {
                snprintf(buf, MAX_STRLEN,
                        "<nvpair id=\"%s\" name=\"%s\" value=\"%s\"/>",
@@ -1291,7 +1292,8 @@
        }
 
        snprintf(xml, MAX_STRLEN,
-                "%s<instance_attributes><attributes>", prefix);
+                "%s<instance_attributes id=\"ias_%s\"><attributes>",
+                prefix,argv[1]);
        snprintf(buf, MAX_STRLEN,
                "<nvpair id=\"%s_target_role\" " \
                "name=\"target_role\" value=\"%s\"/>",
@@ -1451,11 +1453,11 @@
 
        ARGC_CHECK(4);
        snprintf(xml,MAX_STRLEN,
-                "<clone id=\"%s\"><instance_attributes><attributes>" \
+                "<clone id=\"%s\"><instance_attributes 
id=\"ias_%s\"><attributes>" \
                 "<nvpair id=\"%s_clone_max\" name=\"clone_max\" 
value=\"%s\"/>" \
                 "<nvpair id=\"%s_clone_node_max\" name=\"clone_node_max\" 
value=\"%s\"/>" \
                 "</attributes></instance_attributes></clone>",
-                argv[1],argv[1],argv[2],argv[1],argv[3]);
+                argv[1],argv[1],argv[1],argv[2],argv[1],argv[3]);
 
        cib_object = string2xml(xml);
        if(cib_object == NULL) {
@@ -1521,13 +1523,14 @@
 
        ARGC_CHECK(6);
        snprintf(xml,MAX_STRLEN,
-                "<master_slave id=\"%s\"><instance_attributes><attributes>" \
+                "<master_slave id=\"%s\"><instance_attributes 
id=\"ias_%s\"><attributes>" \
                 "<nvpair id=\"%s_clone_max\" name=\"clone_max\" 
value=\"%s\"/>" \
                 "<nvpair id=\"%s_clone_node_max\" name=\"clone_node_max\" 
value=\"%s\"/>" \
                 "<nvpair id=\"%s_master_max\" name=\"master_max\" 
value=\"%s\"/>" \
                 "<nvpair id=\"%s_master_node_max\" name=\"master_node_max\" 
value=\"%s\"/>" \
                 "</attributes></instance_attributes></master_slave>",
-                
argv[1],argv[1],argv[2],argv[1],argv[3],argv[1],argv[4],argv[1],argv[5]);
+                argv[1],argv[1],argv[1],argv[2],argv[1],
+                argv[3],argv[1],argv[4],argv[1],argv[5]);
 
        cib_object = string2xml(xml);
        if(cib_object == NULL) {




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

Message: 2
Date: Thu, 11 May 2006 01:52:41 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: heartbeat by lars from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : lars
Host    : 
Project : linux-ha
Module  : heartbeat

Dir     : linux-ha/heartbeat


Modified Files:
        heartbeat.c 


Log Message:
Reverting hunk which was NOT supposed to go into CVS.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/heartbeat.c,v
retrieving revision 1.507
retrieving revision 1.508
diff -u -3 -r1.507 -r1.508
--- heartbeat.c 11 May 2006 07:41:01 -0000      1.507
+++ heartbeat.c 11 May 2006 07:52:41 -0000      1.508
@@ -1,4 +1,4 @@
-/* $Id: heartbeat.c,v 1.507 2006/05/11 07:41:01 lars Exp $ */
+/* $Id: heartbeat.c,v 1.508 2006/05/11 07:52:41 lars Exp $ */
 /*
  * heartbeat: Linux-HA heartbeat code
  *
@@ -1486,16 +1486,12 @@
        ,       hb_send_local_status, NULL, NULL);
        G_main_setall_id(id, "send local status", 10+config->heartbeat_ms/2, 
50);
 
-       if (DoManageResources == TRUE) {
-               id=Gmain_timeout_add_full(PRI_AUDITCLIENT
-               ,       config->initial_deadtime_ms
-               ,       set_init_deadtime_passed_flag
-               ,       NULL
-               ,       NULL);
-               G_main_setall_id(id, "init deadtime passed", 
config->warntime_ms, 50);
-       } else {
-               set_init_deadtime_passed_flag(NULL);
-       }
+       id=Gmain_timeout_add_full(PRI_AUDITCLIENT
+       ,       config->initial_deadtime_ms
+       ,       set_init_deadtime_passed_flag
+       ,       NULL
+       ,       NULL);
+       G_main_setall_id(id, "init deadtime passed", config->warntime_ms, 50);
 
        /* Dump out memory stats periodically... */
        memstatsinterval = (debug_level ? 10*60*1000 : ONEDAY*1000);
@@ -6286,6 +6282,9 @@
 
 /*
  * $Log: heartbeat.c,v $
+ * Revision 1.508  2006/05/11 07:52:41  lars
+ * Reverting hunk which was NOT supposed to go into CVS.
+ *
  * Revision 1.507  2006/05/11 07:41:01  lars
  * Coverity #42: Static buffer overrun in our re-transit code!
  *




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

Message: 3
Date: Thu, 11 May 2006 02:03:33 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : zhenh
Host    : 
Project : linux-ha
Module  : mgmt

Dir     : linux-ha/mgmt/daemon


Modified Files:
        mgmt_crm.c 


Log Message:
ignore the error code cib_diff_resync, it's for cib internal use
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/daemon/mgmt_crm.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- mgmt_crm.c  11 May 2006 07:50:29 -0000      1.37
+++ mgmt_crm.c  11 May 2006 08:03:32 -0000      1.38
@@ -192,8 +192,19 @@
 {
        const char* reason = NULL;
        crm_data_t* failed_tag;
-       char* ret = cl_strdup(MSG_FAIL);
+       char* ret;
+       
+       /* beekhof:
+               you can pretend that the return code is success, 
+               its an internal CIB thing*/
+       if (rc == cib_diff_resync) {
+               if (output != NULL) {
+                       free_xml(output);
+               }
+               return cl_strdup(MSG_OK);
+       }
        
+       ret = cl_strdup(MSG_FAIL);
        ret = mgmt_msg_append(ret, cib_error2string(rc));
        
        if (output == NULL) {




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

_______________________________________________
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 31
********************************************

Reply via email to