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: include by andrew from 
      ([email protected])
   2. Linux-HA CVS: crm by andrew from 
      ([email protected])
   3. Linux-HA CVS: lib by andrew from 
      ([email protected])


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

Message: 1
Date: Mon,  3 Apr 2006 10:38:53 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: include by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Project : linux-ha
Module  : include

Dir     : linux-ha/include/crm


Modified Files:
        crm.h 


Log Message:
Make sure all logs are flushed

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/crm/crm.h,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -3 -r1.90 -r1.91
--- crm.h       31 Mar 2006 11:50:24 -0000      1.90
+++ crm.h       3 Apr 2006 16:38:52 -0000       1.91
@@ -1,4 +1,4 @@
-/* $Id: crm.h,v 1.90 2006/03/31 11:50:24 andrew Exp $ */
+/* $Id: crm.h,v 1.91 2006/04/03 16:38:52 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -267,6 +267,7 @@
                new_obj = malloc(length);                               \
                if(new_obj == NULL) {                                   \
                        crm_crit("Out of memory... exiting");           \
+                       cl_flush_logs();                                \
                        exit(1);                                        \
                } else {                                                \
                        memset(new_obj, 0, length);                     \
@@ -281,11 +282,13 @@
                        crm_err("Potential memory leak:"                \
                                " %s at %s:%d not NULL before alloc.",  \
                                #new_obj, __FILE__, __LINE__);          \
+                       cl_flush_logs();                                \
                        abort();                                        \
                }                                                       \
                new_obj = cl_malloc(length);                            \
                if(new_obj == NULL) {                                   \
                        crm_crit("Out of memory... exiting");           \
+                       cl_flush_logs();                                \
                        abort();                                        \
                }                                                       \
                memset(new_obj, 0, length);                             \
@@ -301,6 +304,7 @@
                new_obj = cl_malloc(length);                            \
                if(new_obj == NULL) {                                   \
                        crm_crit("Out of memory... exiting");           \
+                       cl_flush_logs();                                \
                        abort();                                        \
                }                                                       \
                memset(new_obj, 0, length);                             \




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

Message: 2
Date: Mon,  3 Apr 2006 10:46:26 -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:
        control.c cib.c 


Log Message:
Factor out the population of the nodes section and call it whenever the
  complete CIB is replaced. 

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/control.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -3 -r1.120 -r1.121
--- control.c   28 Mar 2006 08:30:50 -0000      1.120
+++ control.c   3 Apr 2006 16:46:26 -0000       1.121
@@ -42,6 +42,7 @@
 
 gboolean crm_shutdown(int nsig, gpointer unused);
 gboolean register_with_ha(ll_cluster_t *hb_cluster, const char *client_name);
+void populate_cib_nodes(ll_cluster_t *hb_cluster);
 
 
 GHashTable   *ipc_clients = NULL;
@@ -616,13 +617,69 @@
        }
 }
 
-gboolean
-register_with_ha(ll_cluster_t *hb_cluster, const char *client_name)
+void
+populate_cib_nodes(ll_cluster_t *hb_cluster)
 {
        int call_id = 0;
        const char *ha_node = NULL;
        crm_data_t *cib_node_list = NULL;
        
+       /* Async get client status information in the cluster */
+       crm_debug_3("Requesting an initial dump of CRMD client_status");
+       fsa_cluster_conn->llc_ops->client_status(
+               fsa_cluster_conn, NULL, CRM_SYSTEM_CRMD, -1);
+
+       crm_info("Requesting the list of configured nodes");
+       fsa_cluster_conn->llc_ops->init_nodewalk(fsa_cluster_conn);
+
+       cib_node_list = create_xml_node(NULL, XML_CIB_TAG_NODES);
+       do {
+               const char *ha_node_type = NULL;
+               const char *ha_node_uuid = NULL;
+               crm_data_t *cib_new_node = NULL;
+
+               ha_node = fsa_cluster_conn->llc_ops->nextnode(fsa_cluster_conn);
+               if(ha_node == NULL) {
+                       continue;
+               }
+               
+               ha_node_type = fsa_cluster_conn->llc_ops->node_type(
+                       fsa_cluster_conn, ha_node);
+               if(safe_str_neq(NORMALNODE, ha_node_type)) {
+                       crm_debug("Node %s: skipping '%s'",
+                                 ha_node, ha_node_type);
+                       continue;
+               }
+
+               ha_node_uuid = get_uuid(fsa_cluster_conn, ha_node);
+               if(ha_node_uuid == NULL) {
+                       crm_warn("Node %s: no uuid found", ha_node);
+                       continue;       
+               }
+               
+               crm_notice("Node: %s (uuid: %s)", ha_node, ha_node_uuid);
+               cib_new_node = create_xml_node(cib_node_list, XML_CIB_TAG_NODE);
+               crm_xml_add(cib_new_node, XML_ATTR_ID,    ha_node_uuid);
+               crm_xml_add(cib_new_node, XML_ATTR_UNAME, ha_node);
+               crm_xml_add(cib_new_node, XML_ATTR_TYPE,  ha_node_type);
+
+       } while(ha_node != NULL);
+
+       fsa_cluster_conn->llc_ops->end_nodewalk(fsa_cluster_conn);
+       
+       /* Now update the CIB with the list of nodes */
+       call_id = fsa_cib_conn->cmds->update(
+               fsa_cib_conn, XML_CIB_TAG_NODES, cib_node_list, NULL,
+               cib_scope_local|cib_quorum_override|cib_inhibit_bcast);
+       
+       add_cib_op_callback(call_id, FALSE, NULL, default_cib_update_callback);
+
+       free_xml(cib_node_list);
+}
+
+gboolean
+register_with_ha(ll_cluster_t *hb_cluster, const char *client_name)
+{
        crm_debug("Signing in with Heartbeat");
        if (hb_cluster->llc_ops->signon(hb_cluster, client_name)!= HA_OK) {
 
@@ -686,57 +743,7 @@
        fsa_our_uuid = crm_strdup(fsa_our_uuid);
        crm_info("UUID: %s", fsa_our_uuid);
                
-       /* Async get client status information in the cluster */
-       crm_debug_3("Requesting an initial dump of CRMD client_status");
-       fsa_cluster_conn->llc_ops->client_status(
-               fsa_cluster_conn, NULL, CRM_SYSTEM_CRMD, -1);
-
-       crm_info("Requesting the list of configured nodes");
-       fsa_cluster_conn->llc_ops->init_nodewalk(fsa_cluster_conn);
-
-       cib_node_list = create_xml_node(NULL, XML_CIB_TAG_NODES);
-       do {
-               const char *ha_node_type = NULL;
-               const char *ha_node_uuid = NULL;
-               crm_data_t *cib_new_node = NULL;
-
-               ha_node = fsa_cluster_conn->llc_ops->nextnode(fsa_cluster_conn);
-               if(ha_node == NULL) {
-                       continue;
-               }
-               
-               ha_node_type = fsa_cluster_conn->llc_ops->node_type(
-                       fsa_cluster_conn, ha_node);
-               if(safe_str_neq(NORMALNODE, ha_node_type)) {
-                       crm_debug("Node %s: skipping '%s'",
-                                 ha_node, ha_node_type);
-                       continue;
-               }
-
-               ha_node_uuid = get_uuid(fsa_cluster_conn, ha_node);
-               if(ha_node_uuid == NULL) {
-                       crm_warn("Node %s: no uuid found", ha_node);
-                       continue;       
-               }
-               
-               crm_notice("Node: %s (uuid: %s)", ha_node, ha_node_uuid);
-               cib_new_node = create_xml_node(cib_node_list, XML_CIB_TAG_NODE);
-               crm_xml_add(cib_new_node, XML_ATTR_ID,    ha_node_uuid);
-               crm_xml_add(cib_new_node, XML_ATTR_UNAME, ha_node);
-               crm_xml_add(cib_new_node, XML_ATTR_TYPE,  ha_node_type);
-
-       } while(ha_node != NULL);
-
-       fsa_cluster_conn->llc_ops->end_nodewalk(fsa_cluster_conn);
-       
-       /* Now update the CIB with the list of nodes */
-       call_id = fsa_cib_conn->cmds->update(
-               fsa_cib_conn, XML_CIB_TAG_NODES, cib_node_list, NULL,
-               cib_scope_local|cib_quorum_override|cib_inhibit_bcast);
-       
-       add_cib_op_callback(call_id, FALSE, NULL, default_cib_update_callback);
-
-       free_xml(cib_node_list);
+       populate_cib_nodes(hb_cluster);
        
        return TRUE;
     
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/cib.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- cib.c       19 Feb 2006 09:03:16 -0000      1.48
+++ cib.c       3 Apr 2006 16:46:26 -0000       1.49
@@ -112,16 +112,20 @@
        }
 }
 
