Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 941556 Details for
Bug 1127878
support corosync's ability to unblock quorum
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
proposed fix
0001-Add-quorum-unblock-command.patch (text/plain), 5.37 KB, created by
Tomas Jelinek
on 2014-09-26 12:42:46 UTC
(
hide
)
Description:
proposed fix
Filename:
MIME Type:
Creator:
Tomas Jelinek
Created:
2014-09-26 12:42:46 UTC
Size:
5.37 KB
patch
obsolete
>From 7f458a1f95c6c2fe7bbc5da26fd7f577c458b42c Mon Sep 17 00:00:00 2001 >From: Tomas Jelinek <tojeline@redhat.com> >Date: Fri, 26 Sep 2014 14:26:48 +0200 >Subject: [PATCH] Add 'quorum unblock' command > >--- > pcs/cluster.py | 47 +++++++++++++++++++++++++++++++++++++++++++++++ > pcs/pcs.8 | 3 +++ > pcs/prop.py | 27 ++++++++++++++++++--------- > pcs/usage.py | 6 ++++++ > 4 files changed, 74 insertions(+), 9 deletions(-) > >diff --git a/pcs/cluster.py b/pcs/cluster.py >index 2de4848..c55d7aa 100644 >--- a/pcs/cluster.py >+++ b/pcs/cluster.py >@@ -105,6 +105,12 @@ def cluster_cmd(argv): > cluster_verify(argv) > elif (sub_cmd == "report"): > cluster_report(argv) >+ elif (sub_cmd == "quorum"): >+ if argv and argv[0] == "unblock": >+ cluster_quorum_unblock(argv[1:]) >+ else: >+ usage.cluster(["quorum"]) >+ sys.exit(1) > else: > usage.cluster() > sys.exit(1) >@@ -1068,3 +1074,44 @@ def cluster_remote_node(argv): > usage.cluster(["remote-node"]) > sys.exit(1) > >+def cluster_quorum_unblock(argv): >+ if len(argv) > 0: >+ usage.cluster(["quorum", "unblock"]) >+ sys.exit(1) >+ >+ if utils.is_rhel6(): >+ utils.err("operation is not supported on CMAN based clusters") >+ >+ output, retval = utils.run( >+ ["corosync-cmapctl", "-g", "runtime.votequorum.wait_for_all_status"] >+ ) >+ if retval != 0: >+ utils.err("unable to check quorum status") >+ if output.split("=")[-1].strip() != "1": >+ utils.err("cluster is not waiting for nodes to establish quorum") >+ >+ unjoined_nodes = ( >+ set(utils.getNodesFromCorosyncConf()) >+ - >+ set(utils.getCorosyncActiveNodes()) >+ ) >+ if not unjoined_nodes: >+ utils.err("no unjoined nodes found") >+ for node in unjoined_nodes: >+ stonith.stonith_confirm([node]) >+ >+ output, retval = utils.run( >+ ["corosync-cmapctl", "-s", "quorum.cancel_wait_for_all", "u8", "1"] >+ ) >+ if retval != 0: >+ utils.err("unable to cancel waiting for nodes") >+ print "Quorum unblocked" >+ >+ startup_fencing = prop.get_set_properties().get("startup-fencing", "") >+ utils.set_cib_property( >+ "startup-fencing", >+ "false" if startup_fencing.lower() != "false" else "true" >+ ) >+ utils.set_cib_property("startup-fencing", startup_fencing) >+ print "Waiting for nodes canceled" >+ >diff --git a/pcs/pcs.8 b/pcs/pcs.8 >index 65c15fe..78a5886 100644 >--- a/pcs/pcs.8 >+++ b/pcs/pcs.8 >@@ -219,6 +219,9 @@ Load custom certificate and key files for use in pcsd > sync > Sync corosync configuration to all nodes found from current corosync.conf file (cluster.conf on RHEL6) > .TP >+quorum unblock >+Cancel waiting for all nodes when establishing quorum. Usefull in situations where you know the cluster is inquorate, but you are confident that the cluster should proceed with resource management regardless. >+.TP > cib [filename] > Get the raw xml from the CIB (Cluster Information Base). If a filename is provided, we save the cib to that file, otherwise the cib is printed > .TP >diff --git a/pcs/prop.py b/pcs/prop.py >index cdbc2d4..3b1c15a 100644 >--- a/pcs/prop.py >+++ b/pcs/prop.py >@@ -64,15 +64,10 @@ def list_property(argv): > properties = {} > > if "--defaults" not in utils.pcs_options: >- (output, retVal) = utils.run(["cibadmin","-Q","--scope", "crm_config"]) >- if retVal != 0: >- utils.err("unable to get crm_config\n"+output) >- dom = parseString(output) >- de = dom.documentElement >- crm_config_properties = de.getElementsByTagName("nvpair") >- for prop in crm_config_properties: >- if print_all == True or (argv[0] == prop.getAttribute("name")): >- properties[prop.getAttribute("name")] = prop.getAttribute("value") >+ properties = get_set_properties( >+ None if print_all else argv[0], >+ properties >+ ) > > print "Cluster Properties:" > for prop,val in sorted(properties.iteritems()): >@@ -115,3 +110,17 @@ def get_default_properties(): > > parameters[name] = default > return parameters >+ >+def get_set_properties(prop_name=None, defaults=None): >+ properties = {} if defaults is None else dict(defaults) >+ (output, retVal) = utils.run(["cibadmin","-Q","--scope", "crm_config"]) >+ if retVal != 0: >+ utils.err("unable to get crm_config\n"+output) >+ dom = parseString(output) >+ de = dom.documentElement >+ crm_config_properties = de.getElementsByTagName("nvpair") >+ for prop in crm_config_properties: >+ if prop_name is None or (prop_name == prop.getAttribute("name")): >+ properties[prop.getAttribute("name")] = prop.getAttribute("value") >+ return properties >+ >diff --git a/pcs/usage.py b/pcs/usage.py >index ae0a41b..654a70d 100644 >--- a/pcs/usage.py >+++ b/pcs/usage.py >@@ -563,6 +563,12 @@ Commands: > Sync corosync configuration to all nodes found from current > corosync.conf file (cluster.conf on RHEL6) > >+ quorum unblock >+ Cancel waiting for all nodes when establishing quorum. Usefull in >+ situations where you know the cluster is inquorate, but you are >+ confident that the cluster should proceed with resource management >+ regardless. >+ > cib [filename] > Get the raw xml from the CIB (Cluster Information Base). If a > filename is provided, we save the cib to that file, otherwise the cib >-- >1.9.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1127878
: 941556