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


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

Message: 1
Date: Tue, 30 May 2006 00:37:17 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: linux-ha by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : zhenh
Host    : 
Module  : linux-ha

Dir     : linux-ha


Modified Files:
        configure.in 


Log Message:
rollback the patch for x86-64. we can use --libdir=/usr/lib64 to build on 
x86-64 platform
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/configure.in,v
retrieving revision 1.524
retrieving revision 1.525
diff -u -3 -r1.524 -r1.525
--- configure.in        28 May 2006 00:45:07 -0000      1.524
+++ configure.in        30 May 2006 06:37:17 -0000      1.525
@@ -10,7 +10,7 @@
 AC_INIT(heartbeat.spec.in)
 
 AC_CONFIG_AUX_DIR(.)
-AC_REVISION($Revision: 1.524 $) dnl cvs revision
+AC_REVISION($Revision: 1.525 $) dnl cvs revision
 AC_CANONICAL_HOST
 
 
@@ -209,11 +209,15 @@
 mandir=`var "$mandir" "$exec_prefix/man"`
 docdir=${datadir}/doc/${HB_PKG}-${VERSION}
 
-libdir="$exec_prefix/lib"
-if needs_64_bit_libs; then
-       old=$libdir
-       libdir=$exec_prefix/lib64
-       AC_MSG_WARN(overriding libdir from $old to $libdir)
+if test x"$libdir" = x; then
+       libdir="$exec_prefix/lib"
+       if needs_64_bit_libs; then
+               old=$libdir
+               libdir=$exec_prefix/lib64
+               AC_MSG_WARN(overriding libdir from $old to $libdir)
+       fi
+else
+       libdir=`eval echo "$libdir"`    
 fi
 
 if test x"$libexecdir" = x; then




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

Message: 2
Date: Tue, 30 May 2006 01:34:45 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/resources/OCF


Modified Files:
        VIPArip.in 


Log Message:
avoid report error when getting metadata
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/OCF/VIPArip.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- VIPArip.in  26 May 2006 01:32:32 -0000      1.1
+++ VIPArip.in  30 May 2006 07:34:44 -0000      1.2
@@ -111,7 +111,13 @@
 access-list private deny any
 END
 }
