diff --git a/Makefile b/Makefile index d41a800..f448695 100644 --- a/Makefile +++ b/Makefile @@ -27,9 +27,9 @@ install_pcsd: mkdir -p ${DESTDIR}/var/log/pcsd mkdir -p ${DESTDIR}${PREFIX}/lib/ cp -r pcsd ${DESTDIR}${PREFIX}/lib/ - install -D pcsd/pcsd.conf ${DESTDIR}/etc/sysconfig/pcsd + install -m 644 -D pcsd/pcsd.conf ${DESTDIR}/etc/sysconfig/pcsd install -d ${DESTDIR}/usr/lib/systemd/system/ - install pcsd/pcsd.service ${DESTDIR}/usr/lib/systemd/system/ + install -m 644 pcsd/pcsd.service ${DESTDIR}/usr/lib/systemd/system/ install -d ${DESTDIR}/etc/pam.d install pcsd/pcsd.pam ${DESTDIR}/etc/pam.d/pcsd install -m 700 -d ${DESTDIR}/var/lib/pcsd diff --git a/pcs/cluster.py b/pcs/cluster.py index c8b7344..ec0e6a1 100644 --- a/pcs/cluster.py +++ b/pcs/cluster.py @@ -337,10 +337,10 @@ def corosync_setup(argv,returnConfig=False): quorum_options += "wait_for_all: " + utils.pcs_options["--wait_for_all"] + "\n" if "--auto_tie_breaker" in utils.pcs_options: quorum_options += "auto_tie_breaker: " + utils.pcs_options["--auto_tie_breaker"] + "\n" - if "--last_node_standing" in utils.pcs_options: - quorum_options += "last_node_standing: " + utils.pcs_options["--last_node_standing"] + "\n" - if "--last_node_standing_window" in utils.pcs_options: - quorum_options += "last_node_standing_window: " + utils.pcs_options["--last_node_standing_window"] + "\n" + if "--last_man_standing" in utils.pcs_options: + quorum_options += "last_man_standing: " + utils.pcs_options["--last_man_standing"] + "\n" + if "--last_man_standing_window" in utils.pcs_options: + quorum_options += "last_man_standing_window: " + utils.pcs_options["--last_man_standing_window"] + "\n" transport = "udpu" diff --git a/pcs/constraint.py b/pcs/constraint.py index a4ac957..d20cbcc 100644 --- a/pcs/constraint.py +++ b/pcs/constraint.py @@ -389,6 +389,22 @@ def order_rm(argv): constraintsElement.removeChild(ord_loc) elementFound = True + resource_refs_to_remove = [] + for ord_set in constraintsElement.getElementsByTagName('resource_ref'): + if ord_set.getAttribute("id") == resource: + resource_refs_to_remove.append(ord_set) + elementFound = True + + for res_ref in resource_refs_to_remove: + res_set = res_ref.parentNode + res_order = res_set.parentNode + + res_ref.parentNode.removeChild(res_ref) + if len(res_set.getElementsByTagName('resource_ref')) <= 0: + res_set.parentNode.removeChild(res_set) + if len(res_order.getElementsByTagName('resource_set')) <= 0: + res_order.parentNode.removeChild(res_order) + if elementFound == True: xml_constraint_string = constraintsElement.toxml() args = ["cibadmin", "-c", "-R", "--xml-text", xml_constraint_string] @@ -396,7 +412,7 @@ def order_rm(argv): if output != "": print output else: - print "No matching resources found in ordering list" + utils.err("No matching resources found in ordering list") def order_start(argv): if len(argv) < 3: diff --git a/pcs/pcs.8 b/pcs/pcs.8 index 13db7b9..7f51f61 100644 --- a/pcs/pcs.8 +++ b/pcs/pcs.8 @@ -144,8 +144,8 @@ Reset failcount for specified resource on all nodes or only on specified node. T auth [node] [...] [\-u username] [\-p password] [\-\-local] [\-\-force] Authenticate pcs to pcsd on nodes specified, or on all nodes configured in corosync.conf if no nodes are specified (authorization tokens are stored in ~/.pcs/tokens or /var/lib/pcsd/tokens for root). By default all nodes are also authenticated to each other, using --local only authenticates the local node (and does not authenticate the remote nodes with each other). Using --force forces re-authentication to occur. .TP -setup [\-\-start] [\-\-local] [\-\-enable] \-\-name\fR [node2[,node2-altaddr]] [..] [--transport ] [--rrpmode active|passive] [--addr0 [[[--mcast0
] [--mcastport0 ] [--ttl0 ]] | [--broadcast0]] [--addr1 [[[--mcast1
] [--mcastport1 ] [--ttl1 ]] | [--broadcast1]]]] [--wait_for_all=<0|1>] [--auto_tie_breaker=<0|1>] [--last_node_standing=<0|1> [--last_node_standing_window=