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: resources by xunsun 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: lib by andrew from 
      ([email protected])


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

Message: 1
Date: Wed, 29 Mar 2006 06:56:31 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by xunsun from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : xunsun
Host    : 
Project : linux-ha
Module  : resources

Dir     : linux-ha/resources/heartbeat


Modified Files:
        LVM.in 


Log Message:
fixed hard-code
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/heartbeat/LVM.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- LVM.in      3 Nov 2005 07:45:51 -0000       1.6
+++ LVM.in      29 Mar 2006 13:56:30 -0000      1.7
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $Id: LVM.in,v 1.6 2005/11/03 07:45:51 xunsun Exp $
+# $Id: LVM.in,v 1.7 2006/03/29 13:56:30 xunsun Exp $
 # 
 # Description: wrapper of OCF RA LVM, based on original heartbeat RA.
 #              See OCF RA LVM for more information.
@@ -17,7 +17,7 @@
 # See usage() function below for more details...
 #
 
-. /etc/ha.d/resource.d/hto-mapfuncs
+. @HB_RA_DIR@/hto-mapfuncs
 
 unset LC_ALL; export LC_ALL
 unset LANGUAGE; export LANGUAGE
@@ -37,7 +37,7 @@
        The 'monitor' operation reports whether the volume seems present
        The 'methods' operation reports on the methods $0 supports
 
-       $Id: LVM.in,v 1.6 2005/11/03 07:45:51 xunsun Exp $
+       $Id: LVM.in,v 1.7 2006/03/29 13:56:30 xunsun Exp $
        !
   exit 1
 }




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

Message: 2
Date: Wed, 29 Mar 2006 07:20:26 -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/admin


Modified Files:
        crm_primitive.py.in 


Log Message:
Fix the example

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_primitive.py.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- crm_primitive.py.in 17 Mar 2006 17:55:51 -0000      1.1
+++ crm_primitive.py.in 29 Mar 2006 14:20:26 -0000      1.2
@@ -72,7 +72,7 @@
 
        elif ra_class != "lsb" and ra_class != "heartbeat": 
                print "Unknown resource class: "+ ra_class
-               exit(1)
+               return None
 
        operations = doc.createElement("operations")
        resource.appendChild(operations)
@@ -159,8 +159,8 @@
            + " [--rsc-location uname=score]*"\
            + " [--rsc-colocation resource=score]*"
        print "Example:\n\t" + sys.argv[0] \
-           + "--name cluster_ip_1 --type ocf --provider heartbeat --class 
IPaddr "\
-           + "--rsc_option ip=192.168.1.101 --rsc-location node1=500 | 
cibadmin -U -p"
+           + " --name cluster_ip_1 --type IPaddr --provider heartbeat --class 
ocf "\
+           + "--rsc-option ip=192.168.1.101 --rsc-location node1=500 | 
cibadmin -U -p"
        sys.exit(1)
     
 if __name__=="__main__" :
@@ -235,6 +235,7 @@
                elif args[i] == "--rsc-only" :
                        print_rsc_only = 1
                else:
+                       print "Unknown argument: "+ args[i]
                        print_usage()
        cib = create_cib()
        pre_line = ""




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

Message: 3
Date: Wed, 29 Mar 2006 07:21:17 -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:
        election.c 


Log Message:
Simpler method for doing the same thing (and I get a stack trace)

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/election.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -3 -r1.107 -r1.108
--- election.c  28 Mar 2006 08:34:32 -0000      1.107
+++ election.c  29 Mar 2006 14:21:17 -0000      1.108
@@ -183,23 +183,19 @@
        const char *your_version  = cl_get_string(vote->msg, F_CRM_VERSION);
        const char *election_owner= cl_get_string(vote->msg, 
F_CRM_ELECTION_OWNER);
        
-       ha_msg_value_int(vote->msg, F_CRM_ELECTION_ID, &election_id);
-
        /* if the membership copy is NULL we REALLY shouldnt be voting
         * the question is how we managed to get here.
         */
        CRM_CHECK(fsa_membership_copy != NULL, return I_NULL);
        CRM_CHECK(fsa_membership_copy->members != NULL, return I_NULL);
+
+       CRM_CHECK(vote_from != NULL, vote_from = fsa_our_uname);
        
        our_node = (oc_node_t*)g_hash_table_lookup(
                fsa_membership_copy->members, fsa_our_uname);
 
-       if(vote_from != NULL) {
-               your_node = (oc_node_t*)g_hash_table_lookup(
-                       fsa_membership_copy->members, vote_from);
-       } else {
-               your_node = our_node;
-       }
+       your_node = (oc_node_t*)g_hash_table_lookup(
+               fsa_membership_copy->members, vote_from);
        
        if(voted == NULL) {
                crm_debug("Created voted hash");
@@ -208,6 +204,8 @@
                        g_hash_destroy_str, g_hash_destroy_str);
        }
 
+       ha_msg_value_int(vote->msg, F_CRM_ELECTION_ID, &election_id);
+       
        /* update the list of nodes that have voted */
        if(your_node != NULL) {
                char *op_copy = NULL;




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

Message: 4
Date: Wed, 29 Mar 2006 07: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/cib


Modified Files:
        cib_client.c 


Log Message:
Do the same thing more neatly *and* tell the user what was wrong

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/cib/cib_client.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- cib_client.c        18 Mar 2006 17:23:48 -0000      1.51
+++ cib_client.c        29 Mar 2006 14:23:11 -0000      1.52
@@ -1344,28 +1344,32 @@
 gboolean
 verifyCibXml(crm_data_t *cib)
 {
+       int lpc = 0;
        gboolean is_valid = TRUE;
        crm_data_t *tmp_node = NULL;
+
+       const char *sections[] = {
+               XML_CIB_TAG_NODES,
+               XML_CIB_TAG_RESOURCES,
+               XML_CIB_TAG_CONSTRAINTS,
+               XML_CIB_TAG_STATUS,
+               XML_CIB_TAG_CRMCONFIG
+       };
        
        if (cib == NULL) {
                crm_warn("CIB was empty.");
                return FALSE;
        }
-       
-       tmp_node = get_object_root(XML_CIB_TAG_NODES, cib);
-       if (tmp_node == NULL) { is_valid = FALSE; }
-
-       tmp_node = get_object_root(XML_CIB_TAG_RESOURCES, cib);
-       if (tmp_node == NULL) { is_valid = FALSE; }
 
-       tmp_node = get_object_root(XML_CIB_TAG_CONSTRAINTS, cib);
-       if (tmp_node == NULL) { is_valid = FALSE; }
-
-       tmp_node = get_object_root(XML_CIB_TAG_STATUS, cib);
-       if (tmp_node == NULL) { is_valid = FALSE; }
-
-       tmp_node = get_object_root(XML_CIB_TAG_CRMCONFIG, cib);
-       if (tmp_node == NULL) { is_valid = FALSE; }
+       /* basic tests... are the standard section all there */
+       for(lpc = 0; lpc < DIMOF(sections); lpc++) {
+               tmp_node = get_object_root(sections[lpc], cib);
+               if (tmp_node == NULL) {
+                       crm_warn("Section %s is not present in the CIB",
+                                sections[lpc]);
+                       is_valid = FALSE;
+               }
+       }
 
        /* more integrity tests */
 




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

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

Reply via email to