-
+check_params() {
+       if [ x"$OCF_RESKEY_ip" = x ]
+       then
+               ocf_log err "Invalid OCF_RESKEY_ip [$OCF_RESKEY_ip]"
+               exit $OCF_ERR_ARGS
+       fi
+}
 set_metric() {
        echo set_metric $1
        sed "s/redistribute connected metric .*/redistribute connected metric 
$1/g" $RIPDCONF > $RIPDCONF.tmp
@@ -181,6 +187,7 @@
 
 start_rip_ip() {
        echo start_rip_ip
+       check_params    
        if [ -d "$VLDIR/" ] || mkdir -p "$VLDIR/"
        then
                : Directory $VLDIR now exists
@@ -227,6 +234,7 @@
 
 stop_rip_ip() {
        echo stop_rip_ip
+       check_params
        status_rip_ip
        if [ $? = $OCF_NOT_RUNNING ] 
        then 
@@ -241,6 +249,7 @@
 }
 
 status_rip_ip() {
+       check_params
        if $IP addr | $GREP $OCF_RESKEY_ip >/dev/null 
        then
                if $GREP $OCF_RESKEY_ip $RIPDCONF >/dev/null 
@@ -261,11 +270,6 @@
   exit $OCF_ERR_ARGS
 fi
 
-if [ x"$OCF_RESKEY_ip" = x ]
-then
-       ocf_log err "Invalid OCF_RESKEY_ip [$OCF_RESKEY_ip]"
-       exit $OCF_ERR_ARGS
-fi
 
 case $1 in
   start)       start_rip_ip;;




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

Message: 3
Date: Tue, 30 May 2006 01:47:45 -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/pengine


Modified Files:
        complex.c complex.h group.c incarnation.c master.c native.c 
        unpack.c 


Log Message:
OSDL #1276 - Broken clones cause segfaults
  Cleaned up unpack()/free() to better handle broken configurations.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/complex.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -3 -r1.92 -r1.93
--- complex.c   24 May 2006 20:13:34 -0000      1.92
+++ complex.c   30 May 2006 07:47:44 -0000      1.93
@@ -1,4 +1,4 @@
-/* $Id: complex.c,v 1.92 2006/05/24 20:13:34 andrew Exp $ */
+/* $Id: complex.c,v 1.93 2006/05/30 07:47:44 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -252,6 +252,9 @@
                        parent->parameters, dup_attr, (*rsc)->parameters);
        }       
 
+       if((*rsc)->fns->unpack(*rsc, data_set) == FALSE) {
+               return FALSE;
+       }
        (*rsc)->runnable           = TRUE; 
        (*rsc)->provisional        = TRUE; 
        (*rsc)->starting           = FALSE; 
@@ -367,8 +370,6 @@
                    (*rsc)->notify?"required":"not required");
        
 /*     data_set->resources = g_list_append(data_set->resources, (*rsc)); */
-       (*rsc)->fns->unpack(*rsc, data_set);
-
        return TRUE;
 }
 
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/complex.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -3 -r1.35 -r1.36
--- complex.h   23 May 2006 07:45:37 -0000      1.35
+++ complex.h   30 May 2006 07:47:44 -0000      1.36
@@ -1,4 +1,4 @@
-/* $Id: complex.h,v 1.35 2006/05/23 07:45:37 andrew Exp $ */
+/* $Id: complex.h,v 1.36 2006/05/30 07:47:44 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -65,7 +65,7 @@
 
 typedef struct resource_object_functions_s 
 {
-               void (*unpack)(resource_t *, pe_working_set_t *);
+               gboolean (*unpack)(resource_t *, pe_working_set_t *);
                resource_t *(*find_child)(resource_t *, const char *);
                int  (*num_allowed_nodes)(resource_t *);
                color_t *(*color)(resource_t *, pe_working_set_t *);
@@ -106,7 +106,7 @@
 extern char *native_parameter(
        resource_t *rsc, node_t *node, gboolean create, const char *name,
        pe_working_set_t *data_set);
-extern void native_unpack(resource_t *rsc, pe_working_set_t *data_set);
+extern gboolean native_unpack(resource_t *rsc, pe_working_set_t *data_set);
 extern GListPtr native_children(resource_t *rsc);
 extern resource_t *native_find_child(resource_t *rsc, const char *id);
 extern int  native_num_allowed_nodes(resource_t *rsc);
@@ -143,7 +143,7 @@
 extern void native_stonith_ordering(
        resource_t *rsc,  action_t *stonith_op, pe_working_set_t *data_set);
 
-extern void group_unpack(resource_t *rsc, pe_working_set_t *data_set);
+extern gboolean group_unpack(resource_t *rsc, pe_working_set_t *data_set);
 extern GListPtr group_children(resource_t *rsc);
 extern resource_t *group_find_child(resource_t *rsc, const char *id);
 extern int  group_num_allowed_nodes(resource_t *rsc);
@@ -175,7 +175,7 @@
 extern void group_stonith_ordering(
        resource_t *rsc,  action_t *stonith_op, pe_working_set_t *data_set);
 
-extern void clone_unpack(resource_t *rsc, pe_working_set_t *data_set);
+extern gboolean clone_unpack(resource_t *rsc, pe_working_set_t *data_set);
 extern GListPtr clone_children(resource_t *rsc);
 extern resource_t *clone_find_child(resource_t *rsc, const char *id);
 extern int  clone_num_allowed_nodes(resource_t *rsc);
@@ -206,7 +206,7 @@
 extern void clone_stonith_ordering(
        resource_t *rsc,  action_t *stonith_op, pe_working_set_t *data_set);
 
-extern void master_unpack(resource_t *rsc, pe_working_set_t *data_set);
+extern gboolean master_unpack(resource_t *rsc, pe_working_set_t *data_set);
 extern void master_create_actions(resource_t *rsc, pe_working_set_t *data_set);
 extern void master_internal_constraints(
        resource_t *rsc, pe_working_set_t *data_set);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/group.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -3 -r1.62 -r1.63
--- group.c     22 May 2006 08:27:33 -0000      1.62
+++ group.c     30 May 2006 07:47:44 -0000      1.63
@@ -1,4 +1,4 @@
-/* $Id: group.c,v 1.62 2006/05/22 08:27:33 andrew Exp $ */
+/* $Id: group.c,v 1.63 2006/05/30 07:47:44 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -55,7 +55,7 @@
 
 void group_assign_color(resource_t *rsc, color_t *group_color);
 
-void group_unpack(resource_t *rsc, pe_working_set_t *data_set)
+gboolean group_unpack(resource_t *rsc, pe_working_set_t *data_set)
 {
        resource_t *self = NULL;
        crm_data_t *xml_obj = rsc->xml;
@@ -98,7 +98,7 @@
 
        } else {
                crm_log_xml_err(xml_self, "Couldnt unpack dummy child");
-               return;
+               return FALSE;
        }
 
        clone_id = crm_element_value(rsc->xml, XML_RSC_ATTR_INCARNATION);
@@ -112,7 +112,9 @@
                                 rsc, data_set) == FALSE) {
                        pe_err("Failed unpacking resource %s",
                                crm_element_value(xml_obj, XML_ATTR_ID));
-                       continue;
+                       if(new_rsc != NULL && new_rsc->fns != NULL) {
+                               new_rsc->fns->free(new_rsc);
+                       }
                }
 
                group_data->num_children++;
@@ -131,9 +133,16 @@
                group_data->last_child = new_rsc;
                print_resource(LOG_DEBUG_3, "Added", new_rsc, FALSE);
                );
+
+       if(group_data->num_children == 0) {
+               pe_config_err("Group %s did not have any children", rsc->id);
+               return FALSE;
+       }
+       
        crm_debug_3("Added %d children to resource %s...",
-                   group_data->num_children, group_data->self->id);
+                   group_data->num_children, rsc->id);
        
+       return TRUE;
 }
 
 
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/incarnation.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -3 -r1.92 -r1.93
--- incarnation.c       29 May 2006 11:53:53 -0000      1.92
+++ incarnation.c       30 May 2006 07:47:44 -0000      1.93
@@ -1,4 +1,4 @@
-/* $Id: incarnation.c,v 1.92 2006/05/29 11:53:53 andrew Exp $ */
+/* $Id: incarnation.c,v 1.93 2006/05/30 07:47:44 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -108,12 +108,12 @@
        return TRUE;
 }
 
-void clone_unpack(resource_t *rsc, pe_working_set_t *data_set)
+gboolean clone_unpack(resource_t *rsc, pe_working_set_t *data_set)
 {
        int lpc = 0;
-       crm_data_t * xml_tmp = NULL;
-       crm_data_t * xml_obj = rsc->xml;
-       crm_data_t *xml_self = copy_xml(rsc->xml);
+       crm_data_t *xml_tmp = NULL;
+       crm_data_t *xml_self = NULL;
+       crm_data_t *xml_obj = rsc->xml;
        clone_variant_data_t *clone_data = NULL;
        resource_t *self = NULL;
 
@@ -127,8 +127,9 @@
                rsc->meta, XML_RSC_ATTR_INCARNATION_NODEMAX);
 
        crm_debug_3("Processing resource %s...", rsc->id);
-
+       
        crm_malloc0(clone_data, sizeof(clone_variant_data_t));
+       rsc->variant_opaque = clone_data;
        clone_data->child_list  = NULL;
        clone_data->interleave  = FALSE;
        clone_data->ordered     = FALSE;
@@ -141,13 +142,11 @@
        if(clone_data->clone_max < 0) {
                clone_data->clone_max = g_list_length(data_set->nodes);
        }
-       
-       /* this is a bit of a hack - but simplifies everything else */
-       ha_msg_mod(xml_self, F_XML_TAGNAME, XML_CIB_TAG_RESOURCE);
-/*     set_id(xml_self, "self", -1); */
-       xml_tmp = find_xml_node(xml_obj, "operations", FALSE);
-       if(xml_tmp != NULL) {
-               add_node_copy(xml_self, xml_tmp);
+       if(crm_is_true(interleave)) {
+               clone_data->interleave = TRUE;
+       }
+       if(crm_is_true(ordered)) {
+               clone_data->ordered = TRUE;
        }
 
        clone_data->xml_obj_child = find_xml_node(
@@ -158,34 +157,38 @@
                        xml_obj, XML_CIB_TAG_RESOURCE, TRUE);
        }
 
-       CRM_CHECK(clone_data->xml_obj_child != NULL, return);
+       if(clone_data->xml_obj_child == NULL) {
+               pe_config_err("%s has nothing to clone", rsc->id);
+               return FALSE;
+       }
+       
+       xml_self = copy_xml(rsc->xml);
+       /* this is a bit of a hack - but simplifies everything else */
+       ha_msg_mod(xml_self, F_XML_TAGNAME, XML_CIB_TAG_RESOURCE);
+/*     set_id(xml_self, "self", -1); */
+       xml_tmp = find_xml_node(xml_obj, "operations", FALSE);
+       if(xml_tmp != NULL) {
+               add_node_copy(xml_self, xml_tmp);
+       }
 
        if(common_unpack(xml_self, &self, NULL, data_set)) {
                clone_data->self = self;
 
        } else {
                crm_log_xml_err(xml_self, "Couldnt unpack dummy child");
-               return;
+               clone_data->self = self;
+               return FALSE;
        }
        
-       if(crm_is_true(interleave)) {
-               clone_data->interleave = TRUE;
-       }
-       if(crm_is_true(ordered)) {
-               clone_data->ordered = TRUE;
-       }
-
        clone_data->notify_confirm = clone_data->self->notify;
 
-       rsc->variant_opaque = clone_data;
-
-/*     clone_data->gloabally_unique && */
        for(lpc = 0; lpc < clone_data->clone_max; lpc++) {
                create_child_clone(rsc, lpc, data_set);
        }
        
        crm_debug_3("Added %d children to resource %s...",
                    clone_data->clone_max, rsc->id);
+       return TRUE;
 }
 
 resource_t *
