Hi Andrew,

Thank you for your implementation.
It works very well!

Now I consider how to clarify the way to failback.
When a resource with on-fail="standby" fails,
crm_mon shows that the node's status is "standby".
And when an user executes crm_standby -v on,
crm_mon shows the same status.
But the way to failback is different in each case.

In the first case, we have to restart
heartbeat service to failback.
And in the second, only crm_standby -v off is enough.

I consider that it is effective to divide the status which crm_mon shows
to avoid confusion.
What do you think about this?
I attached a patch, it is to make crm_mon show "standby (on-fail)"
in the first case.
It is for Pacemaker-1.0 2e9b56d80e38.
I'd like to hear your openion.


Best Regards,
Satomi TANIGUCHI





diff -urN pacemaker-1.0/include/crm/pengine/status.h pacemaker-1.0.mod/include/crm/pengine/status.h
--- pacemaker-1.0/include/crm/pengine/status.h	2008-12-01 11:33:58.000000000 +0900
+++ pacemaker-1.0.mod/include/crm/pengine/status.h	2008-12-01 11:34:49.000000000 +0900
@@ -104,6 +104,7 @@
 		const char *uname; 
 		gboolean online;
 		gboolean standby;
+		gboolean standby_onfail;
 		gboolean pending;
 		gboolean unclean;
 		gboolean shutdown;
diff -urN pacemaker-1.0/lib/pengine/unpack.c pacemaker-1.0.mod/lib/pengine/unpack.c
--- pacemaker-1.0/lib/pengine/unpack.c	2008-12-01 11:34:17.000000000 +0900
+++ pacemaker-1.0.mod/lib/pengine/unpack.c	2008-12-01 11:34:51.000000000 +0900
@@ -240,6 +240,7 @@
 			 */
 			new_node->details->unclean = TRUE;
 		}
+		new_node->details->standby_onfail = FALSE;
 		
 		if(type == NULL
 		   || safe_str_eq(type, "member")
@@ -821,6 +822,7 @@
 		
 	    case action_fail_standby:
 		node->details->standby = TRUE;
+		node->details->standby_onfail = TRUE;
 		break;
 		    
 	    case action_fail_block:
diff -urN pacemaker-1.0/tools/crm_mon.c pacemaker-1.0.mod/tools/crm_mon.c
--- pacemaker-1.0/tools/crm_mon.c	2008-12-01 11:34:18.000000000 +0900
+++ pacemaker-1.0.mod/tools/crm_mon.c	2008-12-01 11:34:54.000000000 +0900
@@ -788,6 +788,9 @@
 		   if(node->details->pending) {
 		       node_mode = "pending";
 
+		   } else if(node->details->standby_onfail && node->details->online) {
+		       node_mode = "standby (on-fail)";
+
 		   } else if(node->details->standby && node->details->online) {
 		       node_mode = "standby";
 
@@ -971,7 +974,9 @@
 	fprintf(stream, "<ul>\n");
 	slist_iter(node, node_t, data_set.nodes, lpc2,
 		   fprintf(stream, "<li>");
-		   if(node->details->standby && node->details->online) {
+		   if(node->details->standby_onfail && node->details->online) {
+			fprintf(stream, "Node: %s (%s): %s",node->details->uname, node->details->id,"<font color=\"orange\">standby (on-fail)</font>\n");
+		   } else if(node->details->standby && node->details->online) {
 			fprintf(stream, "Node: %s (%s): %s",node->details->uname, node->details->id,"<font color=\"orange\">standby</font>\n");
 		   } else if(node->details->standby) {
 			fprintf(stream, "Node: %s (%s): %s",node->details->uname, node->details->id,"<font color=\"red\">OFFLINE (standby)</font>\n");
============
Last updated: Mon Dec  1 13:58:43 2008
Current DC: rh5node2 (fb62f5f4-015c-466a-8778-7b5c1c5639d6)
2 Nodes configured.
5 Resources configured.
============

Node: rh5node1 (286f4fcb-519e-4a23-b39f-9ab0017d0442): standby (on-fail)
Node: rh5node2 (fb62f5f4-015c-466a-8778-7b5c1c5639d6): online

prmDummy1       (ocf::heartbeat:Dummy): Started rh5node2
Resource Group: grpPostgreSQLDB
    prmIpPostgreSQLDB   (ocf::heartbeat:IPaddr):        Started rh5node2
    prmApPostgreSQLDB   (ocf::heartbeat:pgsql): Started rh5node2
Clone Set: clnDummy
    prmDummy1-clone:0   (ocf::heartbeat:Dummy-clone):   Stopped
    prmDummy1-clone:1   (ocf::heartbeat:Dummy-clone):   Started rh5node2
Master/Slave Set: msStateful1
    prmStateful1:0      (ocf::heartbeat:Stateful):      Stopped
    prmStateful1:1      (ocf::heartbeat:Stateful):      Master rh5node2
Clone Set: clnStonith
    prmStonith:0        (stonith:external/ssh): Stopped
    prmStonith:1        (stonith:external/ssh): Started rh5node2

Failed actions:
    prmDummy1_monitor_30000 (node=rh5node1, call=13, rc=7, status=0): not 
running
_______________________________________________
Pacemaker mailing list
[email protected]
http://list.clusterlabs.org/mailman/listinfo/pacemaker

Reply via email to