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])


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

Message: 1
Date: Sun,  9 Apr 2006 07:27:55 -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/cib


Modified Files:
        Makefile.am 


Log Message:
There is no need to link against the apphb library

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/Makefile.am,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- Makefile.am 8 Mar 2006 22:24:29 -0000       1.22
+++ Makefile.am 9 Apr 2006 13:27:54 -0000       1.23
@@ -36,11 +36,9 @@
 
 COMMONLIBS     = $(CRM_DEBUG_LIBS)                                     \
                  $(top_builddir)/lib/clplumbing/libplumb.la            \
-                 $(top_builddir)/lib/pils/libpils.la                   \
                  $(top_builddir)/lib/crm/common/libcrmcommon.la        \
-                 $(top_builddir)/lib/apphb/libapphb.la         \
                  $(top_builddir)/lib/hbclient/libhbclient.la           \
-                 $(top_builddir)/lib/crm/cib/libcib.la         \
+                 $(top_builddir)/lib/crm/cib/libcib.la                 \
                  $(GLIBLIB)                                            \
                  $(LIBRT)
 




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

Message: 2
Date: Sun,  9 Apr 2006 07:35:05 -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/cib


Modified Files:
        io.c 


Log Message:
The default needs to be true now.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/io.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -3 -r1.63 -r1.64
--- io.c        9 Apr 2006 13:14:03 -0000       1.63
+++ io.c        9 Apr 2006 13:35:05 -0000       1.64
@@ -1,4 +1,4 @@
-/* $Id: io.c,v 1.63 2006/04/09 13:14:03 andrew Exp $ */
+/* $Id: io.c,v 1.64 2006/04/09 13:35:05 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -206,7 +206,7 @@
 {
        int s_res = -1;
        struct stat buf;
-       gboolean valid = FALSE;
+       gboolean valid = TRUE;
 
        const char *name = NULL;
        const char *value = NULL;




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

Message: 3
Date: Sun,  9 Apr 2006 08:35:58 -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/cib


Modified Files:
        io.c 


Log Message:
Do a few things before validation happens

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/io.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -3 -r1.64 -r1.65
--- io.c        9 Apr 2006 13:35:05 -0000       1.64
+++ io.c        9 Apr 2006 14:35:58 -0000       1.65
@@ -1,4 +1,4 @@
-/* $Id: io.c,v 1.64 2006/04/09 13:35:05 andrew Exp $ */
+/* $Id: io.c,v 1.65 2006/04/09 14:35:58 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -260,6 +260,37 @@
                        " - please update the md5 digest in %s.sig",
                        filename, filename);
        }
+
+       /* Do this before DTD validation happens */
+       if(root != NULL) {
+               /* strip out the status section if there is one */
+               status = find_xml_node(root, XML_CIB_TAG_STATUS, TRUE);
+               if(status != NULL) {
+                       free_xml_from_parent(root, status);
+               }
+               create_xml_node(root, XML_CIB_TAG_STATUS);
+               
+               /* fill in some defaults */
+               name = XML_ATTR_GENERATION_ADMIN;
+               value = crm_element_value(root, name);
+               if(value == NULL) {
+                       crm_xml_add_int(root, name, 0);
+               }
+               
+               name = XML_ATTR_GENERATION;
+               value = crm_element_value(root, name);
+               if(value == NULL) {
+                       crm_xml_add_int(root, name, 0);
+               }
+               
+               name = XML_ATTR_NUMUPDATES;
+               value = crm_element_value(root, name);
+               if(value == NULL) {
+                       crm_xml_add_int(root, name, 0);
+               }
+       }
+       
+       crm_log_xml_info(root, "[on-disk]");
        
        if(root != NULL) {
                const char *ignore_dtd = crm_element_value(root, "ignore_dtd");
@@ -276,7 +307,6 @@
                }
        }
 
-       crm_log_xml_info(root, "[on-disk]");
        
        if(root == NULL) {
                crm_crit("Parse ERROR reading %s.", filename);
@@ -293,33 +323,7 @@
                exit(100);
        }
 
