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: lib by andrew from
([email protected])
3. Linux-HA CVS: include by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Mon, 22 May 2006 02:27:34 -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/tengine
Modified Files:
events.c actions.c
Log Message:
Differentiate between parameters that the admin supplied for the RA and
paramters that tell us how the resource should behave (ie. colocated)
as well as parameters we synthesize (ie. notify_operation)
The new approach also means that resource attributes will not show up in the
list of parameters (which can cause resource restarts if changed)
If we so choose, we can also give them to the RA with an extra prefix
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/events.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- events.c 5 May 2006 13:15:15 -0000 1.16
+++ events.c 22 May 2006 08:27:33 -0000 1.17
@@ -1,4 +1,4 @@
-/* $Id: events.c,v 1.16 2006/05/05 13:15:15 andrew Exp $ */
+/* $Id: events.c,v 1.17 2006/05/22 08:27:33 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -293,7 +293,7 @@
stop_te_timer(action->timer);
action->confirmed = TRUE;
- target_rc_s = g_hash_table_lookup(action->params,XML_ATTR_TE_TARGET_RC);
+ target_rc_s =
g_hash_table_lookup(action->params,crm_meta_name(XML_ATTR_TE_TARGET_RC));
if(target_rc_s != NULL) {
crm_debug_2("Target rc: %s vs. %d", target_rc_s, op_rc_i);
target_rc = crm_parse_int(target_rc_s, NULL);
@@ -355,7 +355,7 @@
if(action->failed) {
allow_fail = g_hash_table_lookup(
- action->params, XML_ATTR_TE_ALLOWFAIL);
+ action->params, crm_meta_name(XML_ATTR_TE_ALLOWFAIL));
if(crm_is_true(allow_fail)) {
action->failed = FALSE;
}
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/actions.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- actions.c 8 May 2006 10:32:42 -0000 1.28
+++ actions.c 22 May 2006 08:27:33 -0000 1.29
@@ -1,4 +1,4 @@
-/* $Id: actions.c,v 1.28 2006/05/08 10:32:42 andrew Exp $ */
+/* $Id: actions.c,v 1.29 2006/05/22 08:27:33 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -195,7 +195,7 @@
ret = send_ipc_message(crm_ch, cmd);
crm_free(counter);
- value = g_hash_table_lookup(action->params, XML_ATTR_TE_NOWAIT);
+ value = g_hash_table_lookup(action->params,
crm_meta_name(XML_ATTR_TE_NOWAIT));
if(ret == FALSE) {
crm_err("Action %d failed: send", action->id);
return FALSE;
@@ -315,6 +315,7 @@
crm_free(op_id);
crm_xml_add(xml_op, XML_LRM_ATTR_TASK, task);
+ crm_xml_add(xml_op, XML_ATTR_CRM_VERSION, CRM_FEATURE_SET);
crm_xml_add(xml_op, XML_LRM_ATTR_OPSTATUS, code);
crm_xml_add(xml_op, XML_LRM_ATTR_CALLID, "-1");
crm_xml_add_int(xml_op, XML_LRM_ATTR_INTERVAL, action->interval);
@@ -334,7 +335,7 @@
params = find_xml_node(action->xml, "attributes", TRUE);
params = copy_xml(params);
- filter_action_parameters(params, NULL);
+ filter_action_parameters(params, CRM_FEATURE_SET);
digest = calculate_xml_digest(params, TRUE);
crm_xml_add(xml_op, XML_LRM_ATTR_OP_DIGEST, digest);
crm_free(digest);
------------------------------
Message: 2
Date: Mon, 22 May 2006 02:31:53 -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/common
Modified Files:
utils.c
Log Message:
Ignore fields with the special meta prefix (for when we turn it on)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/common/utils.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- utils.c 11 May 2006 09:54:25 -0000 1.51
+++ utils.c 22 May 2006 08:31:53 -0000 1.52
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.51 2006/05/11 09:54:25 andrew Exp $ */
+/* $Id: utils.c,v 1.52 2006/05/22 08:31:53 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -1069,31 +1069,31 @@
void
filter_action_parameters(crm_data_t *param_set, const char *version)
{
- const char *attr_filter[] = {
- XML_ATTR_ID,
- XML_LRM_ATTR_OP_DIGEST,
+#if CRM_DEPRECATED_SINCE_2_0_5
+ const char *filter_205[] = {
XML_ATTR_TE_TARGET_RC,
XML_ATTR_LRM_PROBE,
XML_RSC_ATTR_START,
XML_RSC_ATTR_NOTIFY,
XML_RSC_ATTR_UNIQUE,
XML_RSC_ATTR_MANAGED,
- XML_ATTR_CRM_VERSION,
XML_RSC_ATTR_PRIORITY,
XML_RSC_ATTR_MULTIPLE,
XML_RSC_ATTR_STICKINESS,
XML_RSC_ATTR_FAIL_STICKINESS,
XML_RSC_ATTR_TARGET_ROLE,
-
+
/* ignore clone fields */
XML_RSC_ATTR_INCARNATION,
XML_RSC_ATTR_INCARNATION_MAX,
XML_RSC_ATTR_INCARNATION_NODEMAX,
XML_RSC_ATTR_MASTER_MAX,
XML_RSC_ATTR_MASTER_NODEMAX,
-
-/* ignore master fields */
+
+/* old field names */
+ "role",
"crm_role",
+ "te-target-rc",
/* ignore notify fields */
"notify_stop_resource",
@@ -1111,18 +1111,51 @@
"notify_master_resource",
"notify_master_uname",
"notify_slave_resource",
- "notify_slave_uname",
+ "notify_slave_uname"
+ };
+#endif
+
+ const char *attr_filter[] = {
+ XML_ATTR_ID,
+ XML_ATTR_CRM_VERSION,
+ XML_LRM_ATTR_OP_DIGEST,
};
int lpc = 0;
-
+ static int meta_len = 0;
+ if(meta_len == 0) {
+ meta_len = strlen(CRM_META);
+ }
+
if(param_set == NULL) {
return;
}
+
+#if CRM_DEPRECATED_SINCE_2_0_5
+/* if(version == NULL) { */
+ for(lpc = 0; lpc < DIMOF(filter_205); lpc++) {
+ xml_remove_prop(param_set, filter_205[lpc]);
+ }
+/* } */
+#endif
for(lpc = 0; lpc < DIMOF(attr_filter); lpc++) {
xml_remove_prop(param_set, attr_filter[lpc]);
- }
+ }
+
+ xml_prop_iter(param_set, prop_name, prop_value,
+ gboolean do_delete = FALSE;
+ if(strncasecmp(prop_name, CRM_META, meta_len) == 0) {
+ do_delete = TRUE;
+ }
+
+ if(do_delete) {
+ /* remove it */
+ xml_remove_prop(param_set, prop_name);
+ /* unwind the counetr */
+ __counter--;
+ }
+ );
}
gboolean
------------------------------
Message: 3
Date: Mon, 22 May 2006 02:33:26 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: include by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : include
Dir : linux-ha/include/crm
Modified Files:
msg_xml.h
Log Message:
New tag for meta attributes
Change the names of some internal fields (TE use only)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/crm/msg_xml.h,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -3 -r1.53 -r1.54
--- msg_xml.h 5 May 2006 12:55:41 -0000 1.53
+++ msg_xml.h 22 May 2006 08:33:25 -0000 1.54
@@ -1,4 +1,4 @@
-/* $Id: msg_xml.h,v 1.53 2006/05/05 12:55:41 andrew Exp $ */
+/* $Id: msg_xml.h,v 1.54 2006/05/22 08:33:25 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -120,6 +120,7 @@
#define XML_CIB_TAG_PROPSET "cluster_property_set"
#define XML_TAG_ATTR_SETS "instance_attributes"
+#define XML_TAG_META_SETS "meta_attributes"
#define XML_TAG_ATTRS "attributes"
#define XML_TAG_PARAMS "parameters"
@@ -241,9 +242,9 @@
#define XML_ATTR_TRANSITION_MAGIC "transition_magic"
#define XML_ATTR_TRANSITION_KEY "transition_key"
-#define XML_ATTR_TE_NOWAIT "te-no-wait"
-#define XML_ATTR_TE_TARGET_RC "te-target-rc"
-#define XML_ATTR_TE_ALLOWFAIL "te-allow-fail"
+#define XML_ATTR_TE_NOWAIT "op_no_wait"
+#define XML_ATTR_TE_TARGET_RC "op_target_rc"
+#define XML_ATTR_TE_ALLOWFAIL "op_allow_fail"
#define XML_ATTR_LRM_PROBE "lrm-is-probe"
#define XML_TAG_TRANSIENT_NODEATTRS "transient_attributes"
------------------------------
_______________________________________________
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 66
********************************************