Bug 1107612
| Summary: | 'resource delete' behaviour confusing for clone of group with more than one resource | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | michal novacek <mnovacek> | ||||||
| Component: | pcs | Assignee: | Tomas Jelinek <tojeline> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 6.6 | CC: | cfeist, cluster-maint, jherrman, rsteiger, tojeline | ||||||
| Target Milestone: | pre-dev-freeze | ||||||||
| Target Release: | 6.6 | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | pcs-0.9.123-4.el6 | Doc Type: | Bug Fix | ||||||
| Doc Text: |
Previously, the pcs utility did not properly handle clones of a group when removing resources from the cloned group. As a consequence, the "pcs resource unclone" and "pcs resource delete" commands removed only the first resource in a group when they were supposed to remove the entire resource group. With this update, pcs handles resources in cloned groups correctly and removing cloned resource groups works as expected.
|
Story Points: | --- | ||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2014-10-14 07:22:11 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
Same with Master/Slave resources:
[root@virt-021 sts6]# for a in 1 2 3; do pcs resource create dummy-$a Stateful --group dummies; done
[root@virt-021 sts6]# pcs resource master dummies
[root@virt-021 sts6]# pcs resource --full
Master: dummies-master
Group: dummies
Resource: dummy-1 (class=ocf provider=pacemaker type=Stateful)
Operations: start interval=0s timeout=20 (dummy-1-start-timeout-20)
stop interval=0s timeout=20 (dummy-1-stop-timeout-20)
monitor interval=10 role=Master timeout=20 (dummy-1-monitor-interval-10-role-Master)
monitor interval=10 role=Slave timeout=20 (dummy-1-monitor-interval-10-role-Slave)
Resource: dummy-2 (class=ocf provider=pacemaker type=Stateful)
Operations: start interval=0s timeout=20 (dummy-2-start-timeout-20)
stop interval=0s timeout=20 (dummy-2-stop-timeout-20)
monitor interval=10 role=Master timeout=20 (dummy-2-monitor-interval-10-role-Master)
monitor interval=10 role=Slave timeout=20 (dummy-2-monitor-interval-10-role-Slave)
Resource: dummy-3 (class=ocf provider=pacemaker type=Stateful)
Operations: start interval=0s timeout=20 (dummy-3-start-timeout-20)
stop interval=0s timeout=20 (dummy-3-stop-timeout-20)
monitor interval=10 role=Master timeout=20 (dummy-3-monitor-interval-10-role-Master)
monitor interval=10 role=Slave timeout=20 (dummy-3-monitor-interval-10-role-Slave)
[root@virt-021 sts6]#
[root@virt-021 sts6]# pcs resource delete dummies-master
Attempting to stop: dummy-1...Stopped
Deleting Resource - dummy-1
[root@virt-021 sts6]# pcs resource --full
Master: dummies-master
Group: dummies
Resource: dummy-2 (class=ocf provider=pacemaker type=Stateful)
Operations: start interval=0s timeout=20 (dummy-2-start-timeout-20)
stop interval=0s timeout=20 (dummy-2-stop-timeout-20)
monitor interval=10 role=Master timeout=20 (dummy-2-monitor-interval-10-role-Master)
monitor interval=10 role=Slave timeout=20 (dummy-2-monitor-interval-10-role-Slave)
Resource: dummy-3 (class=ocf provider=pacemaker type=Stateful)
Operations: start interval=0s timeout=20 (dummy-3-start-timeout-20)
stop interval=0s timeout=20 (dummy-3-stop-timeout-20)
monitor interval=10 role=Master timeout=20 (dummy-3-monitor-interval-10-role-Master)
monitor interval=10 role=Slave timeout=20 (dummy-3-monitor-interval-10-role-Slave)
Created attachment 909604 [details]
proposed fix 1/2
Created attachment 909605 [details]
proposed fix 2/2
Before Fix:
[root@bid-06 ~]# rpm -q pcs
pcs-0.9.123-3.el6.x86_64
[root@bid-06 ~]# pcs resource create D1 Dummy --group dg
[root@bid-06 ~]# pcs resource create D2 Dummy --group dg
[root@bid-06 ~]# pcs resource create D3 Dummy --group dg
[root@bid-06 ~]# pcs resource clone dg
[root@bid-06 ~]# pcs resource
Clone Set: dg-clone [dg]
Started: [ bid-05 bid-06 ]
[root@bid-06 ~]# pcs resource --full
Clone: dg-clone
Group: dg
Resource: D1 (class=ocf provider=heartbeat type=Dummy)
Operations: start interval=0s timeout=20 (D1-start-timeout-20)
stop interval=0s timeout=20 (D1-stop-timeout-20)
monitor interval=10 timeout=20 (D1-monitor-interval-10)
Resource: D2 (class=ocf provider=heartbeat type=Dummy)
Operations: start interval=0s timeout=20 (D2-start-timeout-20)
stop interval=0s timeout=20 (D2-stop-timeout-20)
monitor interval=10 timeout=20 (D2-monitor-interval-10)
Resource: D3 (class=ocf provider=heartbeat type=Dummy)
Operations: start interval=0s timeout=20 (D3-start-timeout-20)
stop interval=0s timeout=20 (D3-stop-timeout-20)
monitor interval=10 timeout=20 (D3-monitor-interval-10)
[root@bid-06 ~]# pcs resource delete dg-clone
Attempting to stop: D1...Stopped
Deleting Resource - D1
[root@bid-06 ~]# pcs resource --full
Clone: dg-clone
Group: dg
Resource: D2 (class=ocf provider=heartbeat type=Dummy)
Operations: start interval=0s timeout=20 (D2-start-timeout-20)
stop interval=0s timeout=20 (D2-stop-timeout-20)
monitor interval=10 timeout=20 (D2-monitor-interval-10)
Resource: D3 (class=ocf provider=heartbeat type=Dummy)
Operations: start interval=0s timeout=20 (D3-start-timeout-20)
stop interval=0s timeout=20 (D3-stop-timeout-20)
monitor interval=10 timeout=20 (D3-monitor-interval-10)
D2, D3 and dg should all have been deleted.
After Fix:
[root@bid-06 pcs]# rpm -q pcs
pcs-0.9.123-4.el6.x86_64
[root@bid-06 pcs]# pcs resource create D1 Dummy --group dg
[root@bid-06 pcs]# pcs resource create D2 Dummy --group dg
[root@bid-06 pcs]# pcs resource create D3 Dummy --group dg
[root@bid-06 pcs]# pcs resource clone dg
[root@bid-06 pcs]# pcs resource --full
Clone: dg-clone
Group: dg
Resource: D1 (class=ocf provider=heartbeat type=Dummy)
Operations: start interval=0s timeout=20 (D1-start-timeout-20)
stop interval=0s timeout=20 (D1-stop-timeout-20)
monitor interval=10 timeout=20 (D1-monitor-interval-10)
Resource: D2 (class=ocf provider=heartbeat type=Dummy)
Operations: start interval=0s timeout=20 (D2-start-timeout-20)
stop interval=0s timeout=20 (D2-stop-timeout-20)
monitor interval=10 timeout=20 (D2-monitor-interval-10)
Resource: D3 (class=ocf provider=heartbeat type=Dummy)
Operations: start interval=0s timeout=20 (D3-start-timeout-20)
stop interval=0s timeout=20 (D3-stop-timeout-20)
monitor interval=10 timeout=20 (D3-monitor-interval-10)
[root@bid-06 pcs]# pcs resource delete dg-clone
Removing group: dg (and all resources within group)
Stopping all resources in group: dg...
Deleting Resource - D1
Deleting Resource - D2
Deleting Resource (and group and clone) - D3
[root@bid-06 pcs]# pcs resource --full
[root@bid-06 pcs]#
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1526.html |
Description of problem: The behaviour of the 'pcs resource delete' is confusing for cloned group of several resources. Only first resource of the group is removed which is not correct. It should either remove all or none (and suggest other ways on how it should be done). Version-Release number of selected component (if applicable): resource-agents-3.9.5-26.el7.x86_64 pcs-0.9.115-32.el7.x86_64 How reproducible: always Steps to Reproduce: 1. for a in 1 2 3; do pcs resource create dummy-$a Dummy --group dummies; done 2. pcs resource clone dummies 3. pcs resource delete dummies-clone Actual results: only first resource in a cloned group removed Expected results: clone, group and all of its resources removed Additional info: [root@virt-066 ~]# for a in 1 2 3; do pcs resource create dummy-$a Dummy --group dummies; done [root@virt-066 ~]# pcs resource clone dummies [root@virt-066 ~]# pcs resource show dummies-clone Clone: dummies-clone Group: dummies Resource: dummy-1 (class=ocf provider=heartbeat type=Dummy) Operations: start interval=0s timeout=20 (dummy-1-start-timeout-20) stop interval=0s timeout=20 (dummy-1-stop-timeout-20) monitor interval=10 timeout=20 (dummy-1-monitor-interval-10) Resource: dummy-2 (class=ocf provider=heartbeat type=Dummy) Operations: start interval=0s timeout=20 (dummy-2-start-timeout-20) stop interval=0s timeout=20 (dummy-2-stop-timeout-20) monitor interval=10 timeout=20 (dummy-2-monitor-interval-10) Resource: dummy-3 (class=ocf provider=heartbeat type=Dummy) Operations: start interval=0s timeout=20 (dummy-3-start-timeout-20) stop interval=0s timeout=20 (dummy-3-stop-timeout-20) monitor interval=10 timeout=20 (dummy-3-monitor-interval-10) [root@virt-066 ~]# pcs resource delete dummies-clone Attempting to stop: dummy-1...Stopped Deleting Resource - dummy-1 [root@virt-066 ~]# pcs resource show dummies-clone Clone: dummies-clone Group: dummies Resource: dummy-2 (class=ocf provider=heartbeat type=Dummy) Operations: start interval=0s timeout=20 (dummy-2-start-timeout-20) stop interval=0s timeout=20 (dummy-2-stop-timeout-20) monitor interval=10 timeout=20 (dummy-2-monitor-interval-10) Resource: dummy-3 (class=ocf provider=heartbeat type=Dummy) Operations: start interval=0s timeout=20 (dummy-3-start-timeout-20) stop interval=0s timeout=20 (dummy-3-stop-timeout-20) monitor interval=10 timeout=20 (dummy-3-monitor-interval-10) [root@virt-066 ~]# pcs resource delete dummies-clone Attempting to stop: dummy-2...Stopped Deleting Resource - dummy-2 [root@virt-066 ~]# pcs resource show dummies-clone Clone: dummies-clone Group: dummies Resource: dummy-3 (class=ocf provider=heartbeat type=Dummy) Operations: start interval=0s timeout=20 (dummy-3-start-timeout-20) stop interval=0s timeout=20 (dummy-3-stop-timeout-20) monitor interval=10 timeout=20 (dummy-3-monitor-interval-10) [root@virt-066 ~]# pcs resource delete dummies-clone Attempting to stop: dummy-3...Stopped Deleting Resource (and group and clone) - dummy-3