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


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

Message: 1
Date: Sun, 19 Feb 2006 13:02:20 -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/crmd


Modified Files:
        callbacks.c 


Log Message:


Logging for IPC_Channel->recv() failures





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

Message: 2
Date: Sun, 19 Feb 2006 13:04: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/crmd


Modified Files:
        messages.c 


Log Message:
Dont wrap up the CIB update

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/messages.c,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -3 -r1.145 -r1.146
--- messages.c  17 Feb 2006 13:21:10 -0000      1.145
+++ messages.c  19 Feb 2006 20:04:05 -0000      1.146
@@ -930,7 +930,7 @@
                                crm_debug("Filtering %s op in state %s",
                                         op, fsa_state2string(fsa_state));
                        }
-                               
+                       
                } else if(strcmp(op, CRM_OP_TECOMPLETE) == 0) {
                        crm_debug("Transition complete: %s/%s", op, message);
                        clear_bit_inplace(fsa_input_register, R_IN_TRANSITION);
@@ -1042,11 +1042,9 @@
         * This way the DC is always in control of the shutdown
         */
        
-       crm_data_t *frag = NULL;
        time_t now = time(NULL);
-       char *now_s = crm_itoa((int)now);
-       crm_data_t *node_state = create_xml_node(NULL, XML_CIB_TAG_STATE);
-       const char *host_from= cl_get_string(stored_msg, F_CRM_HOST_FROM);
+       crm_data_t *node_state = NULL;
+       const char *host_from = cl_get_string(stored_msg, F_CRM_HOST_FROM);
 
        if(host_from == NULL) {
                /* we're shutting down and the DC */
@@ -1056,23 +1054,18 @@
        crm_info("Creating shutdown request for %s",host_from);
 
        crm_log_message(LOG_MSG, stored_msg);
-       
-       set_uuid(fsa_cluster_conn, node_state, XML_ATTR_UUID, host_from);
-       crm_xml_add(node_state, XML_ATTR_UNAME, host_from);
-       crm_xml_add(node_state, XML_CIB_ATTR_SHUTDOWN,  now_s);
-       crm_xml_add(node_state, XML_CIB_ATTR_EXPSTATE, CRMD_STATE_INACTIVE);
-       
-       frag = create_cib_fragment(node_state, XML_CIB_TAG_STATUS);
-       
-       /* cleanup intermediate steps */
-       free_xml(node_state);
-       crm_free(now_s);
 
+       node_state = create_node_state(
+               host_from, NULL, NULL, NULL, NULL,
+               CRMD_STATE_INACTIVE, FALSE, __FUNCTION__);
+       crm_xml_add_int(node_state, XML_CIB_ATTR_SHUTDOWN,  (int)now);
+       
        fsa_cib_conn->cmds->update(
-               fsa_cib_conn, XML_CIB_TAG_STATUS, frag, NULL,
+               fsa_cib_conn, XML_CIB_TAG_STATUS, node_state, NULL,
                cib_quorum_override);
 
-       free_xml(frag);
+       crm_log_xml_debug(node_state, "Shutdown update");
+       free_xml(node_state);
 
        /* will be picked up by the TE as long as its running */
        if(need_transition(fsa_state)




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

Message: 3
Date: Sun, 19 Feb 2006 13:05:09 -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 


Log Message:
Dont wrap the CIB update
Identify the source of the update

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/actions.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- actions.c   19 Feb 2006 09:08:32 -0000      1.12
+++ actions.c   19 Feb 2006 20:05:09 -0000      1.13
@@ -1,4 +1,4 @@
-/* $Id: actions.c,v 1.12 2006/02/19 09:08:32 andrew Exp $ */
+/* $Id: actions.c,v 1.13 2006/02/19 20:05:09 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -53,7 +53,6 @@
        const char *uuid   = op->node_uuid;
        
        /* zero out the node-status & remove all LRM status info */
-       crm_data_t *update = NULL;
        crm_data_t *node_state = create_xml_node(NULL, XML_CIB_TAG_STATE);
        
        CRM_DEV_ASSERT(op->node_name != NULL);
@@ -67,18 +66,16 @@
        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);
-       create_xml_node(node_state, XML_CIB_TAG_LRM);
-       
-       update = create_cib_fragment(node_state, XML_CIB_TAG_STATUS);
+       crm_xml_add(node_state, "origin",   __FUNCTION__);
        
        rc = te_cib_conn->cmds->update(
-               te_cib_conn, XML_CIB_TAG_STATUS, update, NULL,
+               te_cib_conn, XML_CIB_TAG_STATUS, node_state, NULL,
                cib_quorum_override|cib_scope_local);   
        
        if(rc < cib_ok) {
                crm_err("CIB update failed: %s", cib_error2string(rc));
                abort_transition(
-                       INFINITY, tg_shutdown, "CIB update failed", update);
+                       INFINITY, tg_shutdown, "CIB update failed", node_state);
                
        } else {
                /* delay processing the trigger until the update completes */
@@ -86,7 +83,6 @@
        }
        
        free_xml(node_state);
-       free_xml(update);
        return;
 }
 




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

