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: crm by andrew from (linux-ha-cvs@lists.linux-ha.org) 2. Linux-HA CVS: lib by andrew 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: lib by andrew from (linux-ha-cvs@lists.linux-ha.org) ---------------------------------------------------------------------- Message: 1 Date: Wed, 21 Jun 2006 08:53:48 -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: allocate.c Log Message: Log a couple of configuration errors =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/allocate.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- allocate.c 21 Jun 2006 09:50:04 -0000 1.8 +++ allocate.c 21 Jun 2006 14:53:48 -0000 1.9 @@ -1,4 +1,4 @@ -/* $Id: allocate.c,v 1.8 2006/06/21 09:50:04 andrew Exp $ */ +/* $Id: allocate.c,v 1.9 2006/06/21 14:53:48 andrew Exp $ */ /* * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]> * @@ -1151,6 +1151,7 @@ gboolean unpack_rsc_location(crm_data_t * xml_obj, pe_working_set_t *data_set) { + gboolean empty = TRUE; const char *id_lh = crm_element_value(xml_obj, "rsc"); const char *id = crm_element_value(xml_obj, XML_ATTR_ID); resource_t *rsc_lh = pe_find_resource(data_set->resources, id_lh); @@ -1168,9 +1169,16 @@ xml_child_iter_filter( xml_obj, rule_xml, XML_TAG_RULE, + empty = FALSE; crm_debug_2("Unpacking %s/%s", id, ID(rule_xml)); generate_location_rule(rsc_lh, rule_xml, data_set); ); + + if(empty) { + pe_config_err("Invalid location constraint %s:" + " rsc_location must contain at least one rule", + ID(xml_obj)); + } return TRUE; } ------------------------------ Message: 2 Date: Wed, 21 Jun 2006 08:53:48 -0600 (MDT) From: linux-ha-cvs@lists.linux-ha.org 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/pengine Modified Files: rules.c Log Message: Log a couple of configuration errors =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/pengine/rules.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- rules.c 7 Jun 2006 12:46:56 -0000 1.2 +++ rules.c 21 Jun 2006 14:53:48 -0000 1.3 @@ -1,4 +1,4 @@ -/* $Id: rules.c,v 1.2 2006/06/07 12:46:56 andrew Exp $ */ +/* $Id: rules.c,v 1.3 2006/06/21 14:53:48 andrew Exp $ */ /* * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]> * @@ -56,6 +56,7 @@ ha_time_t *now) { gboolean test = TRUE; + gboolean empty = TRUE; gboolean passed = TRUE; gboolean do_and = TRUE; @@ -69,6 +70,7 @@ xml_child_iter( rule, expr, test = test_expression(expr, node_hash, role, now); + empty = FALSE; if(test && do_and == FALSE) { crm_debug_3("Expression %s/%s passed", @@ -81,7 +83,11 @@ return FALSE; } ); - + + if(empty) { + crm_err("Invalid Rule %s: rules must contain at least one expression", ID(rule)); + } + crm_debug_2("Rule %s %s", ID(rule), passed?"passed":"failed"); return passed; } ------------------------------ Message: 3 Date: Wed, 21 Jun 2006 09:40:51 -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/testcases Added Files: inc10.dot inc10.exp inc10.xml Log Message: Anonymous clone regression test ------------------------------ Message: 4 Date: Wed, 21 Jun 2006 09:56:49 -0600 (MDT) From: linux-ha-cvs@lists.linux-ha.org 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/pengine Modified Files: status.c unpack.c Log Message: Fix a memory leak when overwriting clone_name Set clone_name back to NULL when a previous match turned out to be for a stopped resource and the current match is for a resource of the same name. =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/pengine/status.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- status.c 8 Jun 2006 16:53:01 -0000 1.4 +++ status.c 21 Jun 2006 15:56:49 -0000 1.5 @@ -1,4 +1,4 @@ -/* $Id: status.c,v 1.4 2006/06/08 16:53:01 andrew Exp $ */ +/* $Id: status.c,v 1.5 2006/06/21 15:56:49 andrew Exp $ */ /* * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]> * @@ -262,6 +262,10 @@ } else if(safe_str_eq(rsc->long_name, id)) { crm_debug_4("Found a match for %s", id); return rsc; + + } else if(safe_str_eq(rsc->clone_name, id)) { + crm_debug_4("Found a match for %s", id); + return rsc; } } for(lpc = 0; lpc < g_list_length(rsc_list); lpc++) { @@ -269,9 +273,6 @@ child_rsc = rsc->fns->find_child(rsc, id); if(child_rsc != NULL) { - crm_debug_4("Found a match for %s in %s", - id, rsc->id); - return child_rsc; } } =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/pengine/unpack.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- unpack.c 21 Jun 2006 14:48:01 -0000 1.8 +++ unpack.c 21 Jun 2006 15:56:49 -0000 1.9 @@ -1,4 +1,4 @@ -/* $Id: unpack.c,v 1.8 2006/06/21 14:48:01 andrew Exp $ */ +/* $Id: unpack.c,v 1.9 2006/06/21 15:56:49 andrew Exp $ */ /* * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]> * @@ -640,8 +640,6 @@ crm_info("Making sure orphan %s/%s is stopped on %s", rsc_id, rsc->id, node->details->uname); resource_location(rsc, NULL, -INFINITY, "__orphan_clone_dont_run__", data_set); - rsc->clone_name = crm_strdup(rsc_id); - crm_debug("Set clone name %s for orphan %s", rsc->clone_name, rsc->id); } break; @@ -666,13 +664,21 @@ } } crm_free(alt_rsc_id); - if(is_duped_clone && rsc != NULL) { - crm_info("Internally renamed %s on %s to %s", - rsc_id, node->details->uname, rsc->id); - rsc->clone_name = crm_strdup(rsc_id); - crm_debug("Set clone name %s for %s", rsc->clone_name, rsc->id); - + if(rsc != NULL) { + crm_free(rsc->clone_name); + rsc->clone_name = NULL; + if(is_duped_clone) { + crm_info("Internally renamed %s on %s to %s", + rsc_id, node->details->uname, rsc->id); + rsc->clone_name = crm_strdup(rsc_id); + + } else { + crm_debug_2("Resetting clone_name %s for %s because of %s", + rsc->clone_name, rsc->id, rsc_id); + } } + + return rsc; } ------------------------------ _______________________________________________ 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 31, Issue 75 ********************************************