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


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

Message: 1
Date: Wed, 15 Feb 2006 01:50:38 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: membership by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/membership/ccm


Modified Files:
        ccmllm.c 


Log Message:
fix a bug. the oldstatus should be assigned to old status
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/membership/ccm/ccmllm.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- ccmllm.c    7 Nov 2005 22:55:44 -0000       1.27
+++ ccmllm.c    15 Feb 2006 08:50:36 -0000      1.28
@@ -1,4 +1,4 @@
-/* $Id: ccmllm.c,v 1.27 2005/11/07 22:55:44 gshi Exp $ */
+/* $Id: ccmllm.c,v 1.28 2006/02/15 08:50:36 zhenh Exp $ */
 /* 
  * ccmllm.c: Low Level membership routines.
  *
@@ -191,7 +191,7 @@
        }
        
        if (oldstatus){
-               strncpy(oldstatus, status, STATUSSIZE);
+               strncpy(oldstatus, llm->nodes[i].status, STATUSSIZE);
        }
        
        strncpy(llm->nodes[i].status, status, STATUSSIZE);




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

Message: 2
Date: Wed, 15 Feb 2006 06:12:58 -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:
        CM_LinuxHAv2.py.in 


Log Message:
Use temporary filenames and remove them afterwards
Dont create and parse the config file every time Configuration is called

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CM_LinuxHAv2.py.in,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -3 -r1.132 -r1.133
--- CM_LinuxHAv2.py.in  8 Feb 2006 21:58:57 -0000       1.132
+++ CM_LinuxHAv2.py.in  15 Feb 2006 13:12:57 -0000      1.133
@@ -48,7 +48,8 @@
     '''
     def __init__(self, Environment, randseed=None):
         HeartbeatCM.__init__(self, Environment, randseed=randseed)
-        
+
+        self.config = None
         self.cluster_monitor = 0
        self.use_short_names = 1
         self.update({
@@ -313,12 +314,14 @@
             if self.Env["CIBfilename"] == None:
                 self.debug("Installing Generated CIB on node %s" %(node))
                 os.system("rm -f /tmp/cts.default.cib")
-                os.system("echo \'" + self.default_cts_cib + "\' > 
/tmp/cts.default.cib")
-                if 0!=self.rsh.cp("/tmp/cts.default.cib",
-                    "root@" + (self["CIBfile"]%node)):
+               cib_file=os.tmpnam()
+                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)
+                if 0!=self.rsh.cp(cib_file,"root@" + (self["CIBfile"]%node)):
                     raise ValueError("Can not scp file to %s "%node)
 
-                os.system("rm -f /tmp/cts.default.cib")
+                os.system("rm -f "+cib_file)
             else:
                 self.debug("Installing CIB (%s) on node %s" 
%(self.Env["CIBfilename"], node))
                 if 0!=self.rsh.cp(self.Env["CIBfilename"], 
@@ -453,22 +456,26 @@
         return None
         
     def Configuration(self):
+       if self.config:
+           return self.config.getElementsByTagName('configuration')[0]
+
+       cib_file=os.tmpnam()
+       os.system("rm -f "+cib_file)
+
         if self.Env["ClobberCIB"] == 1:
             if self.Env["CIBfilename"] == None:
-                os.system("rm -f /tmp/cts.default.cib")
-                os.system("echo \'" + self.default_cts_cib + "\' > 
/tmp/cts.default.cib")
-                cib=parse("/tmp/cts.default.cib")
-#                os.system("rm -f /tmp/cts.default.cib")
+               self.debug("Creating new CIB in: " + cib_file)
+                os.system("echo \'"+ self.default_cts_cib +"\' > "+ cib_file)
             else:
-                cib=parse(self.Env["CIBfilename"])
+                os.system("cp "+self.Env["CIBfilename"]+" "+cib_file)
         else:
-            local_cib = "%s/cts_cib_%s.xml"%(self["TmpDir"],str(os.getpid()))
-            if 
0!=self.rsh.cp("root@"+self["CIBfile"]%self.Env["nodes"][0],local_cib):
+            if 
0!=self.rsh.cp("root@"+self["CIBfile"]%self.Env["nodes"][0],cib_file):
                 raise ValueError("Can not copy file to %s, maybe permission 
denied"%self["TmpDir"])
-            cib=parse(local_cib)
-            os.remove(local_cib)
 
-        return cib.getElementsByTagName('configuration')[0]
+       self.config = parse(cib_file)
+       os.remove(cib_file)
+
+        return self.config.getElementsByTagName('configuration')[0]
     
     def Resources(self):
         ResourceList = []




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

Message: 3
Date: Wed, 15 Feb 2006 06:13:24 -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:


Logging

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/actions.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- actions.c   14 Feb 2006 11:40:25 -0000      1.7
+++ actions.c   15 Feb 2006 13:13:23 -0000      1.8
@@ -1,4 +1,4 @@
-/* $Id: actions.c,v 1.7 2006/02/14 11:40:25 andrew Exp $ */
+/* $Id: actions.c,v 1.8 2006/02/15 13:13:23 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -443,8 +443,8 @@
        }
 
        te_log_action(
-               log_level, "%d - Transition status: %s",
-               id, abort_reason);
+               log_level, "Transition %d status: %s - %s",
+               id, op, abort_reason);
 
        print_graph(log_level, graph);
        




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

Message: 4
Date: Wed, 15 Feb 2006 06:13:58 -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:
        callbacks.c 


Log Message:
Shortcut the graph execution if its already complete

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/callbacks.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -3 -r1.63 -r1.64
--- callbacks.c 14 Feb 2006 11:40:25 -0000      1.63
+++ callbacks.c 15 Feb 2006 13:13:58 -0000      1.64
@@ -1,4 +1,4 @@
-/* $Id: callbacks.c,v 1.63 2006/02/14 11:40:25 andrew Exp $ */
+/* $Id: callbacks.c,v 1.64 2006/02/15 13:13:58 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -422,6 +422,12 @@
 {
        int pending_updates = 0;
        enum transition_status graph_rc = -1;
+
+       if(transition_graph->complete) {
+               notify_crmd(transition_graph);
+               return TRUE;    
+       }
+       
        graph_rc = run_graph(transition_graph);
        stop_te_timer(transition_timer);
        print_graph(LOG_DEBUG_2, transition_graph);




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

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

Reply via email to