Send Linux-ha-cvs mailing list submissions to
        linux-ha-cvs@lists.linux-ha.org

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: heartbeat by andrew from 
      (linux-ha-cvs@lists.linux-ha.org)
   2. Linux-HA CVS: mgmt by zhenh from 
      (linux-ha-cvs@lists.linux-ha.org)
   3. Linux-HA CVS: crm by andrew from 
      (linux-ha-cvs@lists.linux-ha.org)
   4. Linux-HA CVS: mgmt by zhenh from 
      (linux-ha-cvs@lists.linux-ha.org)
   5. Linux-HA CVS: crm by andrew from 
      (linux-ha-cvs@lists.linux-ha.org)


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

Message: 1
Date: Wed, 24 May 2006 01:48:00 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: heartbeat by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/heartbeat/lib


Modified Files:
        BasicSanityCheck.in 


Log Message:
Better determination of the interface to use

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/lib/BasicSanityCheck.in,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -3 -r1.98 -r1.99
--- BasicSanityCheck.in 25 Apr 2006 17:23:38 -0000      1.98
+++ BasicSanityCheck.in 24 May 2006 07:48:00 -0000      1.99
@@ -104,7 +104,18 @@
 }
 
 GuessIFname() {
-  GetAllIFNames | grep -v '^lo' | head -n 1
+  # Machines with multiple nics rarely got this right
+  #  using ip and route should prove much more reliable
+  #  for those that have it
+
+  external_host=123.0.0.1
+  if [ -x /sbin/ip ]; then
+      /sbin/ip r g $external_host | head -n 1 | awk '{print $5}'
+  elif [ `uname -s` = "Darwin" ]; then
+      route get $external_host | grep interface | awk '{print $2}'
+  else
+      GetAllIFNames | grep -v '^lo' | head -n 1
+  fi
 }
 
 INTERFACE=`GuessIFname`
@@ -112,7 +123,7 @@
 case $INTERFACE in
   "")  INTERFACE=$DEFAULTINTERFACE;;
 esac
-
+echo "Using interface: $INTERFACE"
 #
 #      Is it safe to overwrite this config file?
 #




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

Message: 2
Date: Wed, 24 May 2006 02:20:19 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/mgmt/client


Modified Files:
        haclient.py.in 


Log Message:
we can manage the 'unmanaged' resources
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -3 -r1.43 -r1.44
--- haclient.py.in      18 May 2006 03:31:43 -0000      1.43
+++ haclient.py.in      24 May 2006 08:20:19 -0000      1.44
@@ -1268,7 +1268,7 @@
                        self.cur_view = ClusterView()
                elif type == "node" and status != _("stopped"):
                        self.cur_view = NodeView(name)
-               elif type in [_("native")] and 
string.find(status,_("unmanaged"))== -1:
+               elif type in [_("native")] :
                        self.cur_view = RscView(name)
                elif type == _("place") :
                        self.cur_view = PlaceView(name)




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

Message: 3
Date: Wed, 24 May 2006 02:27:20 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
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_mon.c 


Log Message:
The interval is already in msec

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_mon.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- crm_mon.c   20 May 2006 07:40:57 -0000      1.23
+++ crm_mon.c   24 May 2006 08:27:19 -0000      1.24
@@ -1,4 +1,4 @@
-/* $Id: crm_mon.c,v 1.23 2006/05/20 07:40:57 andrew Exp $ */
+/* $Id: crm_mon.c,v 1.24 2006/05/24 08:27:19 andrew Exp $ */
 
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -218,7 +218,7 @@
 
        if(one_shot == FALSE) {
                timer_id = Gmain_timeout_add(
-                       interval*1000, mon_timer_popped, NULL);
+                       interval, mon_timer_popped, NULL);
        }
 
        mon_timer_popped(NULL);




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

Message: 4
Date: Wed, 24 May 2006 03:51:00 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/mgmt/daemon


Modified Files:
        mgmt_crm.c 


Log Message:
we should check the return of rsc->fns->parameter(), it may be null
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/daemon/mgmt_crm.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- mgmt_crm.c  16 May 2006 09:46:47 -0000      1.41
+++ mgmt_crm.c  24 May 2006 09:51:00 -0000      1.42
@@ -1451,16 +1451,20 @@
 
        ret = cl_strdup(MSG_OK);
        ret = mgmt_msg_append(ret, rsc->id);
-
+       
        parameter = rsc->fns->parameter(rsc, NULL, FALSE
        ,       XML_RSC_ATTR_INCARNATION_MAX, data_set);
        ret = mgmt_msg_append(ret, parameter);
