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 davidlee from 
      ([email protected])
   2. Linux-HA CVS: crm by andrew from 
      ([email protected])
   3. Linux-HA CVS: crm by andrew from 
      ([email protected])


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

Message: 1
Date: Tue, 18 Apr 2006 04:51:08 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: tools by davidlee from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/tools


Modified Files:
        Makefile.am 


Log Message:
The recent change to 'include/stonith/stonith.h' (its rev. 1.17) requires extra 
'-I...' here for some environments.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/tools/Makefile.am,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- Makefile.am 10 Apr 2006 12:50:08 -0000      1.17
+++ Makefile.am 18 Apr 2006 10:51:07 -0000      1.18
@@ -20,7 +20,8 @@
 MAINTAINERCLEANFILES    = Makefile.in ccdv
 
 INCLUDES                = -I$(top_builddir)/include -I$(top_srcdir)/include \
-                         -I$(top_builddir)/linux-ha -I$(top_srcdir)/linux-ha
+                         -I$(top_builddir)/linux-ha -I$(top_srcdir)/linux-ha \
+                         -I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl
 
 EXTRA_DIST             = ccdv.c attrd.h
 




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

Message: 2
Date: Tue, 18 Apr 2006 04:59:46 -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/crmd


Modified Files:
        crmd_utils.h election.c join_dc.c ccm.c callbacks.c 


Log Message:
Only update the CIB if we're connected

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/crmd_utils.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- crmd_utils.h        9 Apr 2006 14:38:04 -0000       1.23
+++ crmd_utils.h        18 Apr 2006 10:59:46 -0000      1.24
@@ -1,4 +1,4 @@
-/* $Id: crmd_utils.h,v 1.23 2006/04/09 14:38:04 andrew Exp $ */
+/* $Id: crmd_utils.h,v 1.24 2006/04/18 10:59:46 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -31,6 +31,25 @@
 
 #define update_local_cib(data) update_local_cib_adv(data, TRUE, __FUNCTION__)
 
+#define fsa_cib_update(section, data, options, call_id)                        
\
+       if(fsa_cib_conn != NULL) {                                      \
+               call_id = fsa_cib_conn->cmds->update(                   \
+                       fsa_cib_conn, section, data, NULL, options);    \
+                                                                       \
+       } else {                                                        \
+               crm_err("No CIB connection available");                 \
+       }
+
+#define fsa_cib_anon_update(section, data, options)                    \
+       if(fsa_cib_conn != NULL) {                                      \
+               fsa_cib_conn->cmds->update(                             \
+                       fsa_cib_conn, section, data, NULL, options);    \
+                                                                       \
+       } else {                                                        \
+               crm_err("No CIB connection available");                 \
+       }
+
+
 extern long long toggle_bit   (long long  action_list, long long action);
 extern long long clear_bit    (long long  action_list, long long action);
 extern long long set_bit      (long long  action_list, long long action);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/election.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -3 -r1.110 -r1.111
--- election.c  10 Apr 2006 13:01:21 -0000      1.110
+++ election.c  18 Apr 2006 10:59:46 -0000      1.111
@@ -390,8 +390,7 @@
        cib = createEmptyCib();
        crm_xml_add(cib, XML_ATTR_CRM_VERSION, CRM_FEATURE_SET);
        crm_xml_add(cib, XML_ATTR_CIB_REVISION, CIB_FEATURE_SET);
-       fsa_cib_conn->cmds->update(
-               fsa_cib_conn, XML_TAG_CIB, cib, NULL, cib_quorum_override);
+       fsa_cib_update(XML_TAG_CIB, cib, cib_quorum_override, rc);
        add_cib_op_callback(rc, FALSE, NULL, feature_update_callback);
 
        free_xml(cib);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/join_dc.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -3 -r1.88 -r1.89
--- join_dc.c   10 Apr 2006 16:19:53 -0000      1.88
+++ join_dc.c   18 Apr 2006 10:59:46 -0000      1.89
@@ -422,9 +422,7 @@
        crm_debug_3("Update %s in the CIB to our uuid: %s",
                    XML_ATTR_DC_UUID, crm_element_value(cib, XML_ATTR_DC_UUID));
        
-       fsa_cib_conn->cmds->update(
-               fsa_cib_conn, NULL, cib, NULL, cib_quorum_override);
-
+       fsa_cib_anon_update(NULL, cib, cib_quorum_override);
        free_xml(cib);
        
        crm_debug_3("Bumping the epoch and syncing to %d clients",
@@ -524,10 +522,8 @@
         * We dont need to notify the TE of these updates, a transition will
         *   be started in due time
         */
