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: cts by andrew from
([email protected])
3. Linux-HA CVS: crm by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Mon, 20 Feb 2006 12:11:34 -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:
callbacks.c lrm.c
Log Message:
Fix for crashes found by debltc
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/callbacks.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -3 -r1.108 -r1.109
--- callbacks.c 20 Feb 2006 11:39:46 -0000 1.108
+++ callbacks.c 20 Feb 2006 19:11:33 -0000 1.109
@@ -264,6 +264,7 @@
+extern GCHSource *lrm_source;
gboolean
lrm_dispatch(IPC_Channel *src_not_used, gpointer user_data)
@@ -280,11 +281,12 @@
crm_crit("LRM Connection failed");
register_fsa_input(C_FSA_INTERNAL, I_ERROR, NULL);
clear_bit_inplace(fsa_input_register, R_LRM_CONNECTED);
-
+
} else {
crm_info("LRM Connection disconnected");
}
+ lrm_source = NULL;
return FALSE;
}
return TRUE;
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/lrm.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -3 -r1.166 -r1.167
--- lrm.c 18 Feb 2006 12:41:19 -0000 1.166
+++ lrm.c 20 Feb 2006 19:11:33 -0000 1.167
@@ -164,7 +164,7 @@
return "<unknown>";
}
-static GCHSource *lrm_source = NULL;
+GCHSource *lrm_source = NULL;
/* A_LRM_CONNECT */
enum crmd_fsa_input
@@ -177,18 +177,19 @@
int ret = HA_OK;
if(action & A_LRM_DISCONNECT) {
- if(fsa_lrm_conn) {
- gboolean removed = FALSE;
+ if(lrm_source) {
crm_debug("Removing LRM connection from MainLoop");
- removed = G_main_del_IPC_Channel(lrm_source);
- if(removed == FALSE) {
+ if(G_main_del_IPC_Channel(lrm_source) == FALSE) {
crm_err("Could not remove LRM connection"
" from MainLoop");
}
lrm_source = NULL;
+ }
+ if(fsa_lrm_conn) {
fsa_lrm_conn->lrm_ops->signoff(fsa_lrm_conn);
crm_info("Disconnected from the LRM");
clear_bit_inplace(fsa_input_register, R_LRM_CONNECTED);
+ fsa_lrm_conn = NULL;
}
/* TODO: Clean up the hashtable */
}
------------------------------
Message: 2
Date: Tue, 21 Feb 2006 07:38:09 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cts by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : cts
Dir : linux-ha/cts
Modified Files:
CM_LinuxHAv2.py.in
Log Message:
Better quorum check
- I'm sure I've seen a node thats actually down asked quorum state
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CM_LinuxHAv2.py.in,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -3 -r1.135 -r1.136
--- CM_LinuxHAv2.py.in 20 Feb 2006 16:28:38 -0000 1.135
+++ CM_LinuxHAv2.py.in 21 Feb 2006 14:38:08 -0000 1.136
@@ -598,7 +598,13 @@
for node in node_list:
if self.ShouldBeStatus[node] == self["up"]:
quorum = self.rsh.readaline(node, self["QuorumCmd"])
- return string.find(quorum,"1") != -1
+ if string.find(quorum, "1") != -1:
+ return 1
+ elif string.find(quorum, "0") != -1:
+ return 0
+ else:
+ self.log("WARN: Unexpected quorum test result from "+ node
+":"+ quorum)
+
return 0
def Components(self):
complist = [Process("lrmd",self),Process("crmd",self)]
------------------------------
Message: 3
Date: Tue, 21 Feb 2006 07:39:45 -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/cib
Modified Files:
messages.c cibmessages.h
Log Message:
New "shutdown" message handler, not hooked up yet
Remove a bunch of redundant code
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/messages.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -3 -r1.66 -r1.67
--- messages.c 19 Feb 2006 19:59:06 -0000 1.66
+++ messages.c 21 Feb 2006 14:39:44 -0000 1.67
@@ -1,4 +1,4 @@
-/* $Id: messages.c,v 1.66 2006/02/19 19:59:06 andrew Exp $ */
+/* $Id: messages.c,v 1.67 2006/02/21 14:39:44 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -58,10 +58,6 @@
crm_data_t *local_cib, crm_data_t *update_command, crm_data_t *failed,
int operation, const char *section);
-#if CRM_DEPRECATED_SINCE_2_0_4
-crm_data_t *createCibFragmentAnswer(const char *section, crm_data_t *failed);
-#endif
-
enum cib_errors replace_section(
const char *section, crm_data_t *tmpCib, crm_data_t *command);
@@ -75,6 +71,38 @@
enum cib_errors sync_our_cib(HA_Message *request, gboolean all);
+extern ll_cluster_t *hb_conn;
+extern HA_Message *cib_msg_copy(const HA_Message *msg, gboolean with_data);
+extern gboolean cib_shutdown_flag;
+extern void terminate_ha_connection(const char *caller);
+
+enum cib_errors
+cib_process_shutdown_req(
+ const char *op, int options, const char *section, crm_data_t *input,
+ crm_data_t *existing_cib, crm_data_t **result_cib, crm_data_t **answer)
+{
+ enum cib_errors result = cib_ok;
+ const char *host = cl_get_string(input, F_ORIG);
+
+ *answer = NULL;
+
+ if(cl_get_string(input, F_CIB_ISREPLY) == NULL) {
+ crm_info("Shutdown REQ from %s", host);
+ return cib_ok;
+
+ } else if(cib_shutdown_flag) {
+ crm_info("Shutdown ACK from %s", host);
+ terminate_ha_connection(__FUNCTION__);
+ return cib_ok;
+
+ } else {
+ crm_err("Shutdown ACK from %s - not shutting down",host);
+ result = cib_unknown;
+ }
+
+ return result;
+}
+
enum cib_errors
cib_process_default(
const char *op, int options, const char *section, crm_data_t *input,
@@ -211,9 +239,6 @@
cib_update_counter(*result_cib, XML_ATTR_NUMUPDATES, TRUE);
}
-#if CRM_DEPRECATED_SINCE_2_0_4
- *answer = createCibFragmentAnswer(NULL, NULL);
-#endif
return result;
}
@@ -233,15 +258,9 @@
cib_update_counter(*result_cib, XML_ATTR_GENERATION, FALSE);
cib_update_counter(*result_cib, XML_ATTR_NUMUPDATES, FALSE);
-#if CRM_DEPRECATED_SINCE_2_0_4
- *answer = createCibFragmentAnswer(NULL, NULL);
-#endif
return result;
}
-extern ll_cluster_t *hb_conn;
-extern HA_Message *cib_msg_copy(const HA_Message *msg, gboolean with_data);
-
enum cib_errors
cib_process_sync(
const char *op, int options, const char *section, crm_data_t *input,
@@ -457,7 +476,8 @@
gboolean verbose = FALSE;
enum cib_errors result = cib_ok;
- crm_debug_2("Processing \"%s\" event for section=%s", op,
crm_str(section));
+ crm_debug_2("Processing \"%s\" event for section=%s",
+ op, crm_str(section));
*answer = NULL;
if (options & cib_verbose) {
@@ -532,11 +552,6 @@
cib_update_counter(*result_cib, XML_ATTR_NUMUPDATES, FALSE);
}
-#if CRM_DEPRECATED_SINCE_2_0_4
- if (verbose || result != cib_ok) {
- *answer = createCibFragmentAnswer(section, NULL);
- }
-#endif
return result;
}
@@ -775,45 +790,6 @@
return rc;
}
-#if CRM_DEPRECATED_SINCE_2_0_4
-crm_data_t*
-createCibFragmentAnswer(const char *section, crm_data_t *failed)
-{
- crm_data_t *cib = NULL;
- crm_data_t *fragment = NULL;
-
- fragment = create_xml_node(NULL, XML_TAG_FRAGMENT);
-
- if (section == NULL
- || strlen(section) == 0
- || strcmp(XML_CIB_TAG_SECTION_ALL, section) == 0) {
-
- cib = get_the_CIB();
- if(cib != NULL) {
- add_node_copy(fragment, get_the_CIB());
- }
-
- } else {
- crm_data_t *obj_root = get_object_root(section, get_the_CIB());
-
- if(obj_root != NULL) {
- cib = create_xml_node(fragment, XML_TAG_CIB);
-
- add_node_copy(cib, obj_root);
- copy_in_properties(cib, get_the_CIB());
- }
- }
-
- if (failed != NULL && xml_has_children(failed)) {
- add_node_copy(fragment, failed);
- }
-
- crm_xml_add(fragment, XML_ATTR_SECTION, section);
- crm_xml_add(fragment, "generated_on", cib_our_uname);
- return fragment;
-}
-#endif
-
gboolean
check_generation(crm_data_t *newCib, crm_data_t *oldCib)
{
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/cibmessages.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- cibmessages.h 12 Oct 2005 18:28:22 -0000 1.9
+++ cibmessages.h 21 Feb 2006 14:39:44 -0000 1.10
@@ -1,4 +1,4 @@
-/* $Id: cibmessages.h,v 1.9 2005/10/12 18:28:22 andrew Exp $ */
+/* $Id: cibmessages.h,v 1.10 2006/02/21 14:39:44 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -24,6 +24,11 @@
gboolean isLocal, const char *operation, const char *section,
const char *verbose, crm_data_t *data);
+extern enum cib_errors
+cib_process_shutdown_req(
+ const char *op, int options, const char *section, crm_data_t *input,
+ crm_data_t *existing_cib, crm_data_t **result_cib, crm_data_t **answer);
+
extern enum cib_errors cib_process_default(
const char *op, int options, const char *section, crm_data_t *input,
crm_data_t *existing_cib, crm_data_t **result_cib, crm_data_t **answer);
------------------------------
_______________________________________________
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 89
********************************************