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


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

Message: 1
Date: Sat,  7 Jan 2006 14:22:20 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cts by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/cts


Modified Files:
        CTStests.py.in 


Log Message:
Stop python from doing its 1 letter per line trick

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CTStests.py.in,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -3 -r1.134 -r1.135
--- CTStests.py.in      17 Nov 2005 03:26:07 -0000      1.134
+++ CTStests.py.in      7 Jan 2006 21:22:20 -0000       1.135
@@ -1609,7 +1609,7 @@
 
         # wait for the resource to be started
         if not watch.look():
-            self.CM.log("WARN: No match for pattern: %s" %pat)
+            self.CM.log("WARN: No match for pattern: %s" %repr(pat))
 
         # should be ample time for the LRM + RA to complete
         time.sleep(10)




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

Message: 2
Date: Sat,  7 Jan 2006 14:23:11 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: include by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/include/crm/common


Modified Files:
        xml.h 


Log Message:
Utility function for debugging stuff that shouldnt happen.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/crm/common/xml.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- xml.h       19 Dec 2005 16:54:43 -0000      1.37
+++ xml.h       7 Jan 2006 21:23:11 -0000       1.38
@@ -1,4 +1,4 @@
-/* $Id: xml.h,v 1.37 2005/12/19 16:54:43 andrew Exp $ */
+/* $Id: xml.h,v 1.38 2006/01/07 21:23:11 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -223,6 +223,8 @@
 
 extern gboolean update_xml_child(crm_data_t *child, crm_data_t *to_update);
 
+extern gboolean find_xml_child(crm_data_t *child, const char *tag, const char 
*id);
+
 /*
  *
  */




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

Message: 3
Date: Sat,  7 Jan 2006 14:23:12 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/lib/crm/common


Modified Files:
        xml.c 


Log Message:
Utility function for debugging stuff that shouldnt happen.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/common/xml.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- xml.c       19 Dec 2005 16:54:44 -0000      1.48
+++ xml.c       7 Jan 2006 21:23:11 -0000       1.49
@@ -1,4 +1,4 @@
-/* $Id: xml.c,v 1.48 2005/12/19 16:54:44 andrew Exp $ */
+/* $Id: xml.c,v 1.49 2006/01/07 21:23:11 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -1967,6 +1967,38 @@
        return can_update;
 }
 
+
+gboolean
+find_xml_child(crm_data_t *child, const char *tag, const char *id)
+{
+       gboolean match_found = TRUE;
+       
+       CRM_DEV_ASSERT(child != NULL);
+       if(crm_assert_failed) { return FALSE; }
+       
+       if(safe_str_neq(tag, crm_element_name(child))) {
+               match_found = FALSE;
+
+       } else if(safe_str_neq(id, ID(child))) {
+               match_found = FALSE;
+
+       } else if(match_found) {
+               crm_err("Update match found for <%s id=%s.../>", tag, id);
+               crm_log_xml_debug(child, __FUNCTION__);
+       }
+       
+       xml_child_iter(
+               child, child_of_child, 
+               /* only find the first one */
+               if(match_found) {
+                       break;
+               }
+               match_found = find_xml_child(child_of_child, tag, id);
+               );
+       
+       return match_found;
+}
+
 gboolean
 delete_xml_child(crm_data_t *parent, crm_data_t *child, crm_data_t *to_delete)
 {
@@ -2062,7 +2094,8 @@
                if(nvpair_list == NULL) {
                        crm_debug("No attributes in %s",
                                  crm_element_name(parent));
-                       crm_log_xml_debug_2(parent,"No attributes for resource 
op");
+                       crm_log_xml_debug_2(
+                               parent,"No attributes for resource op");
                }
        }
        
@@ -2098,7 +2131,8 @@
                if(nvpair_list == NULL) {
                        crm_debug("No attributes in %s",
                                  crm_element_name(parent));
-                       crm_log_xml_debug_2(parent,"No attributes for resource 
op");
+                       crm_log_xml_debug_2(
+                               parent,"No attributes for resource op");
                }
        }
        




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

Message: 4
Date: Sat,  7 Jan 2006 14:29:51 -0700 (MST)
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/cib


Modified Files:
        callbacks.c 


Log Message:
Always calculate the diff

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/callbacks.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -3 -r1.85 -r1.86
--- callbacks.c 25 Oct 2005 14:02:14 -0000      1.85
+++ callbacks.c 7 Jan 2006 21:29:51 -0000       1.86
@@ -1,4 +1,4 @@
-/* $Id: callbacks.c,v 1.85 2005/10/25 14:02:14 andrew Exp $ */
+/* $Id: callbacks.c,v 1.86 2006/01/07 21:29:51 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -862,28 +862,35 @@
        }
        
        if(cib_server_ops[call_type].modifies_cib) {
-               if(safe_str_eq(op, CIB_OP_APPLY_DIFF)) {
-                       local_diff = copy_xml(input);
-
-               } else if(result_cib != NULL && current_cib != result_cib) {
+               if(result_cib != NULL && current_cib != result_cib) {
                        local_diff = diff_cib_object(
                                current_cib, result_cib, FALSE);
                }
                if(rc != cib_ok) {
                        free_xml(result_cib);
 
-               } else if(activateCibXml(result_cib,CIB_FILENAME) < 0){
-                       crm_warn("Activation failed");
-                       rc = cib_ACTIVATION;
+               } else {
+#if 0
+                       crm_debug("Activating changes for: %s from %s on %s 
(id=%s)",
+                                 op, cl_get_string(request, F_ORIG),
+                                 cl_get_string(request, F_CIB_CLIENTID), 
call_id);
+
+                       crm_log_message_adv(LOG_DEBUG, __FUNCTION__, 
local_diff);
+#endif
+                       if(activateCibXml(result_cib, CIB_FILENAME) < 0){
+                               crm_warn("Activation failed");
+                               rc = cib_ACTIVATION;
+                               
+                       }
                }
+               
                cib_post_notify(call_options, op, input, rc, the_cib);
                cib_diff_notify(call_options, op, input, rc, local_diff);
 
        } else if(result_cib != NULL) {
                crm_err("%s call modified the CIB", op);
                free_xml(result_cib);
-       }
-       
+       }       
        
        crm_debug_4("Processing reply cases");
        if((call_options & cib_discard_reply)




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

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


End of Linux-ha-cvs Digest, Vol 26, Issue 5
*******************************************

Reply via email to