public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Lon Hohberger <lon@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: RHEL54 - rgmanager: Fix restart-after-migrate issue Date: Thu, 11 Jun 2009 19:32:00 -0000 [thread overview] Message-ID: <20090611193156.E6ECA1201D7@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=1d101c6b92cad6266d41ad935e2dc8e1d06d732d Commit: 1d101c6b92cad6266d41ad935e2dc8e1d06d732d Parent: 5b8f284a873f1a7d0473b881af782ceaf76f1f6f Author: Lon Hohberger <lhh@redhat.com> AuthorDate: Thu Jun 11 11:30:56 2009 -0400 Committer: Lon Hohberger <lhh@redhat.com> CommitterDate: Thu Jun 11 15:31:04 2009 -0400 rgmanager: Fix restart-after-migrate issue * Ensures we use RG_STATUS_INQUIRY when determining if migration has completed, * Ensures that subsequent RG_STATUS checks clear any NEEDSTOP flags to reduce the risk of other (yet-unknown) conditions causing erroneous restarts, and * Fixes erroneous migration_mapping noise. Resolves Red Hat Bugzilla #505340 Signed-off-by: Lon Hohberger <lhh@redhat.com> --- rgmanager/src/daemons/restree.c | 13 ++++++++----- rgmanager/src/daemons/rg_state.c | 16 ++++++++++++---- rgmanager/src/resources/vm.sh | 2 +- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/rgmanager/src/daemons/restree.c b/rgmanager/src/daemons/restree.c index 9119a87..6de7c49 100644 --- a/rgmanager/src/daemons/restree.c +++ b/rgmanager/src/daemons/restree.c @@ -1112,18 +1112,20 @@ _res_op_by_level(resource_node_t **tree, resource_t *first, void *ret, void -mark_nodes(resource_node_t *node, int state, int flags) +mark_nodes(resource_node_t *node, int state, int setflags, int clearflags) { int x; resource_node_t *child; list_for(&node->rn_child, child, x) { if (child->rn_child) - mark_nodes(child->rn_child, state, flags); + mark_nodes(child->rn_child, state, setflags, + clearflags); } node->rn_state = state; - node->rn_flags |= (RF_NEEDSTART | RF_NEEDSTOP); + node->rn_flags |= (setflags); + node->rn_flags &= ~(clearflags); } @@ -1385,7 +1387,7 @@ _res_op_internal(resource_node_t __attribute__ ((unused)) **tree, node is independent or not. */ mark_nodes(node, RES_FAILED, - RF_NEEDSTART | RF_NEEDSTOP); + RF_NEEDSTART | RF_NEEDSTOP, 0); /* If we're an independent subtree, return a flag stating that this section is recoverable apart @@ -1398,6 +1400,7 @@ _res_op_internal(resource_node_t __attribute__ ((unused)) **tree, return SFL_FAILURE; } + mark_nodes(node, RES_STARTED, 0, RF_NEEDSTOP); } if (node->rn_child) { @@ -1412,7 +1415,7 @@ _res_op_internal(resource_node_t __attribute__ ((unused)) **tree, if (op == RS_STATUS && (rv & SFL_FAILURE) && (node->rn_flags & RF_INDEPENDENT)) { mark_nodes(node, RES_FAILED, - RF_NEEDSTART | RF_NEEDSTOP); + RF_NEEDSTART | RF_NEEDSTOP, 0); rv = SFL_RECOVERABLE; } } diff --git a/rgmanager/src/daemons/rg_state.c b/rgmanager/src/daemons/rg_state.c index cda9130..3660b71 100644 --- a/rgmanager/src/daemons/rg_state.c +++ b/rgmanager/src/daemons/rg_state.c @@ -1168,12 +1168,20 @@ svc_status(char *svcName) /* Don't check status for anything not owned */ return 0; - if (svcStatus.rs_state != RG_STATE_STARTED && - svcStatus.rs_state != RG_STATE_MIGRATE) + if (svcStatus.rs_state == RG_STATE_STARTED) { + /* Running locally and not migrating = normal status + * check + */ + ret = group_op(svcName, RG_STATUS); + } else if (svcStatus.rs_state == RG_STATE_MIGRATE) { + /* Migrating resources need an inquiry check to avoid + * setting NEEDSTOP/NEEDSTART in the resource tree. + */ + ret = group_op(svcName, RG_STATUS_INQUIRY); + } else { /* Not-running RGs should not be checked either. */ return 0; - - ret = group_op(svcName, RG_STATUS); + } /* For running services, if the return code is 0, we're done*/ if (svcStatus.rs_state == RG_STATE_STARTED) diff --git a/rgmanager/src/resources/vm.sh b/rgmanager/src/resources/vm.sh index 1d6a0da..8285cd6 100755 --- a/rgmanager/src/resources/vm.sh +++ b/rgmanager/src/resources/vm.sh @@ -109,7 +109,7 @@ meta_data() <content type="string"/> </parameter> - <parameter name="migration_mapping"> + <parameter name="migration_mapping" reconfig="1"> <longdesc lang="en"> Mapping of the hostname of a target cluster member to a different hostname </longdesc>
reply other threads:[~2009-06-11 19:32 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20090611193156.E6ECA1201D7@lists.fedorahosted.org \ --to=lon@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).