ClusterLabs/pcs

pcs execute fail when stop a group resource or a clone resource

ashore1992 opened this issue · 1 comments

pcs 0.10.14
pacemaker 2.1.5
corosync 3.0.4
resource-agents 4.11.0
pcs测试异常.txt

Hi @ashore1992,

Thanks for reaching out. Let me explain what is going on:

  • You create two resources and set target-role="Started" for them.
  • You put those resources to a group.
  • You run pcs resource disable for the group. This sets target-role="Stopped" for the group.
  • The group now has target-role="Stopped", while the resources in it have target-role="Started".
  • Resources in a group inherit target-role from the group. However, your resources override the inherited target-role with their own value.
  • That's why the resources are still running.

The same principle applies to clones.

I suggest not setting target-role="Started" for your resources. It is a default setting anyway.