-       call_id = fsa_cib_conn->cmds->update(
-               fsa_cib_conn, XML_CIB_TAG_STATUS, join_ack->xml, NULL,
-               cib_scope_local|cib_quorum_override);
-
+       fsa_cib_update(XML_CIB_TAG_STATUS, join_ack->xml,
+                      cib_scope_local|cib_quorum_override, call_id);
        add_cib_op_callback(
                call_id, FALSE, NULL, join_update_complete_callback);
        crm_debug("join-%d: Registered callback for LRM update %d",
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/ccm.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -3 -r1.102 -r1.103
--- ccm.c       6 Apr 2006 11:05:53 -0000       1.102
+++ ccm.c       18 Apr 2006 10:59:46 -0000      1.103
@@ -1,4 +1,4 @@
-/* $Id: ccm.c,v 1.102 2006/04/06 11:05:53 andrew Exp $ */
+/* $Id: ccm.c,v 1.103 2006/04/18 10:59:46 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -648,8 +648,7 @@
                                     ghash_update_cib_node, &update_data);
        }               
        
-       call_id = fsa_cib_conn->cmds->update(
-               fsa_cib_conn, XML_CIB_TAG_STATUS, fragment, NULL,call_options);
+       fsa_cib_update(XML_CIB_TAG_STATUS, fragment, call_options, call_id);
        
        add_cib_op_callback(call_id, FALSE, NULL, ccm_node_update_complete);
        free_xml(fragment);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/callbacks.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -3 -r1.115 -r1.116
--- callbacks.c 10 Apr 2006 13:01:21 -0000      1.115
+++ callbacks.c 18 Apr 2006 10:59:46 -0000      1.116
@@ -388,8 +388,8 @@
                /* it is safe to keep these updates on the local node
                 * each node updates their own CIB
                 */
-               fsa_cib_conn->cmds->update(
-                       fsa_cib_conn, XML_CIB_TAG_STATUS, update, NULL,
+               fsa_cib_anon_update(
+                       XML_CIB_TAG_STATUS, update,
                        cib_inhibit_bcast|cib_scope_local|cib_quorum_override);
 
                free_xml(update);




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

Message: 3
Date: Tue, 18 Apr 2006 05:03:41 -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/crmd


Modified Files:
        lrm.c 


Log Message:
Use crm_add_xml_int
Include the operation's interval
Only send an update if we're connected to the CIB
Look for XML_LRM_ATTR_TASK and fall back to the old "task" attribute when
  cancelling operations

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/lrm.c,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -3 -r1.185 -r1.186
--- lrm.c       11 Apr 2006 07:36:49 -0000      1.185
+++ lrm.c       18 Apr 2006 11:03:41 -0000      1.186
@@ -324,7 +324,6 @@
 build_operation_update(
        crm_data_t *xml_rsc, lrm_op_t *op, const char *src, int lpc)
 {
-       char *tmp = NULL;
        char *fail_state = NULL;
        const char *state = NULL;
        crm_data_t *xml_op = NULL;
@@ -470,18 +469,12 @@
                        break;
        }
        
-       tmp = crm_itoa(op->call_id);
-       crm_xml_add(xml_op,  XML_LRM_ATTR_CALLID, tmp);
-       crm_free(tmp);
-
-       /* set these on 'xml_rsc' too to make life easy for the TE */
-       tmp = crm_itoa(op->rc);
-       crm_xml_add(xml_op, XML_LRM_ATTR_RC, tmp);
-       crm_free(tmp);
-
-       tmp = crm_itoa(op->op_status);
-       crm_xml_add(xml_op, XML_LRM_ATTR_OPSTATUS, tmp);
-       crm_free(tmp);
+       crm_xml_add_int(xml_op,  XML_LRM_ATTR_CALLID, op->call_id);
+
+       /* set these on 'xml_rsc' too to make life easy for the PE */
+       crm_xml_add_int(xml_op, XML_LRM_ATTR_RC, op->rc);
+       crm_xml_add_int(xml_op, XML_LRM_ATTR_OPSTATUS, op->op_status);
+       crm_xml_add_int(xml_op, XML_LRM_ATTR_INTERVAL, op->interval);
 
        if(safe_str_neq(op->op_type, CRMD_ACTION_STOP)) {
                /* this will enable us to later determin that the
@@ -780,10 +773,8 @@
                crm_data_t *fragment = do_lrm_query(TRUE);
                crm_info("Forcing a local LRM refresh");
 
-               rc = fsa_cib_conn->cmds->update(
-                       fsa_cib_conn, XML_CIB_TAG_STATUS, fragment, NULL,
-                       cib_quorum_override);
-
+               fsa_cib_update(XML_CIB_TAG_STATUS, fragment,
+                              cib_quorum_override, rc);
                free_xml(fragment);
                
        } else if(crm_op != NULL && safe_str_eq(crm_op, CRM_OP_LRM_QUERY)) {
@@ -846,9 +837,21 @@
 
                        op_key  = crm_element_value(xml_rsc, "operation_key");
                        params  = find_xml_node(input->xml, XML_TAG_ATTRS,TRUE);
+                       
                        if(params != NULL) {
-                               op_task = crm_element_value(params, "task");
+                               op_task = crm_element_value(
+                                       params, XML_LRM_ATTR_TASK);
+#if CRM_DEPRECATED_SINCE_2_0_4
+                               if(op_task == NULL) {
+                                       op_task = crm_element_value(params, 
"task");
+                               }
+#endif
                        }
+                       CRM_CHECK(params != NULL
+                                 && op_task != NULL
+                                 && op_key != NULL,
+                                 return I_NULL);
+
                        op = construct_op(input->xml, id_from_cib, op_task);
                        
                        CRM_ASSERT(op != NULL);
@@ -1396,9 +1399,7 @@
         * the alternative however means blocking here for too long, which
         * isnt acceptable
         */
-       rc = fsa_cib_conn->cmds->update(
-               fsa_cib_conn, XML_CIB_TAG_STATUS, update, NULL,
-               cib_quorum_override);
+       fsa_cib_update(XML_CIB_TAG_STATUS, update, cib_quorum_override, rc);
                        
        if(rc > 0) {
                /* the return code is a call number, not an error code */




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

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


End of Linux-ha-cvs Digest, Vol 29, Issue 90
********************************************

Reply via email to