cluster: RHEL57 - rgmanager: Fix reference count handling
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 87176e1e6c6ac1b83f719c4683e0dd9745cac411
Parent: 2ee5b3c42eb023692b3a6ca0d2b6241a2ef3b872
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue Apr 26 10:54:48 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Wed Apr 27 17:52:47 2011 -0400
rgmanager: Fix reference count handling
rgmanager feeds reference counts to resource-agents so they can track
when to actually clean up (i.e. when there are no other references).
A problem was found where rgmanager was incorrectly presenting a higher
reference count than expected while stopping, preventing multi-instance
resources (specifically clusterfs.sh) from cleaning up.
Resolves: rhbz#692771
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
Reviewed-by: Ryan O'Hara <rohara(a)redhat.com>
---
rgmanager/src/daemons/restree.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/rgmanager/src/daemons/restree.c b/rgmanager/src/daemons/restree.c
index a1358f7..697c7b1 100644
--- a/rgmanager/src/daemons/restree.c
+++ b/rgmanager/src/daemons/restree.c
@@ -381,6 +381,7 @@ res_exec(resource_node_t *node, int op, const char *arg, int depth)
int childpid, pid;
int ret = 0;
int act_index;
+ int inc = node->rn_resource->r_incarnations;
time_t sleeptime = 0, timeout = 0;
char **env = NULL;
resource_t *res = node->rn_resource;
@@ -404,8 +405,15 @@ res_exec(resource_node_t *node, int op, const char *arg, int depth)
if (!(node->rn_flags & RF_ENFORCE_TIMEOUTS))
timeout = node->rn_actions[act_index].ra_timeout;
+ /* rgmanager ref counts are designed to track *other* incarnations
+ on the host. So, if we're started/failed, the RA should not count
+ this incarnation */
+ if (inc && (node->rn_state == RES_STARTED ||
+ node->rn_state == RES_FAILED))
+ --inc;
+
#ifdef DEBUG
- env = build_env(node, depth, node->rn_resource->r_incarnations, (int)timeout);
+ env = build_env(node, depth, inc, (int)timeout);
if (!env)
return -errno;
#endif
@@ -434,7 +442,7 @@ res_exec(resource_node_t *node, int op, const char *arg, int depth)
#endif
#ifndef DEBUG
- env = build_env(node, depth, node->rn_resource->r_incarnations, (int)timeout);
+ env = build_env(node, depth, inc, (int)timeout);
#endif
if (!env)
13 years
cluster: RHEL56 - ccs: Update manual page for ccs_tool
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: f69006f7654e9f45da64ccb8b4b823b0ce2f4cc4
Parent: 2f81d99e85673db1989b17f9b4f5a3f37a405775
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Wed Feb 9 16:04:50 2011 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Apr 26 12:40:49 2011 -0400
ccs: Update manual page for ccs_tool
Resolves: rhbz#677814
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
ccs/man/ccs_tool.8 | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/ccs/man/ccs_tool.8 b/ccs/man/ccs_tool.8
index e8869c0..e582ed4 100644
--- a/ccs/man/ccs_tool.8
+++ b/ccs/man/ccs_tool.8
@@ -37,6 +37,13 @@ while the cman cluster is operational (i.e. online). Run this on a single
machine to update cluster.conf on all current cluster members. This also
notfies cman of the new config version.
+Note: If ccsd is run on a non-standard base port, you can specify this to
+a \fBccs_tool update\fP in the same manner as you would to \fBccsd\fP:
+
+For example:
+
+ ccs_tool update -P c:40003 /etc/cluster/cluster.conf
+
.TP
\fBupgrade\fP \fI<location>\fP
This command is used to upgrade an old CCS format archive to the new
13 years
cluster: STABLE31 - rgmanager: Fix reference count handling
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 4784df4a5d9e4c606c159f48d9ea4dddc727cce4
Parent: 079f56ecb56b0d53b44b1871fa8937c22981fc1e
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue Apr 26 10:54:48 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Apr 26 11:18:14 2011 -0400
rgmanager: Fix reference count handling
rgmanager feeds reference counts to resource-agents so they can track
when to actually clean up (i.e. when there are no other references).
A problem was found where rgmanager was incorrectly presenting a higher
reference count than expected while stopping, preventing multi-instance
resources (specifically clusterfs.sh) from cleaning up.
Resolves: rhbz#692771
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/daemons/restree.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/rgmanager/src/daemons/restree.c b/rgmanager/src/daemons/restree.c
index 9652c6e..3892ab9 100644
--- a/rgmanager/src/daemons/restree.c
+++ b/rgmanager/src/daemons/restree.c
@@ -330,6 +330,7 @@ res_exec(resource_node_t *node, int op, const char *arg, int depth)
int childpid, pid;
int ret = 0;
int act_index;
+ int inc = node->rn_resource->r_incarnations;
time_t sleeptime = 0, timeout = 0;
char **env = NULL;
resource_t *res = node->rn_resource;
@@ -353,8 +354,15 @@ res_exec(resource_node_t *node, int op, const char *arg, int depth)
if (!(node->rn_flags & RF_ENFORCE_TIMEOUTS))
timeout = node->rn_actions[act_index].ra_timeout;
+ /* rgmanager ref counts are designed to track *other* incarnations
+ on the host. So, if we're started/failed, the RA should not count
+ this incarnation */
+ if (inc && (node->rn_state == RES_STARTED ||
+ node->rn_state == RES_FAILED))
+ --inc;
+
#ifdef DEBUG
- env = build_env(node, depth, node->rn_resource->r_incarnations, (int)timeout);
+ env = build_env(node, depth, inc, (int)timeout);
if (!env)
return -errno;
#endif
@@ -380,7 +388,7 @@ res_exec(resource_node_t *node, int op, const char *arg, int depth)
#endif
#ifndef DEBUG
- env = build_env(node, depth, node->rn_resource->r_incarnations, (int)timeout);
+ env = build_env(node, depth, inc, (int)timeout);
#endif
if (!env)
13 years
cluster: RHEL6 - resource-agents: Fix nfs mount contexts
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 493b100fab97cd9ab746124d460eda069abfc56f
Parent: fe9bef6e01c83e87bee845caa6d763deb33da431
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue Apr 12 11:27:36 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Fri Apr 15 11:45:18 2011 -0400
resource-agents: Fix nfs mount contexts
- check for SELinux enabled
- grab the installed distribution's SELinux label for
/var/lib/nfs/statd
- chcon / restorecon using that label (restorecon should be enough,
but it seems to not work across bind mounts)
Resolves: rhbz#635828
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
rgmanager/src/resources/nfsserver.sh | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/resources/nfsserver.sh b/rgmanager/src/resources/nfsserver.sh
index 17f472d..f7b6b7a 100644
--- a/rgmanager/src/resources/nfsserver.sh
+++ b/rgmanager/src/resources/nfsserver.sh
@@ -16,6 +16,14 @@ export LC_ALL LANG PATH
. $(dirname $0)/ocf-shellfuncs
+# SELinux information
+which restorecon &> /dev/null && selinuxenabled
+export SELINUX_ENABLED=$?
+if [ $SELINUX_ENABLED ]; then
+ export SELINUX_LABEL="$(ls -ldZ /var/lib/nfs/statd | cut -f4 -d' ')"
+fi
+
+
log_do()
{
ocf_log debug $*
@@ -222,6 +230,8 @@ create_tree()
[ -f "$fp/xtab" ] || touch "$fp/xtab"
[ -f "$fp/rmtab" ] || touch "$fp/rmtab"
+ [ $SELINUX_ENABLED ] && chcon -R "$SELINUX_LABEL" "$fp"
+
#
# Generate a random state file. If this ends up being what a client
# already has in its list, that's bad, but the chances of this
@@ -306,7 +316,7 @@ setup_tree()
mount -o bind "$fp/statd" /var/lib/nfs/statd
cp -a "$fp"/*tab /var/lib/nfs
- restorecon /var/lib/nfs
+ [ $SELINUX_ENABLED ] && restorecon /var/lib/nfs
}
13 years
cluster: RHEL57 - fence_ipmilan: Correct return code for diag operation
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 2ee5b3c42eb023692b3a6ca0d2b6241a2ef3b872
Parent: c303e88c2e81a10dd98583d8cbe5b6bbbf1bf0a8
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Mon Apr 4 15:19:57 2011 +0200
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Fri Apr 8 13:09:30 2011 -0400
fence_ipmilan: Correct return code for diag operation
Return code for diag operation should be 0.
Replaces commit 8a97abd04b8492310c1095413c5cf26bbf98e395
"diaf" != "diag"
Resolves: rhbz#678061
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
fence/agents/ipmilan/ipmilan.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/fence/agents/ipmilan/ipmilan.c b/fence/agents/ipmilan/ipmilan.c
index 7031982..b7b4c85 100644
--- a/fence/agents/ipmilan/ipmilan.c
+++ b/fence/agents/ipmilan/ipmilan.c
@@ -1448,6 +1448,15 @@ metaout:
if (!strcasecmp(op, "monitor"))
translated_ret = ret;
+
+ if (!strcasecmp(op, "diag")) {
+ /** .. but when a system receive the DIAG signal , it
+ ** switches to a kdump kernel, but the machine is always
+ ** "on" during the dump phase. It only become temporarily
+ ** "off" at the end of the dump just before rebooting.
+ **/
+ translated_ret = 0;
+ }
return translated_ret;
}
13 years
cluster: RHEL57 - rgmanager: Update last_owner on failover
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: c303e88c2e81a10dd98583d8cbe5b6bbbf1bf0a8
Parent: 9c78d466550bfc5622ba500dd290daeaaf0b91a0
Author: igor <igor1182(a)gmail.com>
AuthorDate: Wed Dec 1 15:32:28 2010 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Fri Apr 8 09:34:39 2011 -0400
rgmanager: Update last_owner on failover
Resolves: rhbz#610483
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/daemons/rg_state.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/daemons/rg_state.c b/rgmanager/src/daemons/rg_state.c
index de44bf7..dce28db 100644
--- a/rgmanager/src/daemons/rg_state.c
+++ b/rgmanager/src/daemons/rg_state.c
@@ -681,6 +681,7 @@ svc_advise_start(rg_state_t *svcStatus, char *svcName, int req)
/*
* Service is running but owner is down -> RG_EFAILOVER
*/
+ svcStatus->rs_last_owner = svcStatus->rs_owner;
clulog(LOG_NOTICE,
"Taking over service %s from down member %s\n",
svcName, memb_id_to_name(membership,
13 years
cluster: RHEL57 - rgmanager: Pause during exit if we stopped services
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 9c78d466550bfc5622ba500dd290daeaaf0b91a0
Parent: c50eee8b798999a06bdb739674d315a4a51198e0
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Thu Apr 7 16:01:58 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Fri Apr 8 09:31:16 2011 -0400
rgmanager: Pause during exit if we stopped services
A difference between rgmanager 1.9.x and later versions is that
they rely on openais/corosync for messaging. This messaging is
quite reliable and has proved useful.
However, one drawback is that if you very quickly stop rgmanager
and corosync/cman, the other nodes in the cluster can not restart
services because message traffic is interrupted for the duration
of the token timeout.
There is no simple solution to this problem. Rgmanager could
(in theory) find new placements for services prior to stopping,
but this is a large amount of design work; it was never designed
to run policies in the exit path.
A far simpler idea is to simply give the other nodes time to
restart services.
NOTE: This solution does not and can not work with central
processing mode.
Resolves: rhbz#619468
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
rgmanager/include/event.h | 1 +
rgmanager/include/resgroup.h | 2 +-
rgmanager/src/daemons/groups.c | 15 +++++++++++++--
rgmanager/src/daemons/main.c | 14 ++++++++++++--
rgmanager/src/daemons/rg_event.c | 7 +++++++
5 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/rgmanager/include/event.h b/rgmanager/include/event.h
index 7e628d8..e63dffd 100644
--- a/rgmanager/include/event.h
+++ b/rgmanager/include/event.h
@@ -136,6 +136,7 @@ int slang_process_event(event_table_t *event_table, event_t *ev);
/* For distributed events. */
void set_transition_throttling(int nsecs);
+int get_transition_throttling(void);
/* Simplified service start. */
int service_op_start(char *svcName, int *target_list, int target_list_len,
diff --git a/rgmanager/include/resgroup.h b/rgmanager/include/resgroup.h
index 793ad3b..4be4dbc 100644
--- a/rgmanager/include/resgroup.h
+++ b/rgmanager/include/resgroup.h
@@ -160,7 +160,7 @@ void send_ret(msgctx_t *ctx, char *name, int ret, int req, int newowner);
/* do this op on all resource groups. The handler for the request
will sort out whether or not it's a valid request given the state */
-void rg_doall(int request, int block, char *debugfmt);
+int rg_doall(int request, int block, const char *debugfmt);
void do_status_checks(void); /* Queue status checks for locally running
services */
diff --git a/rgmanager/src/daemons/groups.c b/rgmanager/src/daemons/groups.c
index ecb7b85..b546421 100644
--- a/rgmanager/src/daemons/groups.c
+++ b/rgmanager/src/daemons/groups.c
@@ -1292,12 +1292,21 @@ svc_exists(char *svcname)
}
-void
-rg_doall(int request, int block, char *debugfmt)
+/*
+ * Perform an operation on all resources groups.
+ *
+ * Returns the number of requests queued. This value is
+ * only used during shutdown, where we queue RG_STOP_EXITING
+ * only for services we have running locally as an optimization.
+ */
+int
+rg_doall(int request, int block,
+ const char *debugfmt)
{
resource_node_t *curr;
rg_state_t svcblk;
char rg[64];
+ int queued = 0;
pthread_rwlock_rdlock(&resource_lock);
list_do(&_tree, curr) {
@@ -1322,6 +1331,7 @@ rg_doall(int request, int block, char *debugfmt)
rt_enqueue_request(rg, request, NULL, 0,
0, 0, 0);
+ ++queued;
} while (!list_done(&_tree, curr));
pthread_rwlock_unlock(&resource_lock);
@@ -1331,6 +1341,7 @@ rg_doall(int request, int block, char *debugfmt)
other rgmanagers to complete. */
if (block)
rg_wait_threads();
+ return queued;
}
diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c
index aa78cef..1c7f746 100644
--- a/rgmanager/src/daemons/main.c
+++ b/rgmanager/src/daemons/main.c
@@ -72,6 +72,7 @@ static int signalled = 0;
static int port = RG_PORT;
static char *rgmanager_lsname = "rgmanager"; /* XXX default */
static int status_poll_interval = DEFAULT_CHECK_INTERVAL;
+static int stops_queued = 0;
int next_node_id(cluster_member_list_t *membership, int me);
@@ -1041,7 +1042,7 @@ void *
shutdown_thread(void __attribute__ ((unused)) *arg)
{
rg_lockall(L_SYS|L_SHUTDOWN);
- rg_doall(RG_STOP_EXITING, 1, NULL);
+ stops_queued = rg_doall(RG_STOP_EXITING, 1, NULL);
running = 0;
pthread_exit(NULL);
@@ -1219,8 +1220,17 @@ out_cleanup:
clu_lock_finished(rgmanager_lsname);
out:
- clulog(LOG_NOTICE, "Shutdown complete, exiting\n");
+ clulog(LOG_DEBUG, "Stopped %d services\n", stops_queued);
+ clulog(LOG_NOTICE, "Disconnecting from CMAN\n");
cman_finish(clu);
+
+ if (stops_queued && !central_events_enabled()) {
+ clulog(LOG_DEBUG, "Pausing to allow services to "
+ "start on other node(s)\n");
+ sleep(get_transition_throttling() * 3);
+ }
+
+ clulog(LOG_NOTICE, "Exiting\n");
/*malloc_dump_table(); */ /* Only works if alloc.c us used */
/*malloc_stats();*/
diff --git a/rgmanager/src/daemons/rg_event.c b/rgmanager/src/daemons/rg_event.c
index 82c20c0..606d41b 100644
--- a/rgmanager/src/daemons/rg_event.c
+++ b/rgmanager/src/daemons/rg_event.c
@@ -69,6 +69,13 @@ set_transition_throttling(int nsecs)
}
+int
+get_transition_throttling(void)
+{
+ return transition_throttling;
+}
+
+
void
set_central_events(int flag)
{
13 years
cluster: RHEL57 - rgmanager: Improve rgmanager's exclusive prioritization handling
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: c50eee8b798999a06bdb739674d315a4a51198e0
Parent: 205d7b2096b288329226cf8be6dae9f870c346cb
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Mon Mar 21 21:16:25 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Fri Apr 8 09:31:16 2011 -0400
rgmanager: Improve rgmanager's exclusive prioritization handling
Resolves: rhbz#680256
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
rgmanager/src/resources/default_event_script.sl | 72 ++++++++++++++++++-----
1 files changed, 56 insertions(+), 16 deletions(-)
diff --git a/rgmanager/src/resources/default_event_script.sl b/rgmanager/src/resources/default_event_script.sl
index db6e789..d567465 100644
--- a/rgmanager/src/resources/default_event_script.sl
+++ b/rgmanager/src/resources/default_event_script.sl
@@ -57,7 +57,7 @@ define separate_nodes(node_list)
define exclusive_prioritize(svc, node_list)
{
variable services = service_list();
- variable len, x, y, owner, state, preferred_owner;
+ variable len, x, y, owner, nowner, state, preferred_owner;
variable svc_excl, other_excl;
variable nodes_x, nodes_s, nodes_e;
@@ -66,7 +66,8 @@ define exclusive_prioritize(svc, node_list)
%
svc_excl = atoi(service_property(svc, "exclusive"));
if (svc_excl == 0) {
- return node_list;
+ notice("Starting ", svc, " on ", node_list);
+ return service_start(svc, node_list);
}
(nodes_e, nodes_s, nodes_x) = separate_nodes(node_list);
@@ -76,7 +77,11 @@ define exclusive_prioritize(svc, node_list)
% If we've got an exclusive service, only allow it to start on
% empty nodes.
%
- return nodes_e;
+ notice("Starting ", svc, " on ", nodes_e);
+ nowner = service_start(svc, nodes_e);
+ if ((nowner > 0) or (nowner != FAIL)) {
+ return nowner;
+ }
}
if (length(nodes_x) == 0) {
@@ -85,7 +90,7 @@ define exclusive_prioritize(svc, node_list)
% and no empty nodes, the service can not be started
%
notice("No empty / exclusive nodes available; cannot restart ", svc);
- return nodes_x;
+ return ERR_DOMAIN;
}
%
@@ -129,14 +134,16 @@ define exclusive_prioritize(svc, node_list)
() = service_stop(services[x]);
%
- % Return just the one node.
+ % Try just the one node.
%
- node_list = subtract([0], 0);
- node_list = union(node_list, owner);
- return node_list;
+ notice("Starting ", svc, " on ", owner);
+ nowner = service_start(svc, owner);
+ if ((nowner > 0) or (nowner != FAIL)) {
+ return nowner;
+ }
}
- return node_list;
+ return ERR_DOMAIN;
}
@@ -200,13 +207,13 @@ define move_or_start(service, node_list)
return ERR_ABORT;
}
} else {
- node_list = exclusive_prioritize(service, node_list);
- notice("Starting ", service, " on ", node_list);
+ return exclusive_prioritize(service, node_list);
}
if (length(node_list) == 0) {
return ERR_DOMAIN;
}
+ notice("Starting ", service, " on ", node_list);
return service_start(service, node_list);
}
@@ -428,7 +435,7 @@ define default_node_event_handler()
define default_service_event_handler()
{
variable services = service_list();
- variable x;
+ variable x, excl, len;
variable depends;
variable depend_mode;
variable policy;
@@ -472,15 +479,16 @@ define default_service_event_handler()
return;
}
- for (x = 0; x < length(services); x++) {
+ %
+ % Simplistic dependency handling
+ %
+ len = length(services);
+ for (x = 0; x < len; x++) {
if (service_name == services[x]) {
% don't do anything to ourself!
continue;
}
- %
- % Simplistic dependency handling
- %
depends = service_property(services[x], "depend");
depend_mode = service_property(services[x], "depend_mode");
@@ -504,6 +512,38 @@ define default_service_event_handler()
()=service_stop(services[x]);
}
}
+
+ %
+ % Try to restart exclusive service which might have been recently
+ % stopped in order to make room for other exclusive services.
+ %
+ % Note that as a side effect, exclusive services (>=2) can't be
+ % stopped with clusvcadm -s; they will just pop right back - you
+ % must disable them if want them to stay stopped.
+ %
+ % This code has a side effect of brute-forcing the lowest-priority
+ % exclusive service offline in a cascaded fashion.
+ %
+ for (x = 0; x < len; x++) {
+ if (service_name == services[x]) {
+ % don't do anything to ourself!
+ continue;
+ }
+
+ excl = atoi(service_property(services[x], "exclusive"));
+ % non-exclusive or highest-prio (1) shouldn't get here
+ if ((excl == 0) or (excl == 1)) {
+ continue;
+ }
+
+ (,,, owner, state) = service_status(services[x]);
+ if (state == "stopped") {
+ info("Restarting stopped exclusive priority ",
+ excl, " service ", services[x]);
+ nodes = allowed_nodes(services[x]);
+ ()=move_or_start(services[x], nodes);
+ }
+ }
}
define default_config_event_handler()
13 years
cluster: RHEL57 - rgmanager: Make clufindhostname -i predictable
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 205d7b2096b288329226cf8be6dae9f870c346cb
Parent: 039dd213135bf6bef73cb92292d18cb072a773bc
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Thu Dec 9 16:01:27 2010 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Fri Apr 8 09:31:15 2011 -0400
rgmanager: Make clufindhostname -i predictable
Resolves: rhbz#592613
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/utils/clufindhostname.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/rgmanager/src/utils/clufindhostname.c b/rgmanager/src/utils/clufindhostname.c
index cd91c76..0409d5b 100644
--- a/rgmanager/src/utils/clufindhostname.c
+++ b/rgmanager/src/utils/clufindhostname.c
@@ -43,7 +43,7 @@ main(int argc, char **argv)
void *ptr;
struct in_addr addr4;
struct in6_addr addr6;
- int opt, size, family;
+ int opt, size, family, ret;
char *sep;
if (argc != 3) {
@@ -66,8 +66,10 @@ main(int argc, char **argv)
size = sizeof(addr6);
}
- if (inet_pton(family, optarg, ptr) < 0) {
- perror("inet_pton");
+ ret = inet_pton(family, optarg, ptr);
+ if (ret <= 0) {
+ if (ret < 0)
+ perror("inet_pton");
exit(2);
}
13 years
cluster: RHEL57 - resource-agents: Trim trailing slash for nfs clients
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 039dd213135bf6bef73cb92292d18cb072a773bc
Parent: 963d04336736b0ad7b4582b100048ea89ba48fad
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Mon Mar 28 16:41:49 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Fri Apr 8 09:31:15 2011 -0400
resource-agents: Trim trailing slash for nfs clients
The exportfs command and/or rpc.mountd trim the trailing slashes
when reporting things in /var/lib/nfs/etab, causing mismatch problems
for the nfsclient resource agent.
Resolves: rhbz#592624
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
rgmanager/src/resources/nfsclient.sh | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/resources/nfsclient.sh b/rgmanager/src/resources/nfsclient.sh
index 2aeee78..138370d 100755
--- a/rgmanager/src/resources/nfsclient.sh
+++ b/rgmanager/src/resources/nfsclient.sh
@@ -266,6 +266,8 @@ verify_path()
return $OCF_ERR_ARGS
fi
+ OCF_RESKEY_path="${OCF_RESKEY_path%/}"
+
[ -d "$OCF_RESKEY_path" ] && return 0
ocf_log err "$OCF_RESKEY_path is not a directory"
13 years