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: resources by xunsun 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: Fri, 17 Feb 2006 06:33:08 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by xunsun from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : xunsun
Host :
Project : linux-ha
Module : resources
Dir : linux-ha/resources/OCF
Modified Files:
MailTo.in
Log Message:
Put date in mail subject (Joachim Banzhaf <[EMAIL PROTECTED]>)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/OCF/MailTo.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- MailTo.in 20 Dec 2005 08:34:47 -0000 1.5
+++ MailTo.in 17 Feb 2006 13:33:08 -0000 1.6
@@ -39,7 +39,7 @@
usage() {
echo "Usage: $0 {start|stop|status|monitor|meta-data|validate-all}"
- echo "$Id: MailTo.in,v 1.5 2005/12/20 08:34:47 zhenh Exp $"
+ echo "$Id: MailTo.in,v 1.6 2006/02/17 13:33:08 xunsun Exp $"
}
meta_data() {
@@ -105,7 +105,7 @@
MailToStart() {
- Subject="`SubjectLine $subject` Takeover in progress on $us"
+ Subject="`SubjectLine $subject` Takeover in progress at `date` on $us"
MailProgram "$Subject" $1
touch $MAILTOFILE
@@ -113,7 +113,7 @@
}
MailToStop () {
- Subject="`SubjectLine $subject` Migrating resource away from $us"
+ Subject="`SubjectLine $subject` Migrating resource away at `date` from
$us"
MailProgram "$Subject" $1
rm -f $MAILTOFILE
------------------------------
Message: 2
Date: Fri, 17 Feb 2006 06:34:03 -0700 (MST)
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:
fsa_matrix.h
Log Message:
Never invoke the PE for anything other than a I_PE_INVOKE
We always need to wait for the TE first.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/fsa_matrix.h,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -3 -r1.66 -r1.67
--- fsa_matrix.h 16 Feb 2006 15:22:09 -0000 1.66
+++ fsa_matrix.h 17 Feb 2006 13:34:03 -0000 1.67
@@ -1029,19 +1029,19 @@
/* Got an I_SHUTDOWN */
{
- /* S_IDLE ==> */
A_LOG|A_SHUTDOWN_REQ|A_PE_INVOKE,
+ /* S_IDLE ==> */ A_LOG|A_SHUTDOWN_REQ,
/* S_ELECTION ==> */
A_LOG|A_SHUTDOWN_REQ|A_ELECTION_VOTE,
/* S_INTEGRATION ==> */ A_LOG|A_SHUTDOWN_REQ,
/* S_FINALIZE_JOIN ==> */ A_LOG|A_SHUTDOWN_REQ,
/* S_NOT_DC ==> */ A_SHUTDOWN_REQ,
- /* S_POLICY_ENGINE ==> */
A_LOG|A_SHUTDOWN_REQ|A_PE_INVOKE,
+ /* S_POLICY_ENGINE ==> */ A_LOG|A_SHUTDOWN_REQ,
/* S_RECOVERY ==> */ A_WARN|A_SHUTDOWN|O_RELEASE,
/* S_RELEASE_DC ==> */ A_WARN|A_SHUTDOWN_REQ,
/* S_STARTING ==> */ A_ERROR|A_SHUTDOWN_REQ,
/* S_PENDING ==> */ A_SHUTDOWN_REQ,
/* S_STOPPING ==> */ A_LOG,
/* S_TERMINATE ==> */ A_LOG,
- /* S_TRANSITION_ENGINE ==> */ A_WARN|A_PE_INVOKE,
+ /* S_TRANSITION_ENGINE ==> */ A_WARN,
/* S_HALT ==> */
A_WARN|A_ELECTION_START|A_SHUTDOWN_REQ,
},
------------------------------
Message: 3
Date: Fri, 17 Feb 2006 07:44:03 -0700 (MST)
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:
unpack.c
Log Message:
Make sure the node_state fields are set correctly at all times.
Rework how the node_state fields are used to detect failed nodes.
------------------------------
Message: 4
Date: Fri, 17 Feb 2006 07:44:04 -0700 (MST)
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:
ccm.c cib.c crmd_fsa.h join_dc.c
Log Message:
Make sure the node_state fields are set correctly at all times.
Rework how the node_state fields are used to detect failed nodes.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/ccm.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -3 -r1.99 -r1.100
--- ccm.c 16 Feb 2006 15:15:13 -0000 1.99
+++ ccm.c 17 Feb 2006 14:44:03 -0000 1.100
@@ -1,4 +1,4 @@
-/* $Id: ccm.c,v 1.99 2006/02/16 15:15:13 andrew Exp $ */
+/* $Id: ccm.c,v 1.100 2006/02/17 14:44:03 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -474,7 +474,7 @@
if(cur_state != S_STOPPING) {
crm_debug_3("Updating the CIB from CCM cache");
- do_update_cib_nodes(NULL, FALSE);
+ do_update_cib_nodes(FALSE);
}
/* Membership changed, remind everyone we're here.
@@ -590,13 +590,30 @@
gboolean overwrite_join;
};
-crm_data_t*
-do_update_cib_nodes(crm_data_t *updates, gboolean overwrite)
+static void
+ccm_node_update_complete(const HA_Message *msg, int call_id, int rc,
+ crm_data_t *output, void *user_data)
{
+ fsa_data_t *msg_data = NULL;
+
+ if(rc == cib_ok) {
+ crm_debug("Node update %d complete", call_id);
+
+ } else {
+ crm_err("Node update %d failed", call_id);
+ crm_log_message(LOG_DEBUG, msg);
+ register_fsa_error(C_FSA_INTERNAL, I_ERROR, NULL);
+ }
+}
+
+
+void
+do_update_cib_nodes(gboolean overwrite)
+{
+ int call_id = 0;
int call_options = cib_scope_local|cib_quorum_override;
struct update_data_s update_data;
- crm_data_t *fragment = updates;
- crm_data_t *tmp = NULL;
+ crm_data_t *fragment = NULL;
if(fsa_membership_copy == NULL) {
/* We got a replace notification before being connected to
@@ -604,40 +621,18 @@
* So there is no need to update the local CIB with our values
* - since we have none.
*/
- return NULL;
+ return;
}
- if(updates == NULL) {
- fragment = create_cib_fragment(NULL, NULL);
- crm_xml_add(fragment, XML_ATTR_SECTION, XML_CIB_TAG_STATUS);
- }
-
-#if CRM_DEPRECATED_SINCE_2_0_4
- if(safe_str_eq(crm_element_name(fragment), XML_TAG_CIB)) {
- tmp = fragment;
- } else {
- tmp = find_xml_node(fragment, XML_TAG_CIB, TRUE);
- }
-#else
- tmp = fragment;
- CRM_DEV_ASSERT(safe_str_eq(crm_element_name(tmp), XML_TAG_CIB));
-#endif
-
- tmp = get_object_root(XML_CIB_TAG_STATUS, tmp);
- CRM_DEV_ASSERT(tmp != NULL);
+ fragment = create_xml_node(NULL, XML_CIB_TAG_STATUS);
- update_data.updates = tmp;
+ update_data.updates = fragment;
update_data.state = XML_BOOLEAN_YES;
- update_data.overwrite_join = FALSE;
+ update_data.overwrite_join = overwrite;
- if(overwrite) {
- crm_debug_2("Performing a join update based on CCM data");
- update_data.overwrite_join = TRUE;
-
- } else {
+ if(overwrite == FALSE) {
call_options = call_options|cib_inhibit_bcast;
crm_debug_2("Inhibiting bcast for membership updates");
-
}
/* live nodes */
@@ -653,13 +648,11 @@
ghash_update_cib_node, &update_data);
}
- if(update_data.updates != NULL) {
- fsa_cib_conn->cmds->update(fsa_cib_conn, XML_CIB_TAG_STATUS,
- fragment, NULL, call_options);
- free_xml(fragment);
- }
-
- return NULL;
+ call_id = fsa_cib_conn->cmds->update(
+ fsa_cib_conn, XML_CIB_TAG_STATUS, fragment, NULL,call_options);
+
+ add_cib_op_callback(call_id, FALSE, NULL, ccm_node_update_complete);
+ free_xml(fragment);
}
void
@@ -678,14 +671,21 @@
peer_online = g_hash_table_lookup(crmd_peer_state, node_uname);
if(data->overwrite_join) {
- if(safe_str_eq(peer_online, ONLINESTATUS)) {
- join = CRMD_JOINSTATE_PENDING;
- } else {
+ if(safe_str_neq(peer_online, ONLINESTATUS)) {
join = CRMD_STATE_INACTIVE;
+
+ } else {
+ const char *peer_member = g_hash_table_lookup(
+ confirmed_nodes, node_uname);
+ if(peer_member != NULL) {
+ join = CRMD_JOINSTATE_MEMBER;
+ } else {
+ join = CRMD_JOINSTATE_PENDING;
+ }
}
}
- tmp1 = create_node_state(node_uname, NULL, data->state, NULL,
+ tmp1 = create_node_state(node_uname, NULL, data->state, peer_online,
join, NULL, FALSE, __FUNCTION__);
add_node_copy(data->updates, tmp1);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/cib.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -3 -r1.46 -r1.47
--- cib.c 14 Feb 2006 11:53:48 -0000 1.46
+++ cib.c 17 Feb 2006 14:44:03 -0000 1.47
@@ -116,7 +116,7 @@
do_cib_replaced(const char *event, HA_Message *msg)
{
crm_debug("Updating the CIB after a replace");
- do_update_cib_nodes(NULL, FALSE);
+ do_update_cib_nodes(AM_I_DC);
fsa_cluster_conn->llc_ops->client_status(
fsa_cluster_conn, NULL, CRM_SYSTEM_CRMD, -1);
}
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/crmd_fsa.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- crmd_fsa.h 14 Feb 2006 11:55:07 -0000 1.47
+++ crmd_fsa.h 17 Feb 2006 14:44:03 -0000 1.48
@@ -1,4 +1,4 @@
-/* $Id: crmd_fsa.h,v 1.47 2006/02/14 11:55:07 andrew Exp $ */
+/* $Id: crmd_fsa.h,v 1.48 2006/02/17 14:44:03 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -144,7 +144,7 @@
extern GHashTable *crmd_peer_state;
/* these two should be moved elsewhere... */
-extern crm_data_t *do_update_cib_nodes(crm_data_t *updates, gboolean
overwrite);
+extern void do_update_cib_nodes(gboolean overwrite);
extern gboolean do_dc_heartbeat(gpointer data);
gboolean add_cib_op_callback(
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/join_dc.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -3 -r1.77 -r1.78
--- join_dc.c 12 Jan 2006 15:10:08 -0000 1.77
+++ join_dc.c 17 Feb 2006 14:44:03 -0000 1.78
@@ -143,10 +143,9 @@
* any nodes that are active in the CIB but not in the CCM list
* will be seen as offline by the PE anyway
*/
- do_update_cib_nodes(NULL, TRUE);
-
current_join_id++;
initialize_join(TRUE);
+ do_update_cib_nodes(TRUE);
g_hash_table_foreach(
fsa_membership_copy->members, join_make_offer, NULL);
@@ -389,7 +388,6 @@
finalize_join(const char *caller)
{
crm_data_t *cib = createEmptyCib();
- crm_data_t *cib_update = NULL;
set_bit_inplace(fsa_input_register, R_HAVE_CIB);
clear_bit_inplace(fsa_input_register, R_CIB_ASKED);
@@ -398,11 +396,9 @@
crm_debug_3("Update %s in the CIB to our uuid: %s",
XML_ATTR_DC_UUID, crm_element_value(cib, XML_ATTR_DC_UUID));
- cib_update = create_cib_fragment(cib, XML_TAG_CIB);
fsa_cib_conn->cmds->update(
- fsa_cib_conn, NULL, cib_update, NULL, cib_quorum_override);
+ fsa_cib_conn, NULL, cib, NULL, cib_quorum_override);
- free_xml(cib_update);
free_xml(cib);
crm_debug_3("Bumping the epoch and syncing to %d clients",
@@ -432,6 +428,7 @@
fsa_data_t *msg_data = NULL;
if(rc == cib_ok) {
+ crm_debug("Join update %d complete", call_id);
check_join_state(fsa_state, __FUNCTION__);
} else {
@@ -511,7 +508,8 @@
fsa_cib_conn, XML_CIB_TAG_STATUS, join_ack->xml, NULL,
cib_scope_local|cib_quorum_override);
- add_cib_op_callback(call_id, TRUE,NULL, join_update_complete_callback);
+ add_cib_op_callback(
+ call_id, FALSE, NULL, join_update_complete_callback);
crm_debug("join-%d: Registered callback for LRM update %d",
join_id, call_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 27, Issue 76
********************************************