-       cl_free(parameter);
+       if (parameter != NULL) {
+               cl_free(parameter);
+       }
        
        parameter = rsc->fns->parameter(rsc, NULL, FALSE
        ,       XML_RSC_ATTR_INCARNATION_NODEMAX, data_set);
        ret = mgmt_msg_append(ret, parameter);
-       cl_free(parameter);
+       if (parameter != NULL) {
+               cl_free(parameter);
+       }
 
        free_data_set(data_set);
        return ret;
@@ -1515,22 +1519,30 @@
        parameter = rsc->fns->parameter(rsc, NULL, FALSE
        ,       XML_RSC_ATTR_INCARNATION_MAX, data_set);
        ret = mgmt_msg_append(ret, parameter);
-       cl_free(parameter);
+       if (parameter != NULL) {
+               cl_free(parameter);
+       }
 
        parameter = rsc->fns->parameter(rsc, NULL, FALSE
        ,       XML_RSC_ATTR_INCARNATION_NODEMAX, data_set);
        ret = mgmt_msg_append(ret, parameter);
-       cl_free(parameter);
+       if (parameter != NULL) {
+               cl_free(parameter);
+       }
 
        parameter = rsc->fns->parameter(rsc, NULL, FALSE
        ,       XML_RSC_ATTR_MASTER_MAX, data_set);
        ret = mgmt_msg_append(ret, parameter);
-       cl_free(parameter);
+       if (parameter != NULL) {
+               cl_free(parameter);
+       }
 
        parameter = rsc->fns->parameter(rsc, NULL, FALSE
        ,       XML_RSC_ATTR_MASTER_NODEMAX, data_set);
        ret = mgmt_msg_append(ret, parameter);
-       cl_free(parameter);
+       if (parameter != NULL) {
+               cl_free(parameter);
+       }
 
        free_data_set(data_set);
        return ret;




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

Message: 5
Date: Wed, 24 May 2006 04:11:19 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
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:
        native.c 


Log Message:
Allow access to the meta attributes

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/native.c,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -3 -r1.137 -r1.138
--- native.c    23 May 2006 09:57:52 -0000      1.137
+++ native.c    24 May 2006 10:11:18 -0000      1.138
@@ -1,4 +1,4 @@
-/* $Id: native.c,v 1.137 2006/05/23 09:57:52 andrew Exp $ */
+/* $Id: native.c,v 1.138 2006/05/24 10:11:18 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -206,6 +206,8 @@
 {
        char *value_copy = NULL;
        const char *value = NULL;
+       GHashTable *hash = rsc->parameters;
+       GHashTable *local_hash = NULL;
 
        CRM_CHECK(rsc != NULL, return NULL);
        CRM_CHECK(name != NULL && strlen(name) != 0, return NULL);
@@ -213,8 +215,6 @@
        crm_debug_2("Looking up %s in %s", name, rsc->id);
        
        if(create) {
-               GHashTable *local_hash = NULL;
-
                if(node != NULL) {
                        crm_debug_2("Creating hash with node %s",
                                  node->details->uname);
@@ -225,24 +225,27 @@
                local_hash = g_hash_table_new_full(
                        g_str_hash, g_str_equal,
                        g_hash_destroy_str, g_hash_destroy_str);
-
+               
                g_hash_table_foreach(
                        rsc->parameters, hash_copy_field, local_hash);
                unpack_instance_attributes(
                        rsc->xml, XML_TAG_ATTR_SETS, node, local_hash,
                        NULL, 0, data_set);
 
-               value = g_hash_table_lookup(local_hash, name);
-               if(value != NULL) {
-                       value_copy = crm_strdup(value);
-               }
+               hash = local_hash;
+       }
+               
+       value = g_hash_table_lookup(hash, name);
+       if(value == NULL) {
+               /* try meta attributes instead */
+               value = g_hash_table_lookup(rsc->meta, name);
+       }
+       
+       if(value != NULL) {
+               value_copy = crm_strdup(value);
+       }
+       if(local_hash != NULL) {
                g_hash_table_destroy(local_hash);
-
-       } else {
-               value = g_hash_table_lookup(rsc->parameters, name);
-               if(value != NULL) {
-                       value_copy = crm_strdup(value);
-               }
        }
        return value_copy;
 }




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

_______________________________________________
Linux-ha-cvs mailing list
Linux-ha-cvs@lists.linux-ha.org
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 30, Issue 74
********************************************

Reply via email to