-       crm_xml_add(root, "generated", XML_BOOLEAN_FALSE);
-       
-       /* strip out the status section if there is one */
-       status = find_xml_node(root, XML_CIB_TAG_STATUS, TRUE);
-       if(status != NULL) {
-               free_xml_from_parent(root, status);
-       }
-       create_xml_node(root, XML_CIB_TAG_STATUS);
-
-       /* fill in some defaults */
-       name = XML_ATTR_GENERATION_ADMIN;
-       value = crm_element_value(root, name);
-       if(value == NULL) {
-               crm_xml_add(root, name, "0");
-       }
-       
-       name = XML_ATTR_GENERATION;
-       value = crm_element_value(root, name);
-       if(value == NULL) {
-               crm_xml_add(root, name, "0");
-       }
-       
-       name = XML_ATTR_NUMUPDATES;
-       value = crm_element_value(root, name);
-       if(value == NULL) {
-               crm_xml_add(root, name, "0");
-       }
+       crm_xml_add(root, "generated", XML_BOOLEAN_FALSE);      
        
        do_id_check(root, NULL);
 




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

Message: 4
Date: Sun,  9 Apr 2006 08:38:05 -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/crmd


Modified Files:
        crmd_utils.h election.c fsa.c join_client.c join_dc.c 


Log Message:
Pay strict attention to when slaves set their DC and its version (and what
  they set it to) so that it can be used reliably in upgrade situations. 

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/crmd_utils.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- crmd_utils.h        3 Feb 2006 15:01:39 -0000       1.22
+++ crmd_utils.h        9 Apr 2006 14:38:04 -0000       1.23
@@ -1,4 +1,4 @@
-/* $Id: crmd_utils.h,v 1.22 2006/02/03 15:01:39 andrew Exp $ */
+/* $Id: crmd_utils.h,v 1.23 2006/04/09 14:38:04 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -69,6 +69,6 @@
        int log_level, const char *text, long long input_register);
 
 extern gboolean need_transition(enum crmd_fsa_state state);
-extern void update_dc(HA_Message *msg);
+extern void update_dc(HA_Message *msg, gboolean assert_same);
 
 #endif
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/election.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -3 -r1.108 -r1.109
--- election.c  29 Mar 2006 14:21:17 -0000      1.108
+++ election.c  9 Apr 2006 14:38:05 -0000       1.109
@@ -269,7 +269,7 @@
                we_loose = TRUE;
 
        } else {
-/*             CRM_DEV_ASSERT(strcmp(fsa_our_uname, vote_from) < 0); */
+               CRM_CHECK(strcmp(fsa_our_uname, vote_from) != 0, ;);
                crm_debug("Them: %s (born=%d)  Us: %s (born=%d)",
                          vote_from, your_node->node_born_on,
                          fsa_our_uname, our_node->node_born_on);
@@ -289,6 +289,8 @@
                HA_Message *novote = create_request(
                        CRM_OP_NOVOTE, NULL, vote_from,
                        CRM_SYSTEM_CRMD, CRM_SYSTEM_CRMD, NULL);
