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: Thu, 9 Feb 2006 22:18:22 -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:
callbacks.c
Log Message:
1080: Always wait for the TE to exit before shutting down
Always wait for in-flight actions to complete before exiting the TE
The TE cannot wait for the DC to shutdown, tell it so from the PE
Use SIGTERM instead of SIGKILL to "force" a client to exit
Put crmd children in their own process group so the SIGTERM from
Heartbeat isnt delivered to them
1084: Make sure our send queue to Heartbeat is empty and give Heartbeat
time to send them out
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/callbacks.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -3 -r1.105 -r1.106
--- callbacks.c 8 Feb 2006 22:12:06 -0000 1.105
+++ callbacks.c 10 Feb 2006 05:18:21 -0000 1.106
@@ -1,4 +1,4 @@
-/* $Id: callbacks.c,v 1.105 2006/02/08 22:12:06 andrew Exp $ */
+/* $Id: callbacks.c,v 1.106 2006/02/10 05:18:21 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -1324,8 +1324,20 @@
if(keep_connection == FALSE
&& cib_shutdown_flag
&& g_hash_table_size(client_list) == 0) {
- crm_info("All clients disconnected");
+ IPC_Channel *ipc = NULL;
+ crm_info("All clients disconnected... flushing updates");
+ /* wait for HA messages to be sent */
+ if(hb_conn != NULL) {
+ ipc = hb_conn->llc_ops->ipcchan(hb_conn);
+ }
+ if(ipc != NULL) {
+ ipc->ops->waitout(ipc);
+ /* BUG: give heartbeat time to send our messages out */
+ sleep(2);
+ }
+
+ crm_info("Updates flushed... exiting");
if (mainloop != NULL && g_main_is_running(mainloop)) {
g_main_quit(mainloop);
------------------------------
Message: 2
Date: Thu, 9 Feb 2006 22:18:22 -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:
stages.c
Log Message:
1080: Always wait for the TE to exit before shutting down
Always wait for in-flight actions to complete before exiting the TE
The TE cannot wait for the DC to shutdown, tell it so from the PE
Use SIGTERM instead of SIGKILL to "force" a client to exit
Put crmd children in their own process group so the SIGTERM from
Heartbeat isnt delivered to them
1084: Make sure our send queue to Heartbeat is empty and give Heartbeat
time to send them out
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/stages.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -3 -r1.85 -r1.86
--- stages.c 13 Jan 2006 10:31:14 -0000 1.85
+++ stages.c 10 Feb 2006 05:18:22 -0000 1.86
@@ -1,4 +1,4 @@
-/* $Id: stages.c,v 1.85 2006/01/13 10:31:14 andrew Exp $ */
+/* $Id: stages.c,v 1.86 2006/02/10 05:18:22 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -370,6 +370,9 @@
crm_debug_2("Ordering shutdowns before %s on %s (DC)",
down_op->task, down_op->node->details->uname);
+
+ add_hash_param(dc_down->extra, XML_ATTR_TE_NOWAIT,
+ XML_BOOLEAN_TRUE);
slist_iter(
action, action_t, shutdown_matches, lpc,
------------------------------
Message: 3
Date: Thu, 9 Feb 2006 22:18:22 -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:
subsystems.c
Log Message:
1080: Always wait for the TE to exit before shutting down
Always wait for in-flight actions to complete before exiting the TE
The TE cannot wait for the DC to shutdown, tell it so from the PE
Use SIGTERM instead of SIGKILL to "force" a client to exit
Put crmd children in their own process group so the SIGTERM from
Heartbeat isnt delivered to them
1084: Make sure our send queue to Heartbeat is empty and give Heartbeat
time to send them out
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/subsystems.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -3 -r1.91 -r1.92
--- subsystems.c 9 Feb 2006 13:16:52 -0000 1.91
+++ subsystems.c 10 Feb 2006 05:18:22 -0000 1.92
@@ -109,7 +109,7 @@
crm_warn("Stopping %s before it had connected",
the_subsystem->name);
- CL_KILL(the_subsystem->pid, SIGKILL);
+ CL_KILL(the_subsystem->pid, SIGTERM);
the_subsystem->pid = -1;
} else if(client_channel == NULL
@@ -118,8 +118,7 @@
crm_debug("Client %s has already quit", the_subsystem->name);
} else if(force_quit) {
- CL_KILL(the_subsystem->pid, SIGKILL);
- the_subsystem->pid = -1;
+ CL_KILL(the_subsystem->pid, SIGTERM);
} else {
HA_Message *quit = create_request(
@@ -187,6 +186,10 @@
return TRUE;
case 0: /* Child */
+ /* create a new process group to avoid
+ * being interupted by heartbeat
+ */
+ setpgid(0, 0);
break;
}
------------------------------
Message: 4
Date: Thu, 9 Feb 2006 22:18:22 -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/tengine
Modified Files:
callbacks.c main.c utils.c
Log Message:
1080: Always wait for the TE to exit before shutting down
Always wait for in-flight actions to complete before exiting the TE
The TE cannot wait for the DC to shutdown, tell it so from the PE
Use SIGTERM instead of SIGKILL to "force" a client to exit
Put crmd children in their own process group so the SIGTERM from
Heartbeat isnt delivered to them
1084: Make sure our send queue to Heartbeat is empty and give Heartbeat
time to send them out
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/callbacks.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -3 -r1.60 -r1.61
--- callbacks.c 3 Feb 2006 08:29:22 -0000 1.60
+++ callbacks.c 10 Feb 2006 05:18:22 -0000 1.61
@@ -1,4 +1,4 @@
-/* $Id: callbacks.c,v 1.60 2006/02/03 08:29:22 andrew Exp $ */
+/* $Id: callbacks.c,v 1.61 2006/02/10 05:18:22 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -39,6 +39,7 @@
extern char *te_uuid;
extern int transition_counter;
+gboolean shuttingdown = FALSE;
void
te_update_diff(const char *event, HA_Message *msg)
@@ -406,7 +407,11 @@
crm_info("Received quit message, terminating");
/* wait for pending actions to complete? */
print_state(LOG_INFO);
- exit(0);
+ shuttingdown = TRUE;
+ if(te_fsa_state == s_idle) {
+ crm_info("Exiting an idle TEngine");
+ exit(LSB_EXIT_OK);
+ }
} else {
crm_err("Unknown command: %s::%s from %s", type, op, sys_from);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/main.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- main.c 24 Oct 2005 15:19:28 -0000 1.29
+++ main.c 10 Feb 2006 05:18:22 -0000 1.30
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.29 2005/10/24 15:19:28 sunjd Exp $ */
+/* $Id: main.c,v 1.30 2006/02/10 05:18:22 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -214,22 +214,14 @@
exit(exit_status);
}
+extern gboolean shuttingdown;
gboolean
tengine_shutdown(int nsig, gpointer unused)
-{
-#if 0
- static int shuttingdown = 0;
-
- if (!shuttingdown) {
- shuttingdown = 1;
- }
- if (mainloop != NULL && g_main_is_running(mainloop)) {
- g_main_quit(mainloop);
- }else{
+{
+ shuttingdown = TRUE;
+ if(te_fsa_state == s_idle) {
+ crm_info("Exiting an idle TEngine");
exit(LSB_EXIT_OK);
}
return TRUE;
-#else
- return FALSE;
-#endif
}
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/utils.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- utils.c 8 Feb 2006 22:17:47 -0000 1.50
+++ utils.c 10 Feb 2006 05:18:22 -0000 1.51
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.50 2006/02/08 22:17:47 andrew Exp $ */
+/* $Id: utils.c,v 1.51 2006/02/10 05:18:22 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -33,6 +33,7 @@
extern cib_t *te_cib_conn;
extern int global_transition_timer;
extern int transition_counter;
+extern gboolean shuttingdown;
void print_input(const char *prefix, action_t *input, gboolean to_file);
void print_action(const char *prefix, action_t *action, gboolean to_file);
@@ -241,6 +242,10 @@
g_main_quit(mainloop);
return;
#else
+ if(shuttingdown) {
+ crm_info("Exiting after transition");
+ exit(LSB_EXIT_OK);
+ }
send_ipc_message(crm_ch, cmd);
#endif
#if 0
------------------------------
_______________________________________________
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 44
********************************************