'pcs ungroup' command removed location constraint
Issue
While removing a resource from resource group, the pcs command also removes all the constraints configured on resource group. Below are the steps leading to this issue:
-
There was a resource group
group1with two resources:$ pcs status Full list of resources: [...] Resource Group: group1 lv1 (ocf::heartbeat:LVM): Started node1.example.com vip (ocf::heartbeat:IPaddr2): Started node1.example.com -
And below location constraints were configured for above resource group:
$ pcs constraint show --full Location Constraints: Resource: group1 <<----- Enabled on: node1.example.com (score:1000) (id:location-group1-node1.example.com-1000) Enabled on: node2.example.com (score:500) (id:location-group1-node2.example.com-500) Resource: lv1 Enabled on: node1.example.com (score:INFINITY) (role: Started) (id:cli-prefer-lv1) Resource: vip Enabled on: node1.example.com (score:INFINITY) (role: Started) (id:cli-prefer-vip) -
When a resource is moved out of resource group using
pcs resource ungrouporpcs resource group removecommand, it removes all location constraints configurd for resource groupgroup1:$ pcs resource ungroup group1 lv1 Removing Constraint - location-group1-node1.example.com-1000 Removing Constraint - location-group1-node2.example.com-500 $ $ pcs constraint show --full Location Constraints: Resource: lv1 Enabled on: node1.example.com (score:INFINITY) (role: Started) (id:cli-prefer-lv1) Resource: vip Enabled on: node1.example.com (score:INFINITY) (role: Started) (id:cli-prefer-vip) [...]
Environment
- Red Hat Enterprise Linux 7.1 with High Availability Add-Ons
- Red Hat Enterprise Linux 6.5 with High Availability Add-Ons
- pacemaker
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
