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])
----------------------------------------------------------------------
Message: 1
Date: Mon, 22 May 2006 04:26:20 -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:
actions.c
Log Message:
Need to look for the "meta" version of this attribute name
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/actions.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- actions.c 22 May 2006 08:27:33 -0000 1.29
+++ actions.c 22 May 2006 10:26:20 -0000 1.30
@@ -1,4 +1,4 @@
-/* $Id: actions.c,v 1.29 2006/05/22 08:27:33 andrew Exp $ */
+/* $Id: actions.c,v 1.30 2006/05/22 10:26:20 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -269,10 +269,14 @@
crm_element_name(action->xml), action->id, task_uuid, target);
action_rsc = find_xml_node(action->xml, XML_CIB_TAG_RESOURCE, TRUE);
- CRM_CHECK(action_rsc != NULL, return FALSE);
-
+ if(action_rsc == NULL) {
+ return FALSE;
+ }
+
rsc_id = ID(action_rsc);
- CRM_CHECK(rsc_id != NULL, return FALSE);
+ CRM_CHECK(rsc_id != NULL,
+ crm_log_xml_err(action->xml, "Bad:action");
+ return FALSE);
code = crm_itoa(status);
@@ -408,7 +412,7 @@
#endif
action->executed = TRUE;
- 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(crm_is_true(value)) {
crm_debug("Skipping wait for %d", action->id);
action->confirmed = TRUE;
------------------------------
Message: 2
Date: Mon, 22 May 2006 04:52:44 -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:
Support meta_attributes in the DTD
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crm-1.0.dtd,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -3 -r1.67 -r1.68
--- crm-1.0.dtd 22 May 2006 07:16:32 -0000 1.67
+++ crm-1.0.dtd 22 May 2006 10:52:43 -0000 1.68
@@ -72,7 +72,7 @@
<!-- Annotated version -->
<!ELEMENT operations (op*)>
-<!ELEMENT op (instance_attributes*)>
+<!ELEMENT op (meta_attributes*, instance_attributes*)>
<!ATTLIST op
id CDATA #REQUIRED
name CDATA #REQUIRED
@@ -85,7 +85,7 @@
on_fail (nothing|block|stop|restart|fence) #IMPLIED>
<!-- Annotated version -->
-<!ELEMENT group (instance_attributes*, primitive+)>
+<!ELEMENT group (meta_attributes*, instance_attributes*, primitive+)>
<!ATTLIST group
id CDATA #REQUIRED
description CDATA #IMPLIED
@@ -97,7 +97,7 @@
ordered (true|1|false|0) 'true'
collocated (true|1|false|0) 'true'>
-<!ELEMENT clone (instance_attributes*, (primitive|group))>
+<!ELEMENT clone (meta_attributes*, instance_attributes*, (primitive|group))>
<!ATTLIST clone
id CDATA #REQUIRED
description CDATA #IMPLIED
@@ -113,7 +113,7 @@
interleave (true|1|false|0) 'false'>
-<!ELEMENT master_slave (instance_attributes*, (primitive|group))>
+<!ELEMENT master_slave (meta_attributes*, instance_attributes*,
(primitive|group))>
<!ATTLIST master_slave
id CDATA #REQUIRED
description CDATA #IMPLIED
@@ -133,6 +133,11 @@
<!ATTLIST instance_attributes
id CDATA #REQUIRED
score CDATA #IMPLIED>
+
+<!ELEMENT meta_attributes (rule*, attributes)>
+<!ATTLIST meta_attributes
+ id CDATA #REQUIRED
+ score CDATA #IMPLIED>
<!-- Annotated version -->
<!ELEMENT constraints (rsc_order|rsc_colocation|rsc_location)*>
------------------------------
Message: 3
Date: Mon, 22 May 2006 04:55:16 -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:
graph.c
Log Message:
Include meta attributes (for the resource and action) in the action definition
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/graph.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -3 -r1.88 -r1.89
--- graph.c 22 May 2006 08:27:33 -0000 1.88
+++ graph.c 22 May 2006 10:55:16 -0000 1.89
@@ -1,4 +1,4 @@
-/* $Id: graph.c,v 1.88 2006/05/22 08:27:33 andrew Exp $ */
+/* $Id: graph.c,v 1.89 2006/05/22 10:55:16 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -410,22 +410,21 @@
crm_xml_add(rsc_xml, attr_list[lpc],
g_hash_table_lookup(action->rsc->meta,
attr_list[lpc]));
}
-
- args_xml = create_xml_node(action_xml, XML_TAG_ATTRS);
- crm_xml_add(args_xml, XML_ATTR_CRM_VERSION, CRM_FEATURE_SET);
+ }
- g_hash_table_foreach(
- action->rsc->parameters, hash2field, args_xml);
+ args_xml = create_xml_node(action_xml, XML_TAG_ATTRS);
+ crm_xml_add(args_xml, XML_ATTR_CRM_VERSION, CRM_FEATURE_SET);
- g_hash_table_foreach(action->extra, hash2field, args_xml);
-/* g_hash_table_foreach(action->meta, hash2metafield, args_xml); */
- g_hash_table_foreach(action->meta, hash2field, args_xml);
-
- } else {
- args_xml = create_xml_node(action_xml, XML_TAG_ATTRS);
- crm_xml_add(args_xml, XML_ATTR_CRM_VERSION, CRM_FEATURE_SET);
- g_hash_table_foreach(action->meta, hash2metafield, args_xml);
+ g_hash_table_foreach(action->extra, hash2field, args_xml);
+ if(action->rsc != NULL) {
+ g_hash_table_foreach(action->rsc->parameters, hash2field,
args_xml);
}
+
+ g_hash_table_foreach(action->meta, hash2metafield, args_xml);
+ if(action->rsc != NULL) {
+ g_hash_table_foreach(action->rsc->meta, hash2metafield,
args_xml);
+ }
+
crm_log_xml_debug_2(action_xml, "dumped action");
return action_xml;
------------------------------
Message: 4
Date: Mon, 22 May 2006 04:56:01 -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:
utils.c
Log Message:
Generically unpack action meta-attributes
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/utils.c,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -3 -r1.137 -r1.138
--- utils.c 22 May 2006 08:27:33 -0000 1.137
+++ utils.c 22 May 2006 10:56:01 -0000 1.138
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.137 2006/05/22 08:27:33 andrew Exp $ */
+/* $Id: utils.c,v 1.138 2006/05/22 10:56:01 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -989,9 +989,22 @@
if(xml_obj == NULL) {
return;
}
+
+ xml_prop_iter(xml_obj, p_name, p_value,
+ if(p_value != NULL) {
+ g_hash_table_insert(action->meta, crm_strdup(p_name),
+ crm_strdup(p_value));
+ }
+ );
+
+ unpack_instance_attributes(xml_obj, XML_TAG_META_SETS,
+ NULL, action->meta, NULL,0, data_set);
+ unpack_instance_attributes(xml_obj, XML_TAG_ATTR_SETS,
+ NULL, action->meta, NULL,0, data_set);
+
for(;lpc < DIMOF(fields); lpc++) {
- value = crm_element_value(xml_obj, fields[lpc]);
+ value = g_hash_table_lookup(action->meta, fields[lpc]);
if(value != NULL) {
char *tmp_ms = NULL;
int tmp_i = crm_get_msec(value);
@@ -999,7 +1012,7 @@
tmp_i = 0;
}
tmp_ms = crm_itoa(tmp_i);
- g_hash_table_insert(
+ g_hash_table_replace(
action->meta, crm_strdup(fields[lpc]), tmp_ms);
}
}
------------------------------
_______________________________________________
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 67
********************************************