Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1657166

Summary: Updating a bundle is a bit cumbersome
Product: Red Hat Enterprise Linux 8 Reporter: Ivan Devat <idevat>
Component: pcsAssignee: Ivan Devat <idevat>
Status: CLOSED ERRATA QA Contact: pkomarov
Severity: urgent Docs Contact:
Priority: urgent    
Version: 8.0CC: abeekhof, cfeist, cluster-maint, cluster-qe, gouthamr, idevat, jpokorny, michele, mlisik, omular, pkomarov, tbarron, tojeline, wchadwic
Target Milestone: rcKeywords: FutureFeature
Target Release: 8.1Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: pcs-0.10.2-2.el8 Doc Type: Enhancement
Doc Text:
Feature: An ability to update bundle to look exactly like specified. Reason: User (OpenStack) needs to update bundle by full specification but command `pcs bundle update` expects only changes. Result: New command `pcs bundle reset` was introduced.
Story Points: ---
Clone Of: 1598197 Environment:
Last Closed: 2019-11-05 20:39:38 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:
Bug Depends On: 1682129    
Bug Blocks:    
Attachments:
Description Flags
proposed fix
none
additional fix
none
additional fix none

Comment 1 Ivan Devat 2019-01-21 17:10:49 UTC
Created attachment 1522204 [details]
proposed fix

[ant8 ~] $ pcs cluster cib|grep 'id="B1"' -A2
      <bundle id="B1">
        <docker image="pcs:test"/>
      </bundle>
[ant8 ~] $ pcs resource bundle reset B1 container docker image=pcs:new
[ant8 ~] $ pcs cluster cib|grep 'id="B1"' -A2
      <bundle id="B1">
        <docker image="pcs:new"/>
      </bundle>

Comment 3 Ondrej Mular 2019-05-02 12:00:37 UTC
After fix:
[root@rhel81-node1 ~]# rpm -q pcs
pcs-0.10.1-6.el8.x86_64

[root@rhel81-node1 ~]# pcs resource bundle create B1 container docker image=pcs:new promoted-max=2
[root@rhel81-node1 ~]# pcs cluster cib|grep 'id="B1"' -A2
      <bundle id="B1">
        <docker image="pcs:new" promoted-max="2"/>
      </bundle>
[root@rhel81-node1 ~]# pcs resource bundle reset B1 container docker image=pcs:updated replicas=3
[root@rhel81-node1 ~]# pcs cluster cib|grep 'id="B1"' -A2
      <bundle id="B1">
        <docker image="pcs:updated" replicas="3"/>
      </bundle>

Comment 5 Tomas Jelinek 2019-06-18 14:36:17 UTC
See bz1598197 comment 13

Comment 10 Ivan Devat 2019-06-26 12:31:44 UTC
Created attachment 1584811 [details]
additional fix

Comment 11 Ivan Devat 2019-06-26 12:32:29 UTC
Created attachment 1584812 [details]
additional fix

Comment 12 Ivan Devat 2019-06-27 12:17:27 UTC
After Fix

[ant8 ~] $ rpm -q pcs
pcs-0.10.2-2.el8.x86_64

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

Comment 15 pkomarov 2019-09-03 19:50:51 UTC
Verified, 

[stack@undercloud-0 ~]$ ansible overcloud_nodes -mshell -b -a'rpm -q pcs'

compute-1 | CHANGED | rc=0 >>
pcs-0.10.2-2.el8.x86_64

compute-0 | CHANGED | rc=0 >>
pcs-0.10.2-2.el8.x86_64

controller-1 | CHANGED | rc=0 >>
pcs-0.10.2-2.el8.x86_64

controller-0 | CHANGED | rc=0 >>
pcs-0.10.2-2.el8.x86_64

controller-2 | CHANGED | rc=0 >>
pcs-0.10.2-2.el8.x86_64


[root@controller-1 ~]# pcs resource show galera-bundle|head -n 3
Warning: This command is deprecated and will be removed. Please use 'pcs resource config' instead.
 Bundle: galera-bundle
  Podman: image=192.168.24.1:8787/rhosp15/openstack-mariadb:pcmklatest masters=3 network=host options="--user=root --log-driver=journald -e KOLLA_CONFIG_STRATEGY=COPY_ALWAYS" replicas=3 run-command="/bin/bash /usr/local/bin/kolla_start"

[root@controller-1 ~]#  pcs resource bundle reset galera-bundle container image=192.168.24.1:8787/rhosp15/openstack-mariadb:pcmklatest masters=2

[root@controller-1 ~]# pcs resource show galera-bundle|head -n 3
Warning: This command is deprecated and will be removed. Please use 'pcs resource config' instead.
 Bundle: galera-bundle
  Podman: image=192.168.24.1:8787/rhosp15/openstack-mariadb:pcmklatest masters=2

[root@controller-1 ~]#  pcs resource bundle reset galera-bundle container image=192.168.24.1:8787/rhosp15/openstack-mariadb:pcmklatest masters=3
Warning: container option 'masters' is deprecated and should not be used, use promoted-max instead
[root@controller-1 ~]# pcs resource show galera-bundle|head -n 3
Warning: This command is deprecated and will be removed. Please use 'pcs resource config' instead.
 Bundle: galera-bundle
  Podman: image=192.168.24.1:8787/rhosp15/openstack-mariadb:pcmklatest masters=3

Comment 17 errata-xmlrpc 2019-11-05 20:39:38 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/RHEA-2019:3311