cluster: RHEL6 - rgmanager: Allow restart,disable recovery policy
Lon Hohberger
lon at fedoraproject.org
Tue Feb 1 18:10:41 UTC 2011
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=57232d8ad1dde6927a7d8cd267d1f3813e2bf0ca
Commit: 57232d8ad1dde6927a7d8cd267d1f3813e2bf0ca
Parent: abe50ac2721ec8124aa2a614c2a0a05e4cfa3ad7
Author: Lon Hohberger <lhh at redhat.com>
AuthorDate: Thu Sep 2 15:06:09 2010 -0400
Committer: Lon Hohberger <lhh at redhat.com>
CommitterDate: Tue Feb 1 12:31:32 2011 -0500
rgmanager: Allow restart,disable recovery policy
This policy allows administrators to allow
rgmanager to start and monitor services
where failover is not required.
Resolves: rhbz#634277
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 9eb686f..9328a88 100644
--- a/rgmanager/src/daemons/rg_state.c
+++ b/rgmanager/src/daemons/rg_state.c
@@ -2220,6 +2220,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