Bug 1447349
| Summary: | "resource group add" produces invalid cib when group id is already occupied with non-resource element | ||||||
|---|---|---|---|---|---|---|---|
| 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: | high | ||||||
| Version: | 7.4 | CC: | cfeist, cluster-maint, cluster-qe, idevat, mlisik, omular, tojeline | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | pcs-0.9.167-1.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: |
Cause:
The user wants to create a resource group and uses an id of a non-group element as the group's name.
Consequence:
Pcs dumps an invalid CIB to a terminal.
Fix:
Check if the specified group name is already used as an id of an element in the CIB.
Result:
Pcs gracefully exits with an error explaining the specified group name already exists and cannot be used.
|
Story Points: | --- | ||||
| Clone Of: | 1382004 | ||||||
| : | 1668223 (view as bug list) | Environment: | |||||
| Last Closed: | 2019-08-06 13:10:01 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
2017-05-02 13:33:35 UTC
The same bug exists in adding a resource into a group with 'pcs resource group add ...' command:
[root@host-030 ~]# pcs resource group add fence-host-031-instance_attributes-pcmk_host_check dummy2
Error: Unable to update cib
Call cib_replace failed (-203): Update does not conform to the configured schema
<cib crm_feature_set="3.0.12" validate-with="pacemaker-2.6" epoch="1095" num_updates="0" admin_epoch="0" cib-last-written="Sat Apr 29 16:48:30 2017" update-origin="host-030" update-client="cibadmin" update-user="root" have-quorum="1" dc-uuid="1">
<configuration>
<crm_config>
[root@host-030 ~]# pcs resource group add fence-host-031-instance_attributes-pcmk_host_check dummy2 2>&1 | grep fence-host-031-instance_attributes-pcmk_host_check
<nvpair id="fence-host-031-instance_attributes-pcmk_host_check" name="pcmk_host_check" value="static-list"/>
<group id="fence-host-031-instance_attributes-pcmk_host_check">
Created attachment 1528079 [details] proposed fix + test Reproducer in [comment 1]. After Fix:
[kid76 ~] $ rpm -q pcs
pcs-0.9.167-1.el7.x86_64
[kid76 ~] $ pcs resource create R ocf:heartbeat:Dummy
[kid76 ~] $ pcs cluster cib|grep R-stop-interval-0s
<op id="R-stop-interval-0s" interval="0s" name="stop" timeout="20s"/>
[kid76 ~] $ pcs resource group add R-stop-interval-0s R
Error: Group 'R-stop-interval-0s' does not exists and cannot be created since the id 'R-stop-interval-0s' already exists in the cib
[kid76 ~] $ pcs resource create R2 ocf:heartbeat:Dummy --group R-stop-interval-0s
Error: 'R-stop-interval-0s' is not a group
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-2019:2244 |