Bug 1389941
| Summary: | 'pcs booth remove' doesn't remove resources properly if the booth group is disabled | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Radek Steiger <rsteiger> | ||||||
| Component: | pcs | Assignee: | Tomas Jelinek <tojeline> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 7.3 | CC: | cfeist, cluster-maint, idevat, omular, tojeline | ||||||
| Target Milestone: | rc | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | pcs-0.9.157-1.el7 | Doc Type: | Bug Fix | ||||||
| Doc Text: |
Cause:
User runs the 'pcs booth remove' command when the booth resource group is disabled.
Consequence:
The booth resource group is not removed completely.
Fix:
Properly find the booth resource group in CIB even if it is disabled.
Result:
The booth resource group is completely removed.
|
Story Points: | --- | ||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2017-08-01 18:24:40 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: |
|
||||||||
|
Description
Radek Steiger
2016-10-29 18:24:37 UTC
Created attachment 1219333 [details]
proposed fix
Test is included in the patch.
After Fix:
[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.156-1.el7.x86_64
[vm-rhel72-1 ~] $ pcs resource
NO resources configured
[vm-rhel72-1 ~] $ booth create ip 192.168.122.120
client operation "create" is unknown
[vm-rhel72-1 ~] $ pcs booth create ip 192.168.122.120
[vm-rhel72-1 ~] $ pcs resource disable booth-booth-group
[vm-rhel72-1 ~] $ pcs resource show
Resource Group: booth-booth-group
booth-booth-ip (ocf::heartbeat:IPaddr2): Stopped (disabled)
booth-booth-service (ocf::pacemaker:booth-site): Stopped (disabled)
[vm-rhel72-1 ~] $ pcs booth remove
Deleting Resource - booth-booth-ip
Deleting Resource (and group) - booth-booth-service
[vm-rhel72-1 ~] $ pcs resource show
NO resources configured
Created attachment 1262357 [details]
proposed fix 2
Fixed crash when the group's meta_attributes are placed before the group's resources in the CIB. See the test included in the patch for details.
After Fix:
[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.157-1.el7.x86_64
[vm-rhel72-1 ~] $ pcs resource
NO resources configured
[vm-rhel72-1 ~] $ pcs booth create ip 192.168.122.120
[vm-rhel72-1 ~] $ pcs resource disable booth-booth-group
[vm-rhel72-1 ~] $ pcs cluster cib|grep 'id="booth-booth-group"' -A4
<group id="booth-booth-group">
<meta_attributes id="booth-booth-group-meta_attributes">
<nvpair id="booth-booth-group-meta_attributes-target-role" name="target-role" value="Stopped"/>
</meta_attributes>
<primitive class="ocf" id="booth-booth-ip" provider="heartbeat" type="IPaddr2">
[vm-rhel72-1 ~] $ pcs booth remove
Deleting Resource - booth-booth-ip
Deleting Resource (and group) - booth-booth-service
[vm-rhel72-1 ~] $ pcs resource
NO resources configured
> Note that meta_attributes element is placed before primitive elements.
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. https://access.redhat.com/errata/RHBA-2017:1958 |