Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1913039

Summary: Not able to get latest ovn_controller image after hotfix and minor update
Product: Red Hat OpenStack Reporter: Jeremy <jmelvin>
Component: python-paunchAssignee: Steve Baker <sbaker>
Status: CLOSED DUPLICATE QA Contact: nlevinki <nlevinki>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 16.1 (Train)CC: aschultz, dbecker, mburns, morazi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-05 20:42:05 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:

Description Jeremy 2021-01-05 19:34:40 UTC
Description of problem:Customer followed [1] to add the fix package from [2] into the ovn-controller image. Later the fix was released so they did minor update to get the latest ovn-controller image that would have the fix. For some reason however the ovn-controller image does not get updated. We made sure to update the containers-prepare-parameter.yaml to remove the hotfix image. Tried stopping, starting container , rebooting controller; still the old image (16.1.2-6) with old package exists. We need the 16.1.3-6 image on the controller. IT's already on the undercloud. 

Need to figure out how to force the overcloud to use the new image, or how to fix the overcloud update to use the new image.



[1] https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html-single/director_installation_and_usage/index#installing-additional-rpm-files-to-container-images


[2] https://bugzilla.redhat.com/show_bug.cgi?id=1871931
fixed in ovn2.13-20.09.0-4.el8fdp


[3] https://catalog.redhat.com/software/containers/rhosp-rhel8/openstack-ovn-controller/5de6c6b9bed8bd164a0c1e79?tag=16.1.2-6&push_date=1603911606000&container-tabs=packages


Version-Release number of selected component (if applicable):


How reproducible:
unknown

Actual results:
ovn-controller image not updated after overcloud update

Expected results:
image updated

Additional info:

###tag says 16.1, which the undercloud 16.1 image is the latest 
[root@xxxxx heat-admin]# paunch debug --file /var/lib/tripleo-config/container-startup-config/step_4/ovn_controller.json --container ovn_controller --action dump-json > ovn_controller.json
[root@xxxx heat-admin]# cat ovn_controller.json |grep image
        "image": "xxxxx.ctlplane.localdomain:8787/rhosp-rhel8/openstack-ovn-controller:16.1",



cat containers-prepare-parameter.yaml
# Generated with the following on 2020-12-01T14:11:52.258034
#
#   openstack tripleo container image prepare default --local-push-destination --output-env-file containers-prepare-parameter.yaml
#

parameter_defaults:
  ContainerImagePrepare:
  - push_destination: true
    set:
      name_prefix: openstack-
      name_suffix: ''
      namespace: registry.redhat.io/rhosp-rhel8
      neutron_driver: ovn
      rhel_containers: false
      tag: '16.1'
    tag_from_label: '{version}-{release}'
    includes:
    - ovn-controller
    modify_role: tripleo-modify-image
    modify_append_tag: "-hotfix"
    modify_vars:
      tasks_from: rpm_install.yml
      rpms_path: /home/stack/neutron-hotfix-pkgs

  ContainerImageRegistryCredentials:
    registry.redhat.io:
xxxx



##The undercloud has the latest image:
(undercloud) [stack@xxxx ~]$ sudo skopeo inspect docker://xxxx.ctlplane.localdomain:8787/rhosp-rhel8/openstack-ovn-controller:16.1 | grep -i url
        "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/rhosp16/openstack-ovn-controller/images/16.1.3-6",




####But the image is not updating on the controller.:

[root@xxxxx heat-admin]# podman inspect ovn_controller | grep -i url
                "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/rhosp16/openstack-ovn-controller/images/16.1.2-6",

Comment 2 Alex Schultz 2021-01-05 20:42:05 UTC
You are currently suffering from https://bugzilla.redhat.com/show_bug.cgi?id=1881476.  Additionally the container-image-prepare is incorrect if that's the entirety for what you are trying to do. You would likely only want to patch the ovn containers instead of all of them but that's not what you have configured.

You would want to do something like:

parameter_defaults:
  ContainerImagePrepare:
  - push_destination: true
    set:
      name_prefix: openstack-
      name_suffix: ''
      namespace: registry.redhat.io/rhosp-rhel8
      neutron_driver: ovn
      rhel_containers: false
    tag_from_label: '{version}-{release}'
    excludes:
    - ovn-controller
  - push_destination: true
    set:
      name_prefix: openstack-
      name_suffix: ''
      namespace: registry.redhat.io/rhosp-rhel8
      neutron_driver: ovn
      rhel_containers: false
    tag_from_label: '{version}-{release}'
    includes:
    - ovn-controller
    modify_role: tripleo-modify-image
    modify_append_tag: "-hotfix"
    modify_vars:
      tasks_from: rpm_install.yml
      rpms_path: /home/stack/neutron-hotfix-pkgs

  ContainerImageRegistryCredentials:
    registry.redhat.io:
xxxx


Note: do not specify both tag and tag_from_label. You should do either but not both. As of 16.1.2, tag takes precedence so it's being defined as :16.1 and not being updated due to the paunch bug.  If you want to lock to a specific 16.1.x, you can use tag: 16.1.3 instead of tag_from_label but you'll also need the paunch patch.

*** This bug has been marked as a duplicate of bug 1881476 ***