Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=16…
Commit: 1671c39acedc665dc827165d0aa0a1c696c2da8f
Parent: 36fd94d68003389d9585c87a649726742e06badd
Author: Christine Caulfield <ccaulfie(a)redhat.com>
AuthorDate: Fri Sep 19 13:02:40 2008 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Mon Feb 27 15:54:57 2012 +0100
cman: Clean shutdown_con if the controlling process is killed.
If a shutdown is initiated by a process that is then killed, the
shutdown_con isn't cleared. So if another process replies to the
shutdown request cman could segfault.
Resolves: rhbz#795814
Signed-off-by: Christine Caulfield <ccaulfie(a)redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdintto(a)redhat.com>
---
cman/daemon/commands.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index 6ffe9e5..781e564 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -1482,6 +1482,11 @@ void unbind_con(struct connection *con)
check_shutdown_status();
}
+
+ /* If the controlling shutdown process has quit, then cancel the
+ shutdown session */
+ if (con == shutdown_con)
+ shutdown_con = NULL;
}
/* Post a PORT OPEN/CLOSE event to anyone listening on this end */
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=b2…
Commit: b2012d8fe8b6a30f16091a8c96b5665e34892160
Parent: b4ca5bbb924ef9ef8e574a171e178f9440a28932
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Thu Aug 5 16:53:22 2010 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Wed Feb 22 10:31:44 2012 -0500
rgmanager: Retry when config is out of sync
If you add a service to rgmanager v1 or v2 and that
service fails to start on the first node but succeeds
in its initial stop operation, there is a chance that
the remote instance of rgmanager has not yet reread
the configuration, causing the service to be placed
into the 'recovering' state without further action.
This patch causes the originator of the request to
retry the operation.
Later versions of rgmanager (ex STABLE3 branch and
derivatives) are unlikely to have this problem since
configuration updates are not polled, but rather
delivered to clients.
Update 22-Feb-2012: The above is incorrect, this was
reproduced a rgmanager v3 installation.
Resolves: rhbz#568126
Resolves: rhbz#796272
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/daemons/rg_state.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/daemons/rg_state.c b/rgmanager/src/daemons/rg_state.c
index 8b5dcaa..80b992a 100644
--- a/rgmanager/src/daemons/rg_state.c
+++ b/rgmanager/src/daemons/rg_state.c
@@ -1809,6 +1809,7 @@ handle_relocate_req(char *svcName, int orig_request, int preferred_target,
rg_state_t svcStatus;
int target = preferred_target, me = my_id();
int ret, x, request = orig_request;
+ int retries;
get_rg_state_local(svcName, &svcStatus);
if (svcStatus.rs_state == RG_STATE_DISABLED ||
@@ -1941,6 +1942,8 @@ handle_relocate_req(char *svcName, int orig_request, int preferred_target,
if (target == me)
goto exhausted;
+ retries = 0;
+retry:
ret = svc_start_remote(svcName, request, target);
switch (ret) {
case RG_ERUN:
@@ -1950,6 +1953,22 @@ handle_relocate_req(char *svcName, int orig_request, int preferred_target,
*new_owner = svcStatus.rs_owner;
free_member_list(allowed_nodes);
return 0;
+ case RG_ENOSERVICE:
+ /*
+ * Configuration update pending on remote node? Give it
+ * a few seconds to sync up. rhbz#568126
+ *
+ * Configuration updates are synchronized in later releases
+ * of rgmanager; this should not be needed.
+ */
+ if (retries++ < 4) {
+ sleep(3);
+ goto retry;
+ }
+ logt_print(LOG_WARNING, "Member #%d has a different "
+ "configuration than I do; trying next "
+ "member.", target);
+ /* Deliberate */
case RG_EDEPEND:
case RG_EFAIL:
/* Uh oh - we failed to relocate to this node.
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=4f…
Commit: 4fbd15844e11e3677e865779e57b5943ca6f3c99
Parent: 4758c35d2a9862bd7a8ac79d5c2239b6a79ca0bf
Author: Adam Drew <adrew(a)redhat.com>
AuthorDate: Fri Oct 7 12:31:16 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Feb 21 13:37:11 2012 -0500
rgmanager: Fix dependency restart bug in CP mode
If we:
- had central_processing mode enabled,
- had a service with 'depend' set on another
service,
- we attempted to restart the service with the
dependency, and
- the dependency was missing
rgmanager would leave the state in 'recovering'
This is the corrected patch from Adam.
Resolves: rhbz#744824
Signed-off-by: Adam Drew <adrew(a)redhat.com>
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/resources/default_event_script.sl | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/resources/default_event_script.sl b/rgmanager/src/resources/default_event_script.sl
index b14f466..c54c068 100644
--- a/rgmanager/src/resources/default_event_script.sl
+++ b/rgmanager/src/resources/default_event_script.sl
@@ -180,6 +180,7 @@ define move_or_start(service, node_list)
((event_type == EVENT_NODE) and (owner == node_id) and
(node_state == 0))) {
debug(service, " is not runnable; dependency not met");
+ ()=service_stop(service);
return ERR_DEPEND;
}
}
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=47…
Commit: 4758c35d2a9862bd7a8ac79d5c2239b6a79ca0bf
Parent: 2543119ffd1ee25ff8e6f205f696f1f53a5292cf
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Thu Jan 5 10:43:12 2012 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Feb 21 13:34:21 2012 -0500
rgmanager: Fix dependency issue related to ordering
If you ordered two services the opposite way in cluster.conf
('b' first, which depends on 'a'), then rgmanager would fail
over 'b' despite the fact that 'a' was not running yet - this
is because the state of 'a' was not set to 'stopped' - so we
need to check for a node-death event in move_or_start().
Resolves: rhbz#743218
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/resources/default_event_script.sl | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/resources/default_event_script.sl b/rgmanager/src/resources/default_event_script.sl
index f3b35cd..b14f466 100644
--- a/rgmanager/src/resources/default_event_script.sl
+++ b/rgmanager/src/resources/default_event_script.sl
@@ -176,7 +176,9 @@ define move_or_start(service, node_list)
depends = service_property(service, "depend");
if (depends != "") {
(,,, owner, state) = service_status(depends);
- if (owner < 0) {
+ if ((owner < 0) or
+ ((event_type == EVENT_NODE) and (owner == node_id) and
+ (node_state == 0))) {
debug(service, " is not runnable; dependency not met");
return ERR_DEPEND;
}
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=fd…
Commit: fdcec853307c5d9ce0517cb0088de2e970f76ae7
Parent: 4fbd15844e11e3677e865779e57b5943ca6f3c99
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Fri Jul 29 13:30:38 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Feb 21 13:38:13 2012 -0500
rgmanager: Add -F to clusvcadm man page
Resolves: rhbz#745226
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/man/clusvcadm.8 | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/rgmanager/man/clusvcadm.8 b/rgmanager/man/clusvcadm.8
index d5e09eb..055a0bf 100644
--- a/rgmanager/man/clusvcadm.8
+++ b/rgmanager/man/clusvcadm.8
@@ -8,7 +8,7 @@ clusvcadm \- Cluster User Service Administration Utility
.B ]
.B [\-e
.I <service>
-.B ]
+.B [\-F] ]
.B [\-l]
.B [\-u]
.B [\-S]
@@ -52,10 +52,15 @@ on which the command is invoked.
Stops and disables the user service named
.I
service
-.IP "\-e <service>"
+.IP "\-e <service> [\-F]"
Enables and starts the user service named
.I
service
+
+Normally, rgmanager starts the service locally (i.e. on
+the host where clusvcadm was run). However, if the \fB-F\fP
+option is specified, rgmanager will use the assigned failover
+domain rules as hints on where to start the service.
.IP \-l
Lock services in preparation for cluster shutdown. This should only
be used if the administrator intends to perform a global, cluster
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=65…
Commit: 6563d1529e4929ad4094326da06ba1eb6b73c7c3
Parent: 8168796b4f1d4e7435b2212a18d4cffbd86e1fa4
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Mon Aug 1 16:31:57 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Feb 21 13:27:22 2012 -0500
rgmanager: Fix clusvcadm message when run with -F
The new_owner was not being correctly set when enabling a service with
-F when run without central processing enabled.
Resolves: rhbz#727326
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 5501b3f..23a4bec 100644
--- a/rgmanager/src/daemons/rg_state.c
+++ b/rgmanager/src/daemons/rg_state.c
@@ -2293,6 +2293,7 @@ handle_fd_start_req(char *svcName, int request, int *new_owner)
switch(ret) {
case RG_ESUCCESS:
+ *new_owner = target;
ret = RG_ESUCCESS;
goto out;
case RG_ERUN:
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=81…
Commit: 8168796b4f1d4e7435b2212a18d4cffbd86e1fa4
Parent: 3624e3e0deed9eb3e6b4325a9ac3249dcb0a110a
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue Sep 6 15:42:41 2011 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Feb 21 13:26:33 2012 -0500
rgmanager: Resolve rare deadlock
In very rare cases, it was possible to fill up a pipe used for
IPC between threads during reconfiguration, causing a deadlock.
This patch resolves the issue.
Resolves: rhbz#635152
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/daemons/groups.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/rgmanager/src/daemons/groups.c b/rgmanager/src/daemons/groups.c
index e9413cd..ee0fc81 100644
--- a/rgmanager/src/daemons/groups.c
+++ b/rgmanager/src/daemons/groups.c
@@ -1683,8 +1683,6 @@ init_resource_groups(int reconfigure, int do_init)
free(val);
}
- /* Wait for any pending requests */
- rg_wait_threads();
/* Block operations that would break during configuration
changes */
rg_clear_initialized(FL_CONFIG);