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: tools by andrew from
([email protected])
4. Linux-HA CVS: lib by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Mon, 10 Apr 2006 07:01:21 -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/cib
Modified Files:
messages.c
Log Message:
Remove a bunch of code that used fragments unnecessarily
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/messages.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -3 -r1.73 -r1.74
--- messages.c 3 Apr 2006 15:58:42 -0000 1.73
+++ messages.c 10 Apr 2006 13:01:21 -0000 1.74
@@ -1,4 +1,4 @@
-/* $Id: messages.c,v 1.73 2006/04/03 15:58:42 andrew Exp $ */
+/* $Id: messages.c,v 1.74 2006/04/10 13:01:21 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -898,11 +898,10 @@
const char *host = cl_get_string(request, F_ORIG);
const char *op = cl_get_string(request, F_CIB_OPERATION);
- crm_data_t *sync_data = create_cib_fragment(the_cib,XML_TAG_CIB);
HA_Message *replace_request = cib_msg_copy(request, FALSE);
- CRM_DEV_ASSERT(sync_data != NULL);
- CRM_DEV_ASSERT(replace_request != NULL);
+ CRM_CHECK(the_cib != NULL, ;);
+ CRM_CHECK(replace_request != NULL, ;);
crm_info("Syncing CIB to %s", all?"all peers":host);
if(all == FALSE && host == NULL) {
@@ -922,12 +921,11 @@
ha_msg_mod(replace_request, F_CIB_OPERATION, CIB_OP_REPLACE);
ha_msg_add(replace_request, "original_"F_CIB_OPERATION, op);
ha_msg_add(replace_request, F_CIB_GLOBAL_UPDATE, XML_BOOLEAN_TRUE);
- add_message_xml(replace_request, F_CIB_CALLDATA, sync_data);
+ add_message_xml(replace_request, F_CIB_CALLDATA, the_cib);
if(send_ha_message(hb_conn, replace_request, all?NULL:host, FALSE) ==
FALSE) {
result = cib_not_connected;
}
ha_msg_del(replace_request);
- free_xml(sync_data);
return result;
}
------------------------------
Message: 2
Date: Mon, 10 Apr 2006 07:01:22 -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/crmd
Modified Files:
callbacks.c election.c lrm.c
Log Message:
Remove a bunch of code that used fragments unnecessarily
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/callbacks.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -3 -r1.114 -r1.115
--- callbacks.c 7 Apr 2006 15:41:36 -0000 1.114
+++ callbacks.c 10 Apr 2006 13:01:21 -0000 1.115
@@ -375,7 +375,6 @@
register_fsa_input(C_CRMD_STATUS_CALLBACK, I_ELECTION, NULL);
} else {
- crm_data_t *fragment = NULL;
crm_debug_3("Got client status callback");
update = create_node_state(
node, NULL, NULL, status, join,
@@ -386,16 +385,13 @@
XML_TAG_TRANSIENT_NODEATTRS);
}
- fragment = create_cib_fragment(update, XML_CIB_TAG_STATUS);
-
/* it is safe to keep these updates on the local node
* each node updates their own CIB
*/
fsa_cib_conn->cmds->update(
- fsa_cib_conn, XML_CIB_TAG_STATUS, fragment, NULL,
+ fsa_cib_conn, XML_CIB_TAG_STATUS, update, NULL,
cib_inhibit_bcast|cib_scope_local|cib_quorum_override);
- free_xml(fragment);
free_xml(update);
if(AM_I_DC && safe_str_eq(status, OFFLINESTATUS)) {
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/election.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -3 -r1.109 -r1.110
--- election.c 9 Apr 2006 14:38:05 -0000 1.109
+++ election.c 10 Apr 2006 13:01:21 -0000 1.110
@@ -371,7 +371,6 @@
{
int rc = cib_ok;
crm_data_t *cib = NULL;
- crm_data_t *fragment = NULL;
crm_info("Taking over DC status for this partition");
set_bit_inplace(fsa_input_register, R_THE_DC);
@@ -391,13 +390,11 @@
cib = createEmptyCib();
crm_xml_add(cib, XML_ATTR_CRM_VERSION, CRM_FEATURE_SET);
crm_xml_add(cib, XML_ATTR_CIB_REVISION, CIB_FEATURE_SET);
- fragment = create_cib_fragment(cib, XML_TAG_CIB);
fsa_cib_conn->cmds->update(
- fsa_cib_conn, NULL, fragment, NULL, cib_quorum_override);
+ fsa_cib_conn, XML_TAG_CIB, cib, NULL, cib_quorum_override);
add_cib_op_callback(rc, FALSE, NULL, feature_update_callback);
free_xml(cib);
- free_xml(fragment);
return I_NULL;
}
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/lrm.c,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -3 -r1.183 -r1.184
--- lrm.c 9 Apr 2006 17:01:58 -0000 1.183
+++ lrm.c 10 Apr 2006 13:01:21 -0000 1.184
@@ -1346,7 +1346,6 @@
</...>
*/
int rc = cib_ok;
- crm_data_t *fragment;
crm_data_t *update, *iter;
CRM_DEV_ASSERT(op != NULL);
@@ -1378,7 +1377,6 @@
}
build_operation_update(iter, op, __FUNCTION__, 0);
- fragment = create_cib_fragment(update, XML_CIB_TAG_STATUS);
/* make it an asyncronous call and be done with it
*
@@ -1398,7 +1396,7 @@
* isnt acceptable
*/
rc = fsa_cib_conn->cmds->update(
- fsa_cib_conn, XML_CIB_TAG_STATUS, fragment, NULL,
+ fsa_cib_conn, XML_CIB_TAG_STATUS, update, NULL,
cib_quorum_override);
if(rc > 0) {
@@ -1411,7 +1409,6 @@
CRM_DEV_ASSERT(rc == cib_ok);
}
- free_xml(fragment);
free_xml(update);
}
------------------------------
Message: 3
Date: Mon, 10 Apr 2006 07:02:09 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: tools by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : tools
Dir : linux-ha/tools
Modified Files:
attrd.c
Log Message:
logging
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/tools/attrd.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- attrd.c 10 Apr 2006 12:51:37 -0000 1.3
+++ attrd.c 10 Apr 2006 13:02:09 -0000 1.4
@@ -1,4 +1,4 @@
-/* $Id: attrd.c,v 1.3 2006/04/10 12:51:37 andrew Exp $ */
+/* $Id: attrd.c,v 1.4 2006/04/10 13:02:09 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -165,7 +165,7 @@
msg = msgfromIPC_noauth(client);
if (msg == NULL) {
- crm_err("%s: no message this time", curr_client->id);
+ crm_debug("%s: no message this time", curr_client->id);
continue;
}
------------------------------
Message: 4
Date: Mon, 10 Apr 2006 07:05:55 -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/cib
Modified Files:
cib_attrs.c
Log Message:
Only do the read (which is blocking) if we need to match the current value
with the one provided
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/cib/cib_attrs.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- cib_attrs.c 10 Apr 2006 12:48:43 -0000 1.22
+++ cib_attrs.c 10 Apr 2006 13:05:55 -0000 1.23
@@ -1,4 +1,4 @@
-/* $Id: cib_attrs.c,v 1.22 2006/04/10 12:48:43 andrew Exp $ */
+/* $Id: cib_attrs.c,v 1.23 2006/04/10 13:05:55 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -316,26 +316,27 @@
const char *section, const char *node_uuid, const char *set_name,
const char *attr_id, const char *attr_name, const char *attr_value)
{
- char *tmp = NULL;
enum cib_errors rc = cib_ok;
crm_data_t *xml_obj = NULL;
const char *tag = NULL;
attr_common_setup(section);
-
- rc = read_attr(the_cib, section, node_uuid, set_name,
- attr_id, attr_name, &tmp);
-
- if(rc != cib_ok) {
- return rc;
- } else if(attr_value != NULL
- && safe_str_neq(attr_value, tmp)) {
+ if(attr_value != NULL) {
+ char *tmp = NULL;
+ rc = read_attr(the_cib, section, node_uuid, set_name,
+ attr_id, attr_name, &tmp);
+
+ if(rc != cib_ok) {
+ return rc;
+
+ } else if(safe_str_neq(attr_value, tmp)) {
+ crm_free(tmp);
+ crm_free(local_attr_id);
+ return cib_NOTEXISTS;
+ }
crm_free(tmp);
- crm_free(local_attr_id);
- return cib_NOTEXISTS;
}
- crm_free(tmp);
xml_obj = create_xml_node(NULL, XML_CIB_TAG_NVPAIR);
crm_xml_add(xml_obj, XML_ATTR_ID, attr_id);
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 29, Issue 66
********************************************