cluster: STABLE3 - rgmanager: Allow restart,disable recovery policy

Lon Hohberger lon at fedoraproject.org
Fri Sep 24 22:19:37 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=51f2f313d5f2424d58bbaa7d17315d27b39dcf75
Commit:        51f2f313d5f2424d58bbaa7d17315d27b39dcf75
Parent:        ee89729d7ee23cc6a6e79894da7e6a865d8d65f4
Author:        Lon Hohberger <lhh at redhat.com>
AuthorDate:    Thu Sep 2 15:06:09 2010 -0400
Committer:     Lon Hohberger <lhh at redhat.com>
CommitterDate: Fri Sep 24 18:17:21 2010 -0400

rgmanager: Allow restart,disable recovery policy

This policy allows administrators to allow
rgmanager to start and monitor services
where failover is not required.

Signed-off-by: Lon Hohberger <lhh at redhat.com>
---
 rgmanager/src/daemons/rg_state.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/rgmanager/src/daemons/rg_state.c b/rgmanager/src/daemons/rg_state.c
index a4740cb..51711f1 100644
--- a/rgmanager/src/daemons/rg_state.c
+++ b/rgmanager/src/daemons/rg_state.c
@@ -2219,6 +2219,13 @@ handle_recover_req(char *svcName, int *new_owner)
 	/* Check restart counter/timer for this resource */
 	if (check_restart(svcName) > 0) {
 		clear_restart(svcName);
+
+		if (strstr(policy, "disable")) {
+			logt_print(LOG_NOTICE,
+				   "Restart threshold for %s exceeded; "
+				   "disabling\n", svcName);
+			return svc_disable(svcName);
+		}
 		logt_print(LOG_NOTICE, "Restart threshold for %s exceeded; "
 		       "attempting to relocate\n", svcName);
 		return handle_relocate_req(svcName, RG_START_RECOVER, -1,


More information about the cluster-commits mailing list