@@ -1347,9 +1350,10 @@
        crm_debug_3("Freeing child list");
        pe_free_shallow_adv(clone_data->child_list, FALSE);
 
-       free_xml(clone_data->self->xml);
-       clone_data->self->fns->free(clone_data->self);
-
+       if(clone_data->self) {
+               free_xml(clone_data->self->xml);
+               clone_data->self->fns->free(clone_data->self);
+       }
        common_free(rsc);
 }
 
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/master.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- master.c    29 May 2006 16:01:28 -0000      1.19
+++ master.c    30 May 2006 07:47:44 -0000      1.20
@@ -1,4 +1,4 @@
-/* $Id: master.c,v 1.19 2006/05/29 16:01:28 andrew Exp $ */
+/* $Id: master.c,v 1.20 2006/05/30 07:47:44 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -54,11 +54,11 @@
        CRM_ASSERT(rsc->variant == pe_master);                          \
        data = (clone_variant_data_t *)rsc->variant_opaque;
 
-void master_unpack(resource_t *rsc, pe_working_set_t *data_set)
+gboolean master_unpack(resource_t *rsc, pe_working_set_t *data_set)
 {
        add_hash_param(rsc->parameters, crm_meta_name("stateful"),
                       XML_BOOLEAN_TRUE);
-       clone_unpack(rsc, data_set);
+       return clone_unpack(rsc, data_set);
 }
 
 static void
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/native.c,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -3 -r1.143 -r1.144
--- native.c    26 May 2006 14:53:58 -0000      1.143
+++ native.c    30 May 2006 07:47:44 -0000      1.144
@@ -1,4 +1,4 @@
-/* $Id: native.c,v 1.143 2006/05/26 14:53:58 andrew Exp $ */
+/* $Id: native.c,v 1.144 2006/05/30 07:47:44 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -163,7 +163,7 @@
 }
 
 
-void native_unpack(resource_t *rsc, pe_working_set_t *data_set)
+gboolean native_unpack(resource_t *rsc, pe_working_set_t *data_set)
 {
        native_variant_data_t *native_data = NULL;
 
@@ -175,6 +175,7 @@
        rsc->running_on         = NULL;
 
        rsc->variant_opaque = native_data;
+       return TRUE;
 }
 
                
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/unpack.c,v
retrieving revision 1.196
retrieving revision 1.197
diff -u -3 -r1.196 -r1.197
--- unpack.c    22 May 2006 15:30:06 -0000      1.196
+++ unpack.c    30 May 2006 07:47:44 -0000      1.197
@@ -1,4 +1,4 @@
-/* $Id: unpack.c,v 1.196 2006/05/22 15:30:06 andrew Exp $ */
+/* $Id: unpack.c,v 1.197 2006/05/30 07:47:44 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -341,6 +341,9 @@
                        pe_config_err("Failed unpacking %s %s",
                                      crm_element_name(xml_obj),
                                      crm_element_value(xml_obj, XML_ATTR_ID));
+                       if(new_rsc != NULL && new_rsc->fns != NULL) {
+                               new_rsc->fns->free(new_rsc);
+                       }
                }
                );
        




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

_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


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

Reply via email to