Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
EOS-22198: stopping/killing s3server causing restart of ioservice on …
Browse files Browse the repository at this point in the history
…3 node setup (#511)

- Change the stop order constraint kind property to Optional
  (default is Mandatory) wherever is applicable

Signed-off-by: Madhura Mande <madhura.mande@seagate.com>

Co-authored-by: ajaysrivas <66410865+ajaysrivas@users.noreply.github.com>
  • Loading branch information
Madhura-08 and ajaysrivas authored Jul 19, 2021
1 parent 8f2d7d6 commit 1450ab5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ha/setup/create_pacemaker_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def motr(cib_xml, push=False, **kwargs):
not_defined {RESOURCE.MOTR_CONFD.value}-count or {RESOURCE.MOTR_CONFD.value}-count lt integer {quorum_size}")
process.run_cmd(f"pcs -f {cib_xml} constraint order {RESOURCE.HAX.value}-clone then {RESOURCE.MOTR_IOS.value}-{i}-clone")
process.run_cmd(f"pcs -f {cib_xml} constraint colocation add {RESOURCE.MOTR_IOS.value}-{i}-clone with {RESOURCE.HAX.value}-clone")
process.run_cmd(f"pcs -f {cib_xml} constraint order stop {RESOURCE.MOTR_IOS.value}-{i}-clone then stop {RESOURCE.MOTR_CONFD.value}-1-clone")
process.run_cmd(f"pcs -f {cib_xml} constraint order stop {RESOURCE.MOTR_IOS.value}-{i}-clone then stop {RESOURCE.MOTR_CONFD.value}-1-clone kind=Optional")
except Exception as e:
raise CreateResourceConfigError(f"Invalid node_count. Error: {e}")
if push:
Expand All @@ -208,7 +208,7 @@ def motr(cib_xml, push=False, **kwargs):
def stop_constraint_on_motr_ios(resource_name, cib_xml, push=False, **kwargs):
ios_instances = get_ios_instances(**kwargs)
for i in range(1, int(ios_instances)+1):
process.run_cmd(f"pcs -f {cib_xml} constraint order stop {resource_name} then stop {RESOURCE.MOTR_IOS.value}-{i}-clone")
process.run_cmd(f"pcs -f {cib_xml} constraint order stop {resource_name} then stop {RESOURCE.MOTR_IOS.value}-{i}-clone kind=Optional")
if push:
cib_push(cib_xml)

Expand Down Expand Up @@ -264,7 +264,7 @@ def s3servers(cib_xml, push=False, **kwargs):
def stop_constraint_on_s3servers(resource_name, cib_xml, push=False, **kwargs):
s3_instances = get_s3servers_instances(**kwargs)
for i in range(1, int(s3_instances)+1):
process.run_cmd(f"pcs -f {cib_xml} constraint order stop {resource_name} then stop s3server-{i}-clone")
process.run_cmd(f"pcs -f {cib_xml} constraint order stop {resource_name} then stop s3server-{i}-clone kind=Optional")
if push:
cib_push(cib_xml)

Expand Down

0 comments on commit 1450ab5

Please sign in to comment.