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


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

Message: 1
Date: Fri, 31 Mar 2006 05:00:59 -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/pengine


Modified Files:
        master.c regression.core.sh 


Log Message:
cleanups

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/master.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- master.c    28 Mar 2006 12:03:06 -0000      1.11
+++ master.c    31 Mar 2006 12:00:59 -0000      1.12
@@ -1,4 +1,4 @@
-/* $Id: master.c,v 1.11 2006/03/28 12:03:06 andrew Exp $ */
+/* $Id: master.c,v 1.12 2006/03/31 12:00:59 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -288,14 +288,15 @@
                                attr_value = g_hash_table_lookup(
                                        chosen->details->attrs, attr_name);
 
-                               crm_info("%s=%s for %s", attr_name,
-                                        crm_str(attr_value),
-                                        chosen->details->uname);
-                               
                                if(attr_value != NULL) {
+                                       crm_debug("%s=%s for %s", attr_name,
+                                                 crm_str(attr_value),
+                                                 chosen->details->uname);
+                               
                                        child_rsc->priority = char2score(
                                                attr_value);
                                }
+
                                crm_free(attr_name);
                                apply_master_location(child_rsc->rsc_location);
                                apply_master_location(rsc->rsc_location);
@@ -369,8 +370,8 @@
 
                        case RSC_ROLE_STOPPED:
                                if(child_rsc->priority < 0 ||master_max <= lpc){
-                                       pe_warn("Cannot promote %s (stopping)",
-                                               child_rsc->id);
+                                       crm_debug("Cannot promote %s 
(stopping)",
+                                                 child_rsc->id);
                                        lpc--;
                                }
                                break;
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/regression.core.sh,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- regression.core.sh  14 Oct 2005 06:25:36 -0000      1.16
+++ regression.core.sh  31 Mar 2006 12:00:59 -0000      1.17
@@ -20,7 +20,7 @@
 verbose=$1
 io_dir=testcases
 diff_opts="--ignore-all-space -U 1 -u"
-failed=.regression.failed
+failed=.regression.failed.diff
 # zero out the error log
 > $failed
 




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

Message: 2
Date: Fri, 31 Mar 2006 05:02:10 -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:
        CTSaudits.py.in 


Log Message:
Auditing output tweaks

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CTSaudits.py.in,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- CTSaudits.py.in     29 Mar 2006 08:02:42 -0000      1.42
+++ CTSaudits.py.in     31 Mar 2006 12:02:09 -0000      1.43
@@ -279,29 +279,42 @@
                 
                 if running:
                     NumofInc[resource.inc_name] += 1
+
         if self.CM.HasQuorum(None):
             for inc_name in NumofInc.keys():
-                if NumofInc[inc_name] != min(up_count,MaxofInc[inc_name]):
+                if NumofInc[inc_name] != min(up_count, MaxofInc[inc_name]):
                     passed = 0
-                    self.CM.log("Incarnation %s has %d instances(max %d 
instances).\
-                        Now %d nodes are 
up"%(str(inc_name),NumofInc[inc_name], \
-                        MaxofInc[inc_name],up_count))
-                        
+                    self.CM.log("Cloned resource "+ inc_name
+                               +" has "+ NumofInc[inc_name]
+                               +" active instances (max: "+ MaxofInc[inc_name]
+                               +", active nodes: "+ up_count + ")")
+                   
         Groups = self.CM.ResourceGroups()
         for group in Groups :
-            RunningNodes = NodeofRsc[group[0].rid]
+           group_printed = 0
+           first_rsc = group[0].rid
+            RunningNodes = NodeofRsc[first_rsc]
             for rsc in group :
-                if RunningNodes != NodeofRsc[rsc.rid] :
+                if RunningNodes != NodeofRsc[rsc.rid]:
                     passed = 0 
+
+                   if group_printed == 0:
+                       group_printed = 1
+                       self.CM.log("Group audit failed for: %s" % repr(group))
+                       if not NodeofRsc[first_rsc] or 
len(NodeofRsc[first_rsc]) == 0:
+                           self.CM.log("* %s not running" % first_rsc)
+                       else:
+                           self.CM.log("* %s running on %s"
+                                       %(first_rsc, 
repr(NodeofRsc[first_rsc])))
+
                    if not NodeofRsc[rsc.rid] or len(NodeofRsc[rsc.rid]) == 0:
-                       self.CM.log("Not all resources in group %s running on 
same node" % repr(group))
                        self.CM.log("* %s not running" % rsc.rid)
                    else:
-                       self.CM.log("Not all resources in group %s running on 
same node"% repr(group))
-                       self.CM.log("* %s running on %s"%(group[0].rid, 
repr(NodeofRsc[group[0].rid])))
-                       self.CM.log("* %s running on %s"%(rsc.rid, 
repr(NodeofRsc[rsc.rid])))
+                       self.CM.log("* %s running on %s"
+                                   %(rsc.rid, repr(NodeofRsc[rsc.rid])))
                                 
-        #Make sure the resouces with "must","placement" constraint are running 
on the same node
+        # Make sure the resouces with "must","placement" constraint
+        #   are running on the same node
         Dependancies = self.CM.Dependencies()
         for dependency in Dependancies:
             if dependency["type"] == "placement" and dependency["strength"] == 
"must":




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

Message: 3
Date: Fri, 31 Mar 2006 05:03:06 -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/tengine


Modified Files:
        actions.c callbacks.c 


Log Message:
Dont use the action in the callback, the call_id is enough to link us back

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/actions.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- actions.c   18 Mar 2006 17:23:48 -0000      1.18
+++ actions.c   31 Mar 2006 12:03:05 -0000      1.19
@@ -1,4 +1,4 @@
-/* $Id: actions.c,v 1.18 2006/03/18 17:23:48 andrew Exp $ */
+/* $Id: actions.c,v 1.19 2006/03/31 12:03:05 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -83,7 +83,7 @@
        crm_xml_add(node_state, XML_CIB_ATTR_JOINSTATE, CRMD_JOINSTATE_DOWN);
        crm_xml_add(node_state, XML_CIB_ATTR_EXPSTATE,  CRMD_JOINSTATE_DOWN);
        crm_xml_add(node_state, XML_CIB_ATTR_REPLACE,   XML_CIB_TAG_LRM);
-       crm_xml_add(node_state, "origin",   __FUNCTION__);
+       crm_xml_add(node_state, XML_ATTR_ORIGIN,   __FUNCTION__);
        
        rc = te_cib_conn->cmds->update(
                te_cib_conn, XML_CIB_TAG_STATUS, node_state, NULL,
@@ -306,7 +306,7 @@
        crm_xml_add(xml_op, XML_LRM_ATTR_OPSTATUS, code);
        crm_xml_add(xml_op, XML_LRM_ATTR_CALLID, "-1");
        crm_xml_add(xml_op, XML_LRM_ATTR_RC, code);
-       crm_xml_add(xml_op, "origin", __FUNCTION__);
+       crm_xml_add(xml_op, XML_ATTR_ORIGIN, __FUNCTION__);
 
        crm_free(code);
 
@@ -318,9 +318,10 @@
                crm_element_value(xml_op, XML_ATTR_TRANSITION_KEY), status, 
status);
        crm_xml_add(xml_op,  XML_ATTR_TRANSITION_MAGIC, code);
        crm_free(code);
-       
-       set_node_tstamp(xml_op);
 
+       crm_err("FIXME: Need to include op_digest for parameters in cib update 
for %s",
+               ID(xml_op));
+       
        fragment = create_cib_fragment(state, XML_CIB_TAG_STATUS);
        
        crm_debug_3("Updating CIB with \"%s\" (%s): %s %s on %s",
@@ -333,8 +334,7 @@
        crm_debug("Updating CIB with %s action %d: %s %s on %s (call_id=%d)",
                  op_status2text(status), action->id, task_uuid, rsc_id, 
target, rc);
 
-       crm_debug_2("Waiting for callback id: %d", rc);
-       add_cib_op_callback(rc, FALSE, action, cib_action_updated);
+       add_cib_op_callback(rc, FALSE, NULL, cib_action_updated);
 
        free_xml(fragment);
        free_xml(state);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/callbacks.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -3 -r1.72 -r1.73
--- callbacks.c 18 Mar 2006 17:23:48 -0000      1.72
+++ callbacks.c 31 Mar 2006 12:03:05 -0000      1.73
@@ -1,4 +1,4 @@
-/* $Id: callbacks.c,v 1.72 2006/03/18 17:23:48 andrew Exp $ */
+/* $Id: callbacks.c,v 1.73 2006/03/31 12:03:05 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -376,15 +376,10 @@
 cib_action_updated(const HA_Message *msg, int call_id, int rc,
                   crm_data_t *output, void *user_data)
 {
-       crm_action_t *action = user_data;
-       const char *task_uuid = crm_element_value(
-               action->xml, XML_LRM_ATTR_TASK_KEY);
-       
        trigger_graph();
 
        if(rc < cib_ok) {
-               crm_err("Update for action %d (%s) FAILED: %s",
-                       action->id, task_uuid, cib_error2string(rc));
+               crm_err("Update %d FAILED: %s", call_id, cib_error2string(rc));
        }
 }
 




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

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


End of Linux-ha-cvs Digest, Vol 28, Issue 89
********************************************

Reply via email to