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: crm by andrew from
([email protected])
3. Linux-HA CVS: crm by andrew from
([email protected])
4. Linux-HA CVS: crm by andrew from
([email protected])
5. Linux-HA CVS: lib by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Fri, 16 Jun 2006 01:28:35 -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
Modified Files:
crm-1.0.dtd
Log Message:
Assuming rsc_order(A,B), in addition to ordering B after A, allow B to be
configurably blocked if A cannot run.
This is achieved by setting rsc_order->score > 0
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crm-1.0.dtd,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -3 -r1.75 -r1.76
--- crm-1.0.dtd 12 Jun 2006 16:02:25 -0000 1.75
+++ crm-1.0.dtd 16 Jun 2006 07:28:34 -0000 1.76
@@ -148,6 +148,7 @@
to CDATA #REQUIRED
action (start|stop) 'start'
type (before|after) 'after'
+ score CDATA '0'
symmetrical (true|1|false|0) 'true'>
<!-- Annotated version -->
------------------------------
Message: 2
Date: Fri, 16 Jun 2006 01:28:35 -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/testcases
Added Files:
order7.dot order7.exp order7.xml
Log Message:
Assuming rsc_order(A,B), in addition to ordering B after A, allow B to be
configurably blocked if A cannot run.
This is achieved by setting rsc_order->score > 0
------------------------------
Message: 3
Date: Fri, 16 Jun 2006 02:09:10 -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/testcases
Added Files:
attrs8.dot attrs8.exp attrs8.xml
Log Message:
Fix for processing of score_attribute in rsc_location rules.
We attempted to use the attribute name as an int, not the attribute's value
- bug pointed out by Dejan
Fix for rsc_location rules when boolean_op=and
- rsc_location->score was not being applied
Added regression test
------------------------------
Message: 4
Date: Fri, 16 Jun 2006 02:09:10 -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:
allocate.c regression.sh
Log Message:
Fix for processing of score_attribute in rsc_location rules.
We attempted to use the attribute name as an int, not the attribute's value
- bug pointed out by Dejan
Fix for rsc_location rules when boolean_op=and
- rsc_location->score was not being applied
Added regression test
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/allocate.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- allocate.c 16 Jun 2006 07:28:34 -0000 1.5
+++ allocate.c 16 Jun 2006 08:09:09 -0000 1.6
@@ -1,4 +1,4 @@
-/* $Id: allocate.c,v 1.5 2006/06/16 07:28:34 andrew Exp $ */
+/* $Id: allocate.c,v 1.6 2006/06/16 08:09:09 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -1218,7 +1218,6 @@
raw_score = FALSE;
}
}
-
if(safe_str_eq(boolean, "or")) {
do_and = FALSE;
}
@@ -1272,21 +1271,27 @@
" for %s",
node->details->uname, score);
} else {
- score_f = char2score(score);
+ crm_debug_2("node %s had value %s for
%s",
+ node->details->uname,
attr_score, score);
+ score_f = char2score(attr_score);
}
}
- if(!do_and && accept) {
+ if(accept) {
node_t *local = pe_find_node_id(
match_L, node->details->id);
- if(local == NULL) {
+ if(local == NULL && do_and) {
+ continue;
+
+ } else if(local == NULL) {
local = node_copy(node);
match_L = g_list_append(match_L, local);
}
+
local->weight = merge_weights(
local->weight, score_f);
- crm_debug_5("node %s already matched",
- node->details->uname);
+ crm_debug_3("node %s now has weight %d",
+ node->details->uname,local->weight);
} else if(do_and && !accept) {
/* remove it */
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/regression.sh,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -3 -r1.84 -r1.85
--- regression.sh 16 Jun 2006 07:28:34 -0000 1.84
+++ regression.sh 16 Jun 2006 08:09:10 -0000 1.85
@@ -101,6 +101,7 @@
do_test attrs5 "string: not_exists "
do_test attrs6 "is_dc: true "
do_test attrs7 "is_dc: false "
+do_test attrs8 "score_attribute "
echo ""
do_test mon-rsc-1 "Schedule Monitor - start"
------------------------------
Message: 5
Date: Fri, 16 Jun 2006 03:29:11 -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/pengine
Modified Files:
unpack.c
Log Message:
OSDL #1281: Handle anonymous clone renaming correctly when we have too many
instances in the status section
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/pengine/unpack.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- unpack.c 8 Jun 2006 13:39:10 -0000 1.4
+++ unpack.c 16 Jun 2006 09:29:10 -0000 1.5
@@ -1,4 +1,4 @@
-/* $Id: unpack.c,v 1.4 2006/06/08 13:39:10 andrew Exp $ */
+/* $Id: unpack.c,v 1.5 2006/06/16 09:29:10 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -607,8 +607,24 @@
}
static resource_t *
+create_fake_resource(const char *rsc_id, crm_data_t *rsc_entry,
pe_working_set_t *data_set)
+{
+ resource_t *rsc = NULL;
+ crm_data_t *xml_rsc = create_xml_node(NULL, XML_CIB_TAG_RESOURCE);
+ crm_log_xml_info(rsc_entry, "Orphan resource");
+ copy_in_properties(xml_rsc, rsc_entry);
+ crm_xml_add(xml_rsc, XML_ATTR_ID, rsc_id);
+
+ common_unpack(xml_rsc, &rsc, NULL, data_set);
+ rsc->orphan = TRUE;
+
+ data_set->resources = g_list_append(data_set->resources, rsc);
+ return rsc;
+}
+
+static resource_t *
unpack_find_resource(
- pe_working_set_t *data_set, node_t *node, const char *rsc_id)
+ pe_working_set_t *data_set, node_t *node, const char *rsc_id,
crm_data_t *rsc_entry)
{
resource_t *rsc = NULL;
gboolean is_duped_clone = FALSE;
@@ -619,7 +635,13 @@
rsc = pe_find_resource(data_set->resources, alt_rsc_id);
/* no match */
if(rsc == NULL) {
- crm_debug_3("not found");
+ crm_err("%s not found: %d", alt_rsc_id, is_duped_clone);
+ if(is_duped_clone) {
+ /* create one */
+ rsc = create_fake_resource(alt_rsc_id,
rsc_entry, data_set);
+ crm_info("Making sure orphan %s is stopped",
rsc->id);
+ resource_location(rsc, NULL, -INFINITY,
"__orphan_clone_dont_run__", data_set);
+ }
break;
/* not running anywhere else */
@@ -655,27 +677,14 @@
process_orphan_resource(crm_data_t *rsc_entry, node_t *node, pe_working_set_t
*data_set)
{
resource_t *rsc = NULL;
- gboolean is_duped_clone = FALSE;
const char *rsc_id = crm_element_value(rsc_entry, XML_ATTR_ID);
- crm_data_t *xml_rsc = create_xml_node(NULL, XML_CIB_TAG_RESOURCE);
crm_log_xml_info(rsc_entry, "Orphan resource");
-
pe_config_warn("Nothing known about resource %s running on %s",
rsc_id, node->details->uname);
-
- if(pe_find_resource(data_set->resources, rsc_id) != NULL) {
- is_duped_clone = TRUE;
- }
-
- copy_in_properties(xml_rsc, rsc_entry);
-
- common_unpack(xml_rsc, &rsc, NULL, data_set);
- rsc->orphan = TRUE;
-
- data_set->resources = g_list_append(data_set->resources, rsc);
+ rsc = create_fake_resource(rsc_id, rsc_entry, data_set);
- if(data_set->stop_rsc_orphans == FALSE && is_duped_clone == FALSE) {
+ if(data_set->stop_rsc_orphans == FALSE) {
rsc->is_managed = FALSE;
} else {
@@ -770,7 +779,7 @@
enum action_fail_response on_fail = FALSE;
enum rsc_role_e saved_role = RSC_ROLE_UNKNOWN;
- resource_t *rsc = unpack_find_resource(data_set, node, rsc_id);
+ resource_t *rsc = unpack_find_resource(data_set, node, rsc_id,
rsc_entry);
crm_debug_3("[%s] Processing %s on %s",
crm_element_name(rsc_entry), rsc_id, node->details->uname);
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 31, Issue 51
********************************************