All of lore.kernel.org
 help / color / mirror / Atom feed
From: lhh@sourceware.org <lhh@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/rgmanager ChangeLog src/daemons/rg_state.c
Date: 27 Sep 2006 12:22:41 -0000	[thread overview]
Message-ID: <20060927122241.7661.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2006-09-27 12:22:41

Modified files:
	rgmanager      : ChangeLog 
	rgmanager/src/daemons: rg_state.c 

Log message:
	Fix failed->disabled state transitions; #208011

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.5.2.21&r2=1.5.2.22
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/rg_state.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.4.2.14&r2=1.4.2.15

--- cluster/rgmanager/ChangeLog	2006/09/07 18:39:45	1.5.2.21
+++ cluster/rgmanager/ChangeLog	2006/09/27 12:22:41	1.5.2.22
@@ -1,3 +1,7 @@
+2006-09-27 Lon Hohberger <lhh@redhat.com>
+	* src/daemons/rg_state.c: Fix fail->disable state transitions,
+	bugzilla #208011
+
 2006-09-07 Lon Hohberger <lhh@redhat.com>
 	* src/daemons/main.c, init.d/rgmanager: Make rgmanager init script
 	report failure correctly in most cases. (#193603)
--- cluster/rgmanager/src/daemons/rg_state.c	2006/06/16 19:57:52	1.4.2.14
+++ cluster/rgmanager/src/daemons/rg_state.c	2006/09/27 12:22:41	1.4.2.15
@@ -879,6 +879,7 @@
 	void *lockp = NULL;
 	rg_state_t svcStatus;
 	int ret;
+	int old_state;
 
 	if (!rg_quorate()) {
 		clulog(LOG_WARNING, "#69: Unclean %s of %s\n", 
@@ -918,6 +919,8 @@
 		break;
 	}
 
+	old_state = svcStatus.rs_state;
+
 	clulog(LOG_NOTICE, "Stopping service %s\n", svcName);
 
 	if (recover)
@@ -937,7 +940,14 @@
 
 	ret = group_op(svcName, RG_STOP);
 
-	_svc_stop_finish(svcName, ret, newstate);
+	if (old_state == RG_STATE_FAILED && newstate == RG_STATE_DISABLED) {
+		if (ret)
+			clulog(LOG_ALERT, "Marking %s as 'disabled', "
+			       "but some resources may still be allocated!\n");
+		_svc_stop_finish(svcName, 0, newstate);
+	} else {
+		_svc_stop_finish(svcName, ret, newstate);
+	}
 
 	return ret;
 }



             reply	other threads:[~2006-09-27 12:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-27 12:22 lhh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-09-27 12:26 [Cluster-devel] cluster/rgmanager ChangeLog src/daemons/rg_state.c lhh
2007-06-14 14:53 lhh
2007-06-28 11:54 mgrac
2008-01-25 18:09 lhh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060927122241.7661.qmail@sourceware.org \
    --to=lhh@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.