+extern void populate_cib_nodes(ll_cluster_t *hb_cluster);
+
 static void
 do_cib_replaced(const char *event, HA_Message *msg)
 {
        crm_debug("Updating the CIB after a replace");
+       populate_cib_nodes(fsa_cluster_conn);
        do_update_cib_nodes(AM_I_DC, __FUNCTION__);
-       fsa_cluster_conn->llc_ops->client_status(
-               fsa_cluster_conn, NULL, CRM_SYSTEM_CRMD, -1);
+       if(AM_I_DC) {
+               /* start the join process again so we get everyone's LRM status 
*/
+               register_fsa_input(C_FSA_INTERNAL, I_ELECTION, NULL);
+       }
 }
 
-
 /*      A_CIB_STOP, A_CIB_START, A_CIB_RESTART,        */
 enum crmd_fsa_input
 do_cib_control(long long action,




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

Message: 3
Date: Mon,  3 Apr 2006 10:47:21 -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:
        utils.c 


Log Message:


Logging

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/common/utils.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- utils.c     3 Apr 2006 09:51:56 -0000       1.39
+++ utils.c     3 Apr 2006 16:47:21 -0000       1.40
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.39 2006/04/03 09:51:56 andrew Exp $ */
+/* $Id: utils.c,v 1.40 2006/04/03 16:47:21 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -1311,7 +1311,7 @@
        
        file_strm = fopen(series_file, "r");
        if(file_strm == NULL) {
-               crm_err("%s does not exist", series_file);
+               crm_debug("%s does not exist", series_file);
                crm_free(series_file);
                return 0;
        }




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

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

Reply via email to