Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-13434

includes/excludes does not work as expected with container image prepare

XMLWordPrintable

    • EDPM Sprint 1
    • 1
    • Moderate

      Problem description:

      In some contexts, it could be tricky to deal with excludes/includes strategies in the ContainerImagePrepare when the image we are trying to manage (like "keystone" in this case) is not unique and the other images contains the same string in their names (i.e "openstack-barbican-keystone-listener").

      Let's provide an example/reproducer:

      Expected behavior

      • openstack-keystone:16.2.6-18.1734046226 being pulled ( temporary workaround for [0] )
      • openstack-barbican-keystone-listener:16.2.6-$latest being pulled

       

      1) prepare a container prepare template containing 2 strategies to define which openstack-keystone container image should be pulled/deployed using includes/excludes:

       

      parameter_defaults:
        ContainerImagePrepare:
        - push_destination: true
          set:
            ceph_alertmanager_image: ose-prometheus-alertmanager
      [..]
            rhel_containers: false
            tag: '16.2.6'
          tag_from_label: '{version}-{release}'
          excludes:
            - keystone
        - push_destination: true
          includes:
            - keystone
          set:
            namespace: registry.redhat.io/rhosp-rhel8
            tag: 16.2.6-18.1734046226
            name_prefix: openstack-
            name_suffix: '' 

       

       

      2) run tripleo container image prepare:

       

      sudo openstack tripleo container image prepare -e ~/containers-prepare-parameter.yaml 

       

       

       

      Result:

      Tripleo will try to pull "openstack-barbican-keystone-listener/manifests/16.2.6-18.1734046226", which does not exists:

       

      requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://registry.redhat.io/v2/rhosp-rhel8/openstack-barbican-keystone-listener/manifests/16.2.6-18.1734046226

       

       

       [0]https://issues.redhat.com/browse/OSPRH-12936

              drosenfe David Rosenfeld
              rh-ee-fpiccion Flavio Piccioni
              rhos-dfg-df
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: