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])
----------------------------------------------------------------------
Message: 1
Date: Tue, 30 May 2006 02:54:33 -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 native.c pe_utils.h stages.c unpack.c utils.c
Log Message:
Cleanup the application of node scores so that they are only applied once
Print the color's winner and the runner-up for people running ptest.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/complex.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -3 -r1.93 -r1.94
--- complex.c 30 May 2006 07:47:44 -0000 1.93
+++ complex.c 30 May 2006 08:54:32 -0000 1.94
@@ -1,4 +1,4 @@
-/* $Id: complex.c,v 1.93 2006/05/30 07:47:44 andrew Exp $ */
+/* $Id: complex.c,v 1.94 2006/05/30 08:54:32 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -363,7 +363,7 @@
} else if(data_set->symmetric_cluster) {
rsc_to_node_t *new_con = rsc2node_new(
"symmetric_default", *rsc, 0, NULL, data_set);
- new_con->node_list_rh = node_list_dup(data_set->nodes, FALSE);
+ new_con->node_list_rh = node_list_dup(data_set->nodes, TRUE,
FALSE);
}
crm_debug_2("\tAction notification: %s",
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/native.c,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -3 -r1.144 -r1.145
--- native.c 30 May 2006 07:47:44 -0000 1.144
+++ native.c 30 May 2006 08:54:32 -0000 1.145
@@ -1,4 +1,4 @@
-/* $Id: native.c,v 1.144 2006/05/30 07:47:44 andrew Exp $ */
+/* $Id: native.c,v 1.145 2006/05/30 08:54:32 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -922,14 +922,8 @@
pe_free_shallow(rsc->allowed_nodes);
rsc->allowed_nodes = or_list;
-
- slist_iter(node_rh, node_t, constraint->node_list_rh, lpc,
- native_update_node_weight(rsc, constraint, node_rh,
- rsc->allowed_nodes)
- );
-
+
print_resource(LOG_DEBUG_3, "after update: ", rsc, TRUE);
-
}
void native_expand(resource_t *rsc, pe_working_set_t *data_set)
@@ -1457,6 +1451,9 @@
return;
}
+ crm_debug_3("Constraint %s, node %s, rsc %s: %d + %d",
+ cons->id, node_rh->details->uname, rsc->id,
+ node_rh->weight, cons_node->weight);
node_rh->weight = merge_weights(node_rh->weight, cons_node->weight);
if(node_rh->weight <= -INFINITY) {
crm_debug_3("Constraint %s (-INFINITY): node %s weight %d
(%s).",
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/pe_utils.h,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -3 -r1.45 -r1.46
--- pe_utils.h 5 May 2006 13:08:49 -0000 1.45
+++ pe_utils.h 30 May 2006 08:54:32 -0000 1.46
@@ -1,4 +1,4 @@
-/* $Id: pe_utils.h,v 1.45 2006/05/05 13:08:49 andrew Exp $ */
+/* $Id: pe_utils.h,v 1.46 2006/05/30 08:54:32 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -47,7 +47,7 @@
/* Binary like operators for lists of nodes */
-extern GListPtr node_list_dup(GListPtr list1, gboolean filter);
+extern GListPtr node_list_dup(GListPtr list1, gboolean reset, gboolean filter);
extern GListPtr node_list_and(GListPtr list1, GListPtr list2, gboolean filter);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/stages.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -3 -r1.99 -r1.100
--- stages.c 26 May 2006 14:53:58 -0000 1.99
+++ stages.c 30 May 2006 08:54:32 -0000 1.100
@@ -1,4 +1,4 @@
-/* $Id: stages.c,v 1.99 2006/05/26 14:53:58 andrew Exp $ */
+/* $Id: stages.c,v 1.100 2006/05/30 08:54:32 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -537,8 +537,9 @@
return FALSE;
}
-
slist_iter(candidate, node_t, nodes, lpc,
+ crm_debug("Color %d, Node %s: %d", color->id,
+ candidate->details->uname, candidate->weight);
if(chosen->weight > 0
&& candidate->details->unclean == FALSE
&& candidate->weight == chosen->weight) {
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/unpack.c,v
retrieving revision 1.197
retrieving revision 1.198
diff -u -3 -r1.197 -r1.198
--- unpack.c 30 May 2006 07:47:44 -0000 1.197
+++ unpack.c 30 May 2006 08:54:33 -0000 1.198
@@ -1,4 +1,4 @@
-/* $Id: unpack.c,v 1.197 2006/05/30 07:47:44 andrew Exp $ */
+/* $Id: unpack.c,v 1.198 2006/05/30 08:54:33 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -2000,7 +2000,7 @@
location_rule->role_filter = text2role(role);
}
if(do_and) {
- match_L = node_list_dup(data_set->nodes, FALSE);
+ match_L = node_list_dup(data_set->nodes, TRUE, FALSE);
slist_iter(
node, node_t, match_L, lpc,
node->weight = score_f;
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/utils.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -3 -r1.138 -r1.139
--- utils.c 22 May 2006 10:56:01 -0000 1.138
+++ utils.c 30 May 2006 08:54:33 -0000 1.139
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.138 2006/05/22 10:56:01 andrew Exp $ */
+/* $Id: utils.c,v 1.139 2006/05/30 08:54:33 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -132,11 +132,11 @@
if(other_node != NULL) {
new_node = node_copy(node);
- crm_debug_3("Copied node %s: %d",
- new_node->details->uname, new_node->weight);
}
if(new_node != NULL) {
+ crm_debug_4("%s: %d + %d", node->details->uname,
+ other_node->weight, new_node->weight);
new_node->weight = merge_weights(
new_node->weight, other_node->weight);
@@ -229,7 +229,7 @@
GListPtr result = NULL;
gboolean needs_filter = FALSE;
- result = node_list_dup(list1, filter);
+ result = node_list_dup(list1, FALSE, filter);
slist_iter(
node, node_t, list2, lpc,
@@ -242,6 +242,10 @@
result, node->details->id);
if(other_node != NULL) {
+ crm_debug_4("%s + %s: %d + %d",
+ node->details->uname,
+ other_node->details->uname,
+ node->weight, other_node->weight);
other_node->weight = merge_weights(
other_node->weight, node->weight);
@@ -258,7 +262,7 @@
/* not the neatest way, but the most expedient for now */
if(filter && needs_filter) {
GListPtr old_result = result;
- result = node_list_dup(old_result, filter);
+ result = node_list_dup(old_result, FALSE, filter);
pe_free_shallow_adv(old_result, TRUE);
}
@@ -267,7 +271,7 @@
}
GListPtr
-node_list_dup(GListPtr list1, gboolean filter)
+node_list_dup(GListPtr list1, gboolean reset, gboolean filter)
{
GListPtr result = NULL;
@@ -279,6 +283,9 @@
}
new_node = node_copy(this_node);
+ if(reset) {
+ new_node->weight = 0;
+ }
if(new_node != NULL) {
result = g_list_append(result, new_node);
}
@@ -351,7 +358,7 @@
crm_debug_5("populating node list");
new_color->details->highest_priority = resource->priority;
new_color->details->candidate_nodes =
- node_list_dup(node_list, TRUE);
+ node_list_dup(node_list, TRUE, TRUE);
}
crm_action_debug_3(print_color("Created color", new_color, TRUE));
@@ -1839,6 +1846,7 @@
result = -INFINITY;
}
+ crm_debug_5("%d + %d = %d", w1, w2, result);
return result;
}
------------------------------
Message: 2
Date: Tue, 30 May 2006 02:55:43 -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:
stages.c
Log Message:
Color 0 is never colorable (its the "cant run" color)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/stages.c,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -3 -r1.100 -r1.101
--- stages.c 30 May 2006 08:54:32 -0000 1.100
+++ stages.c 30 May 2006 08:55:43 -0000 1.101
@@ -1,4 +1,4 @@
-/* $Id: stages.c,v 1.100 2006/05/30 08:54:32 andrew Exp $ */
+/* $Id: stages.c,v 1.101 2006/05/30 08:55:43 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -521,7 +521,9 @@
color->details->pending = FALSE;
if(chosen == NULL) {
- crm_debug("Could not allocate a node for color %d", color->id);
+ if(color->id != 0) {
+ crm_debug("Could not allocate a node for color %d",
color->id);
+ }
return FALSE;
} else if(chosen->details->unclean || chosen->details->shutdown) {
------------------------------
_______________________________________________
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 102
*********************************************