+
+               update_dc(NULL, FALSE);
                
                if(cl_get_uuid(vote->msg, F_ORIGUUID, &vote_uuid_s) == HA_OK) {
                        cl_uuid_unparse(&vote_uuid_s, vote_uuid);
@@ -374,12 +376,6 @@
        crm_info("Taking over DC status for this partition");
        set_bit_inplace(fsa_input_register, R_THE_DC);
 
-       crm_free(fsa_our_dc);
-       fsa_our_dc = crm_strdup(fsa_our_uname);
-
-       crm_free(fsa_our_dc_version);
-       fsa_our_dc_version = crm_strdup(CRM_FEATURE_SET);
-
        if(voted != NULL) {
                crm_debug_2("Destroying voted hash");
                g_hash_table_destroy(voted);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/fsa.c,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -3 -r1.140 -r1.141
--- fsa.c       22 Feb 2006 13:46:13 -0000      1.140
+++ fsa.c       9 Apr 2006 14:38:05 -0000       1.141
@@ -646,7 +646,7 @@
                case S_ELECTION:
                        crm_debug_2("Resetting our DC to NULL on transition to 
%s",
                                    fsa_state2string(next_state));
-                       update_dc(NULL);
+                       update_dc(NULL, FALSE);
                        break;
                case S_NOT_DC:
                        if(is_set(fsa_input_register, R_SHUTDOWN)){
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/join_client.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- join_client.c       3 Feb 2006 08:29:22 -0000       1.40
+++ join_client.c       9 Apr 2006 14:38:05 -0000       1.41
@@ -67,8 +67,6 @@
            enum crmd_fsa_input current_input,
            fsa_data_t *msg_data)
 {
-       ha_msg_input_t *input = fsa_typed_data(fsa_dt_ha_msg);
-       
        /* Once we hear from the DC, we can stop the timer
         *
         * This timer was started either on startup or when a node
@@ -83,37 +81,14 @@
        }
 
        if(AM_I_OPERATIONAL) {
-               const char *hb_from = cl_get_string(
-                       input->msg, F_CRM_HOST_FROM);
-
-               crm_debug("Announcing availability");
-               if(hb_from == NULL) {
-                       crm_err("Failed to determin origin of hb message");
-                       register_fsa_error(C_FSA_INTERNAL, I_FAIL, NULL);
-                       return I_NULL;
-               }
-
-               if(fsa_our_dc == NULL) {
-                       update_dc(input->msg);
-
-               } else if(safe_str_neq(fsa_our_dc, hb_from)) {
-                       /* reset the fsa_our_dc to NULL */
-                       crm_warn("Resetting our DC to NULL after DC_HB"
-                                " from unrecognised node.");
-                       update_dc(NULL);
-                       return I_NULL; /* for now, wait for the DC's
-                                       * to settle down
-                                       */
-               }
-               
                /* send as a broadcast */
-               {
-                       HA_Message *req = create_request(
-                               CRM_OP_JOIN_ANNOUNCE, NULL, NULL,
-                               CRM_SYSTEM_DC, CRM_SYSTEM_CRMD, NULL);
+               HA_Message *req = create_request(
+                       CRM_OP_JOIN_ANNOUNCE, NULL, NULL,
+                       CRM_SYSTEM_DC, CRM_SYSTEM_CRMD, NULL);
 
-                       send_msg_via_ha(fsa_cluster_conn, req);
-               }
+               crm_debug("Announcing availability");
+               update_dc(NULL, FALSE);
+               send_msg_via_ha(fsa_cluster_conn, req);
        
        } else {
                /* Delay announce until we have finished local startup */
@@ -158,10 +133,8 @@
                query_call_id = 0;
        }
 
-       if(fsa_our_dc == NULL) {
-               update_dc(input->msg);
-               
-       } else if(safe_str_neq(welcome_from, fsa_our_dc)) {
+       update_dc(input->msg, FALSE);
+       if(safe_str_neq(welcome_from, fsa_our_dc)) {
                /* dont do anything until DC's sort themselves out */
                crm_err("Expected a welcome from %s, but %s replied",
                        fsa_our_dc, welcome_from);
@@ -265,7 +238,8 @@
        ha_msg_value_int(input->msg, F_CRM_JOIN_ID, &join_id);
        
        if(was_nack) {
-               crm_err("Join join-%d with %s failed.  NACK'd", join_id, 
welcome_from);
+               crm_err("Join join-%d with %s failed.  NACK'd",
+                       join_id, welcome_from);
                register_fsa_error(C_FSA_INTERNAL, I_ERROR, NULL);
                return I_NULL;
        }
@@ -273,11 +247,10 @@
        if(AM_I_DC == FALSE && safe_str_eq(welcome_from, fsa_our_uname)) {
                crm_warn("Discarding our own welcome - we're no longer the DC");
                return I_NULL;
-               
-       } else if(fsa_our_dc == NULL) {
-               update_dc(input->msg);
        }       
 
+       update_dc(input->msg, TRUE);
+
        /* send our status section to the DC */
        crm_debug("Confirming join join-%d: %s",
                  join_id, cl_get_string(input->msg, F_CRM_TASK));
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/join_dc.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -3 -r1.86 -r1.87
--- join_dc.c   7 Apr 2006 14:28:12 -0000       1.86
+++ join_dc.c   9 Apr 2006 14:38:05 -0000       1.87
@@ -146,6 +146,8 @@
        current_join_id++;
        initialize_join(TRUE);
        do_update_cib_nodes(TRUE, __FUNCTION__);
+
+       update_dc(NULL, FALSE); 
        
        g_hash_table_foreach(
                fsa_membership_copy->members, join_make_offer, NULL);




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

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

Reply via email to