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 1344712 - pcs resource create command fails when duplicate parameter is used
Summary: pcs resource create command fails when duplicate parameter is used
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.3
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: Ivan Devat
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-10 13:06 UTC by Roman Bednář
Modified: 2017-08-01 18:22 UTC (History)
6 users (show)

Fixed In Version: pcs-0.9.156-1.el7
Doc Type: Bug Fix
Doc Text:
Cause: The user enters the same option multiple times with different values (by a mistake). Pcs omits all earlier values and uses the last value. Consequence: The user is not notified that entered ambiguous option value. The content of cib can be different than what the user wanted. Fix: Pcs requires a unambiguous option value. Result: The user cannot successfully enter unambiguous option value.
Clone Of:
Environment:
Last Closed: 2017-08-01 18:22:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed fix (part1) (203.81 KB, patch)
2017-02-01 15:34 UTC, Ivan Devat
no flags Details | Diff
proposed fix (part2) (3.63 KB, patch)
2017-02-01 15:36 UTC, Ivan Devat
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 Roman Bednář 2016-06-10 13:06:06 UTC
Description of problem:
resource creation fails when used with duplicate arguments, see reproducer.


How reproducible:
always

Steps to Reproduce:
1. setup pcs
2. #pcs resource create dummy dummy aaa=bbb aaa=ccc --force


Actual results:
command fails and CIB is dumped

Expected results:
error message or override of the previous(duplicate) parameters

Additional info:
applies to all resources

Comment 2 Ivan Devat 2017-02-01 15:34:40 UTC
Created attachment 1246692 [details]
proposed fix (part1)

Comment 3 Ivan Devat 2017-02-01 15:36:01 UTC
Created attachment 1246693 [details]
proposed fix (part2)

Tests are in the patch.

Comment 4 Ivan Devat 2017-02-20 07:55:34 UTC
After Fix:

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

[vm-rhel72-1 ~] $ pcs resource create dummy ocf:heartbeat:Dummy aaa=bbb aaa=ccc
Error: duplicate option 'aaa' with different values 'bbb' and 'ccc'

[vm-rhel72-1 ~] $ pcs resource create dummy ocf:heartbeat:Dummy aaa=bbb aaa=ccc --force
Error: duplicate option 'aaa' with different values 'bbb' and 'ccc'

Comment 8 errata-xmlrpc 2017-08-01 18:22:57 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.