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 1725849 - 'pcs resource bundle reset' fails if existing port-map and storage-map ids are reused
Summary: 'pcs resource bundle reset' fails if existing port-map and storage-map ids ar...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.7
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: 7.8
Assignee: Ivan Devat
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1734687
TreeView+ depends on / blocked
 
Reported: 2019-07-01 14:46 UTC by Tomas Jelinek
Modified: 2020-03-31 19:10 UTC (History)
9 users (show)

Fixed In Version: pcs-0.9.168-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1734687 (view as bug list)
Environment:
Last Closed: 2020-03-31 19:09:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed fix (42.31 KB, patch)
2019-07-22 07:24 UTC, Ivan Devat
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1598197 0 urgent CLOSED Updating a bundle is a bit cumbersome 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2020:0996 0 None None None 2020-03-31 19:10:01 UTC

Internal Links: 1598197

Description Tomas Jelinek 2019-07-01 14:46:17 UTC
Description of problem:
The 'pcs resource bundle reset' command fails when port-map or storage-map IDs of the specified existing bundle are reused in it.


Version-Release number of selected component (if applicable):
pcs-0.9.167-3.el7


How reproducible:
always, easily


Steps to Reproduce:
1. [root@virt-422 ~]# pcs resource bundle create BundleTest \
>   container docker \
>     image="pcstest:bundle-1" \
>     run-command=/usr/sbin/pacemaker_remoted \
>   network \
>     control-port=5000 \
>   port-map \
>     id=port-map-1 \
>     range=5000-5005 \
>   port-map \
>     id=port-map-2 \
>     port=50000 \
>     internal-port=5000 \
>   storage-map \
>     id=storage-map-1 \
>     source-dir=/tmp/bundles/1 \
>     target-dir=/tmp/1 \
>     options=ro \
>   storage-map \
>     id=storage-map-2 \
>     source-dir=/tmp/bundles/2 \
>     target-dir=/tmp/2 \
>     options=ro \
>   storage-map \
>     id=storage-map-3 \
>     source-dir=/tmp/bundles/3 \
>     target-dir=/tmp/3 \
>     options=ro \
>   meta \
>     bundle-meta-1=bundle-value-1 \
>     bundle-meta-2=bundle-value-2 \
>     --wait
resource 'BundleTest' is running on node 'virt-422'

2. # pcs resource bundle reset BundleTest \
>   container docker \
>     image="pcstest:bundle-1" \
>     run-command=/usr/sbin/pacemaker_remoted \
>   network \
>     control-port=5000 \
>   port-map \
>     id=port-map-1 \
>     range=5000-5005 \
>   storage-map \
>     id=storage-map-1 \
>     source-dir=/tmp/bundles/1 \
>     target-dir=/tmp/1 \
>     options=ro \
>   storage-map \
>     id=storage-map-2 \
>     source-dir=/tmp/bundles/2 \
>     target-dir=/tmp/2 \
>     options=ro \
>   meta \
>     bundle-meta-1=bundle-value-1 \
>     bundle-meta-2=bundle-value-2 \
>     --wait
Error: 'BundleTest' already exists
Error: 'port-map-1' already exists
Error: 'storage-map-1' already exists
Error: 'storage-map-2' already exists
[root@virt-422 ~]#
[root@virt-422 ~]# echo $?
1


Actual results:
The reset command fails saying IDs already exist.


Expected results:
The command succeeds and reconfigures the bundle.

Comment 2 Ivan Devat 2019-07-22 07:24:42 UTC
Created attachment 1592527 [details]
proposed fix

For tests see bz1657166#c12

Comment 6 Ivan Devat 2019-08-05 11:24:37 UTC
After Fix:

[kid76 ~] $ rpm -q pcs
pcs-0.9.168-1.el7.x86_64

[kid76 ~] $ pcs resource bundle create B1 container docker image=pcs:new port-map id=PM1 range=4000-4400 storage-map id=SM1 source-dir=/tmp/a target-dir=/tmp/b
[kid76 ~] $ pcs resource bundle reset B1 container image=pcs:new port-map id=PM1 range=4000-4400 storage-map id=SM1 source-dir=/tmp/a target-dir=/tmp/b
[kid76 ~] $ echo $?
0

Comment 10 errata-xmlrpc 2020-03-31 19:09:41 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-2020:0996


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