Message: 4
Date: Sun, 19 Feb 2006 13:05:49 -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:
        unpack.c 


Log Message:
Distinguish failed nodes from nodes on their way "up"





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

Message: 5
Date: Sun, 19 Feb 2006 22:38:04 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cts by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/cts


Modified Files:
        CM_fs.py.in CM_LinuxHAv2.py.in CTSlab.py.in OCFIPraTest.py.in 


Log Message:
replace the deprecated whrandom with random; disable the warnings of os.tmpnam()
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CM_fs.py.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- CM_fs.py.in 13 May 2002 22:11:54 -0000      1.2
+++ CM_fs.py.in 20 Feb 2006 05:38:03 -0000      1.3
@@ -31,7 +31,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-#import types, string, select, sys, time, re, os, whrandom, struct
+#import types, string, select, sys, time, re, os, random, struct
 #from os import system
 #from UserDict import UserDict
 #from syslog import *
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CM_LinuxHAv2.py.in,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -3 -r1.133 -r1.134
--- CM_LinuxHAv2.py.in  15 Feb 2006 13:12:57 -0000      1.133
+++ CM_LinuxHAv2.py.in  20 Feb 2006 05:38:03 -0000      1.134
@@ -27,7 +27,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-import os,sys,CTS,CTSaudits,CTStests
+import os,sys,CTS,CTSaudits,CTStests, warnings
 from CTS import *
 from CM_hb import HeartbeatCM
 from xml.dom.minidom import *
@@ -314,7 +314,9 @@
             if self.Env["CIBfilename"] == None:
                 self.debug("Installing Generated CIB on node %s" %(node))
                 os.system("rm -f /tmp/cts.default.cib")
+               warnings.filterwarnings("ignore")
                cib_file=os.tmpnam()
+               warnings.resetwarnings()
                 os.system("rm -f "+cib_file)
                self.debug("Creating new CIB for " + node + " in: " + cib_file)
                 os.system("echo \'" + self.default_cts_cib + "\' > " + 
cib_file)
@@ -459,7 +461,10 @@
        if self.config:
            return self.config.getElementsByTagName('configuration')[0]
 
+       warnings.filterwarnings("ignore")
        cib_file=os.tmpnam()
+       warnings.resetwarnings()
+       
        os.system("rm -f "+cib_file)
 
         if self.Env["ClobberCIB"] == 1:
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CTSlab.py.in,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- CTSlab.py.in        7 Nov 2005 20:48:22 -0000       1.47
+++ CTSlab.py.in        20 Feb 2006 05:38:03 -0000      1.48
@@ -26,7 +26,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 from UserDict import UserDict
-import sys, time, types, syslog, whrandom, os, struct, string, signal, 
traceback
+import sys, time, types, syslog, random, os, struct, string, signal, traceback
 from CTS  import ClusterManager
 from CM_hb import HeartbeatCM
 from CTStests import BSC_AddResource
@@ -354,7 +354,7 @@
         #
         #  Now set up our random number generator...
         #
-        self.RandomGen = whrandom.whrandom()
+        self.RandomGen = random.Random()
 
         #  Get a random seed for the random number generator.
 
@@ -369,7 +369,7 @@
         self.log("Random seed is: " + str(randseed))
         self.randseed=randseed
 
-        self.RandomGen.seed(randseed[0], randseed[1], randseed[2]) 
+        self.RandomGen.seed(randseed[0]) 
 
     def log(self, args):
         "Log using each of the supplied logging methods"
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/OCFIPraTest.py.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- OCFIPraTest.py.in   22 Apr 2005 02:53:46 -0000      1.1
+++ OCFIPraTest.py.in   20 Feb 2006 05:38:03 -0000      1.2
@@ -23,7 +23,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-import string,sys,struct,os,whrandom,time,syslog
+import string,sys,struct,os,random,time,syslog
 
 def usage():
     print "usage: " + sys.argv[0]  \
@@ -133,8 +133,8 @@
     seed=struct.unpack("BBB", f.read(3))
     f.close()
     #seed=(123,321,231)
-    rand = whrandom.whrandom()
-    rand.seed(seed[0], seed[1], seed[2]) 
+    rand = random.Random()
+    rand.seed(seed[0]) 
     log("Test Random Seed:" + str(seed))
     
     #




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

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


End of Linux-ha-cvs Digest, Vol 27, Issue 82
********************************************

Reply via email to