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: lib 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: Mon, 20 Feb 2006 05:11:28 -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/pengine


Modified Files:
        unpack.c 


Log Message:
The default is to be a memer node
Support the Heartbeat "normal" type as a member node as well.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/unpack.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -3 -r1.158 -r1.159
--- unpack.c    19 Feb 2006 20:05:49 -0000      1.158
+++ unpack.c    20 Feb 2006 12:11:28 -0000      1.159
@@ -1,4 +1,4 @@
-/* $Id: unpack.c,v 1.158 2006/02/19 20:05:49 andrew Exp $ */
+/* $Id: unpack.c,v 1.159 2006/02/20 12:11:28 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -312,7 +312,9 @@
                }
                
                
-               if(safe_str_eq(type, "member")) {
+               if(type == NULL
+                  || safe_str_eq(type, "member")
+                  || safe_str_eq(type, NORMALNODE)) {
                        new_node->details->type = node_member;
                }
 




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

Message: 2
Date: Mon, 20 Feb 2006 05:13:00 -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/common


Modified Files:
        utils.c 


Log Message:
Detect Heartbeat's equivalent of "we couldnt find a UUID"

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/common/utils.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- utils.c     16 Jan 2006 09:19:54 -0000      1.31
+++ utils.c     20 Feb 2006 12:13:00 -0000      1.32
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.31 2006/01/16 09:19:54 andrew Exp $ */
+/* $Id: utils.c,v 1.32 2006/02/20 12:13:00 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -573,8 +573,9 @@
 const char *
 get_uuid(ll_cluster_t *hb, const char *uname) 
 {
-       char *uuid_calc = NULL;
        cl_uuid_t uuid_raw;
+       char *uuid_calc = NULL;
+       const char *unknown = "00000000-0000-0000-0000-000000000000";
 
        if(crm_uuid_cache == NULL) {
                crm_uuid_cache = g_hash_table_new_full(
@@ -590,23 +591,31 @@
                return uuid_calc;
        }
        
+       
+       if(hb->llc_ops->get_uuid_by_name(hb, uname, &uuid_raw) == HA_FAIL) {
+               crm_err("get_uuid_by_name() call failed for host %s", uname);
+               crm_free(uuid_calc);
+               return NULL;
+               
+       } 
+
        crm_malloc0(uuid_calc, sizeof(char)*50);
        
        if(uuid_calc == NULL) {
                return NULL;
        }
-       
-       if(hb->llc_ops->get_uuid_by_name(hb, uname, &uuid_raw) == HA_FAIL) {
-               crm_err("Could not calculate UUID for %s", uname);
+
+       cl_uuid_unparse(&uuid_raw, uuid_calc);
+
+       if(safe_str_eq(uuid_calc, unknown)) {
+               crm_warn("Could not calculate UUID for %s", uname);
                crm_free(uuid_calc);
-               uuid_calc = crm_strdup(uname);
-               
-       } else {
-               cl_uuid_unparse(&uuid_raw, uuid_calc);
-               g_hash_table_insert(
-                       crm_uuid_cache, crm_strdup(uname), uuid_calc);
-               uuid_calc = g_hash_table_lookup(crm_uuid_cache, uname);
+               return NULL;
        }
+       
+       g_hash_table_insert(crm_uuid_cache, crm_strdup(uname), uuid_calc);
+       uuid_calc = g_hash_table_lookup(crm_uuid_cache, uname);
+
        return uuid_calc;
 }
 




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

Message: 3
Date: Mon, 20 Feb 2006 05:22:25 -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:
        control.c 


Log Message:
We dont need to broardcast the nodes section update


Log node's we dont know the UUID for

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/control.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -3 -r1.114 -r1.115
--- control.c   20 Feb 2006 12:10:41 -0000      1.114
+++ control.c   20 Feb 2006 12:22:24 -0000      1.115
@@ -711,6 +711,7 @@
 
                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;       
                }
                
@@ -726,12 +727,11 @@
        
        /* 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);
+               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);
 
-       crm_log_xml_err(cib_node_list, "NodeList");
        free_xml(cib_node_list);
        
        return TRUE;




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

Message: 4
Date: Mon, 20 Feb 2006 05:24:22 -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_native.c 


Log Message:
Simplify the failure logic

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/cib/cib_native.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -3 -r1.54 -r1.55
--- cib_native.c        8 Feb 2006 22:12:06 -0000       1.54
+++ cib_native.c        20 Feb 2006 12:24:21 -0000      1.55
@@ -425,30 +425,26 @@
        
        if(op == NULL) {
                crm_err("No operation specified");
-               rc = cib_operation;
+               return cib_operation;
        }
 
-       if(rc == HA_OK) {
-               cib->call_id++;
-               /* prevent call_id from being negative (or zero) and conflicting
-                *    with the cib_errors enum
-                * use 2 because we use it as (cib->call_id - 1) below
-                */
-               if(cib->call_id < 1) {
-                       cib->call_id = 1;
-               }
+       cib->call_id++;
+       /* prevent call_id from being negative (or zero) and conflicting
+        *    with the cib_errors enum
+        * use 2 because we use it as (cib->call_id - 1) below
+        */
+       if(cib->call_id < 1) {
+               cib->call_id = 1;
+       }
        
-               op_msg = cib_create_op(
-                       cib->call_id, op, host, section, data, call_options);
-               if(op_msg == NULL) {
-                       rc = cib_create_msg;
-               }
+       op_msg = cib_create_op(
+               cib->call_id, op, host, section, data, call_options);
+       if(op_msg == NULL) {
+               return cib_create_msg;
        }
        
        crm_debug_3("Sending %s message to CIB service", op);
-       if(rc != HA_OK) {
-
-       } else if(send_ipc_message(native->command_channel, op_msg) == FALSE) {
+       if(send_ipc_message(native->command_channel, op_msg) == FALSE) {
                crm_err("Sending message to CIB service FAILED");
                return cib_send_failed;
 
@@ -464,6 +460,7 @@
 
        } else if(!(call_options & cib_sync_call)) {
                crm_debug_3("Async call, returning");
+               CRM_DEV_ASSERT(cib->call_id != 0);
                return cib->call_id;
        }
 




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

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

Reply via email to