RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1415080 - "pcs stonith create" produces an invalid cib when the device type contains a colon
Summary: "pcs stonith create" produces an invalid cib when the device type contains a ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.2
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-20 07:56 UTC by Ivan Devat
Modified: 2017-08-01 18:26 UTC (History)
6 users (show)

Fixed In Version: pcs-0.9.157-1.el7
Doc Type: Bug Fix
Doc Text:
Cause: The user creates a stonith device and puts a colon in the stonith agent name. Consequence: Pcs exits with a "unable to update cib" error. Fix: Validate stonith agent name. Result: Pcs exits with an error explaining the stonith agent name is not valid.
Clone Of:
Environment:
Last Closed: 2017-08-01 18:26:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed fix (partial) (57.58 KB, patch)
2017-02-01 17:05 UTC, Ivan Devat
no flags Details | Diff
proposed fix (9.06 KB, patch)
2017-03-21 17:12 UTC, Tomas Jelinek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1958 0 normal SHIPPED_LIVE pcs bug fix and enhancement update 2017-08-01 18:09:47 UTC

Description Ivan Devat 2017-01-20 07:56:55 UTC
Description of problem:
"pcs stonith create" allows to force the use a "device type" that is not present in a system. It produces an invalid cib when there is a colon in a "device type".


How reproducible:
always


Steps to Reproduce:
[vm-rhel72-1 ~pcs] $ pcs stonith create F fence_xvm:whatever --force

Actual results:
Warning: Agent 'fence_xvm:whatever' not found
Error: Unable to update cib
Call cib_replace failed (-203): Update does not conform to the configured schema
<cib...


Expected results:
Error: 'fence_xvm:whatever' is not a valid stonith device type

Comment 3 Ivan Devat 2017-02-01 17:05:07 UTC
Created attachment 1246746 [details]
proposed fix (partial)

The proposed fix solves the problem with the invalid cib. But the stonith resource with the agent name that contains ":" does not work - even if such agent exists. It is necessary to reject such name.

Comment 4 Tomas Jelinek 2017-03-21 17:12:34 UTC
Created attachment 1265182 [details]
proposed fix

Test:
[root@rh73-node1:~]# pcs stonith create aaa fence_xvm:test
Error: Invalid stonith agent name 'fence_xvm:test'. List of agents can be obtained by using command 'pcs stonith list'. Do not use the 'stonith:' prefix. Agent name cannot contain the ':' character.
[root@rh73-node1:~]# pcs stonith create aaa fence_xvm:test --force
Error: Invalid stonith agent name 'fence_xvm:test'. List of agents can be obtained by using command 'pcs stonith list'. Do not use the 'stonith:' prefix. Agent name cannot contain the ':' character.

Comment 5 Ivan Devat 2017-04-10 16:00:44 UTC
After Fix:

[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.157-1.el7.x86_64

[vm-rhel72-1 ~] $ pcs stonith create aaa fence_xvm:test
Error: Invalid stonith agent name 'fence_xvm:test'. List of agents can be obtained by using command 'pcs stonith list'. Do not use the 'stonith:' prefix. Agent name cannot contain the ':' character.
[vm-rhel72-1 ~] $ pcs stonith create aaa fence_xvm:test --force
Error: Invalid stonith agent name 'fence_xvm:test'. List of agents can be obtained by using command 'pcs stonith list'. Do not use the 'stonith:' prefix. Agent name cannot contain the ':' character.

Comment 9 errata-xmlrpc 2017-08-01 18:26:07 UTC
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


Note You need to log in before you can comment on or make changes to this bug.