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: lib 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: tools by zhenh from 
      ([email protected])


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

Message: 1
Date: Wed, 12 Apr 2006 02:24:20 -0600 (MDT)
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:
        iso8601.c 


Log Message:
Fix for CID 12 & 13 - possible use of NULL

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/common/iso8601.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- iso8601.c   18 Mar 2006 17:23:48 -0000      1.13
+++ iso8601.c   12 Apr 2006 08:24:20 -0000      1.14
@@ -1,4 +1,4 @@
-/* $Id: iso8601.c,v 1.13 2006/03/18 17:23:48 andrew Exp $ */
+/* $Id: iso8601.c,v 1.14 2006/04/12 08:24:20 andrew Exp $ */
 /* 
  * Copyright (C) 2005 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -1173,6 +1173,14 @@
 int
 compare_date(ha_time_t *lhs, ha_time_t *rhs)
 {
+       if(lhs == NULL && rhs == NULL) {
+               return 0;
+       } else if(lhs == NULL) {
+               return -1;
+       } else if(rhs == NULL) {
+               return 1;               
+       }
+       
        normalize_time(lhs);
        normalize_time(rhs);
 




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

Message: 2
Date: Wed, 12 Apr 2006 02:40:17 -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/pengine


Modified Files:
        master.c 


Log Message:
Allow promotion to work when long resource names are being used

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/master.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- master.c    31 Mar 2006 12:00:59 -0000      1.12
+++ master.c    12 Apr 2006 08:40:17 -0000      1.13
@@ -1,4 +1,4 @@
-/* $Id: master.c,v 1.12 2006/03/31 12:00:59 andrew Exp $ */
+/* $Id: master.c,v 1.13 2006/04/12 08:40:17 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -268,6 +268,10 @@
                crm_debug_2("Assigning priority for %s", child_rsc->id);
                CRM_CHECK(child_rsc->color != NULL, continue);
                chosen = child_rsc->color->details->chosen_node;
+
+               if(child_rsc->role == RSC_ROLE_STARTED) {
+                       child_rsc->role = RSC_ROLE_SLAVE;
+               }
                
                switch(child_rsc->next_role) {
                        case RSC_ROLE_STARTED:
@@ -281,10 +285,12 @@
 
                                CRM_CHECK(chosen != NULL, break);
 
-                               len = 8 + strlen(child_rsc->id);
+                               len = 8 + strlen(child_rsc->graph_name);
                                crm_malloc0(attr_name, len);
-                               sprintf(attr_name, "master-%s", child_rsc->id);
+                               sprintf(attr_name, "master-%s", 
child_rsc->graph_name);
                                
+                               crm_debug_2("looking for %s on %s", attr_name,
+                                         chosen->details->uname);
                                attr_value = g_hash_table_lookup(
                                        chosen->details->attrs, attr_name);
 




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

Message: 3
Date: Wed, 12 Apr 2006 02:44:36 -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/pengine


Modified Files:
        graph.c 


Log Message:
Remove dead code found by Coverity

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/graph.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -3 -r1.81 -r1.82
--- graph.c     10 Apr 2006 12:17:38 -0000      1.81
+++ graph.c     12 Apr 2006 08:44:36 -0000      1.82
@@ -1,4 +1,4 @@
-/* $Id: graph.c,v 1.81 2006/04/10 12:17:38 andrew Exp $ */
+/* $Id: graph.c,v 1.82 2006/04/12 08:44:36 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -51,7 +51,6 @@
 gboolean
 update_action(action_t *action)
 {
-       gboolean change = FALSE;
        enum action_tasks task = no_action;
        
        crm_debug_3("Processing action %s: %s",
@@ -170,10 +169,6 @@
                }
                );
 
-       if(change) {
-               update_action(action);
-       }
-
        crm_debug_3("Action %s: %s", action->uuid, change?"update":"untouched");
        return change;
 }




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

Message: 4
Date: Wed, 12 Apr 2006 02:58:24 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: tools by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/tools


Modified Files:
        haresources2cib.py.in 


Log Message:
generate the cib in the final place with right permission
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/tools/haresources2cib.py.in,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- haresources2cib.py.in       12 Apr 2006 05:55:33 -0000      1.9
+++ haresources2cib.py.in       12 Apr 2006 08:58:24 -0000      1.10
@@ -338,6 +338,8 @@
 if __name__=="__main__" :
        resource_file = "/etc/ha.d/haresources"
        config_file = "/etc/ha.d/ha.cf"
+       target_file = "/var/lib/heartbeat/crm/cib.xml"
+       to_stdout = False
        
        # Process arguments...
        skipthis = None
@@ -348,6 +350,8 @@
                        continue
                elif args[i] == "--no-ocf" :
                        using_ocf = 0
+               elif args[i] == "--stdout" :
+                       to_stdout = True
                elif args[i] == "--no-monitor" :
                        using_mon = 0
                elif args[i] == "--config" or args[i] == "-c" :
@@ -356,6 +360,7 @@
                elif args[i] == "--help" or args[i] == "-h" :
                        print "usage: " + sys.argv[0]  \
                                +  " [--no-ocf]"\
+                               +  " [--stdout]"\
                                +  " [--no-monitor]"\
                                +  " [--config|-c configfile]"\
                                +  " [--help|-h]"\
@@ -404,9 +409,13 @@
                for stonith_host in stonith_host_list :
                        add_stonith_host(cib, stonith_host, id_index, node_num)
                        id_index += 1
-                       
-       print cib[0].toprettyxml()
-       sys.stderr.write("Notice:\n")
-       sys.stderr.write("Please move the cib.xml generated to 
/var/lib/heartbeat/crm/.\n")
-       sys.stderr.write("It must be owned and read/writeable by user @[EMAIL 
PROTECTED]")
-       sys.stderr.write("Or owned and read/writable by group @[EMAIL 
PROTECTED]")
+       if to_stdout :          
+               print cib[0].toprettyxml()
+       elif os.access(target_file, os.F_OK) or os.access(target_file+".sig", 
os.F_OK) :
+               sys.stderr.write("cib.xml or cib.xml.sig exist in 
/var/lib/heartbeat/crm/\n")
+               sys.stderr.write("please remove them before generating new 
cib.xml\n")
+       else :
+               cib_file = open(target_file, "w")
+               cib_file.write(cib[0].toprettyxml())
+               cib_file.close()
+               os.system("chown  @[EMAIL PROTECTED]@HA_APIGROUP@ "+target_file)




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

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

Reply via email to