Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-30132

OCP 4.15.0 is not correctly refreshing operator catalogs (imagePullPolicy: IfNotPresent)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Critical Critical
    • 4.16.0
    • 4.15.0
    • OLM
    • Critical
    • Yes
    • Approved
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, Operator catalogs were not being refreshed properly, due to the `imagePullPolicy` field being set to `IfNotPresent` for the index image. This bug fix updates {olm} to use the appropriate image pull policy for catalogs, and as a result catalogs are refreshed properly. (link:https://issues.redhat.com/browse/OCPBUGS-30132[*OCPBUGS-30132*])
      Show
      * Previously, Operator catalogs were not being refreshed properly, due to the `imagePullPolicy` field being set to `IfNotPresent` for the index image. This bug fix updates {olm} to use the appropriate image pull policy for catalogs, and as a result catalogs are refreshed properly. (link: https://issues.redhat.com/browse/OCPBUGS-30132 [* OCPBUGS-30132 *])
    • Bug Fix
    • Done

      Description of problem:

      In OCP 4.14 the catalog pods in openshift-marketplace where defined as:
      
      $ oc get pods -n openshift-marketplace redhat-operators-4bnz4 -o yaml
      apiVersion: v1
      kind: Pod
      metadata:
      ...
        labels:
          olm.catalogSource: redhat-operators
          olm.pod-spec-hash: 658b699dc
        name: redhat-operators-4bnz4
        namespace: openshift-marketplace
      ...
      spec:
        containers:
        - image: registry.redhat.io/redhat/redhat-operator-index:v4.14
          imagePullPolicy: Always
      
      
      
      Now on OCP 4.15 they are defined as:
      apiVersion: v1
      kind: Pod
      metadata:
      ...
        name: redhat-operators-44wxs
        namespace: openshift-marketplace
        ownerReferences:
        - apiVersion: operators.coreos.com/v1alpha1
          blockOwnerDeletion: false
          controller: true
          kind: CatalogSource
          name: redhat-operators
          uid: 3b41ac7b-7ad1-4d58-a62f-4a9e667ae356
        resourceVersion: "877589"
        uid: 65ad927c-3764-4412-8d34-82fd856a4cbc
      spec:
        containers:
        - args:
          - serve
          - /extracted-catalog/catalog
          - --cache-dir=/extracted-catalog/cache
          command:
          - /bin/opm
      ...
          image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:7259b65d8ae04c89cf8c4211e4d9ddc054bb8aebc7f26fac6699b314dc40dbe3
          imagePullPolicy: Always
      ...
        initContainers:
      ...
        - args:
          - --catalog.from=/configs
          - --catalog.to=/extracted-catalog/catalog
          - --cache.from=/tmp/cache
          - --cache.to=/extracted-catalog/cache
          command:
          - /utilities/copy-content
          image: registry.redhat.io/redhat/redhat-operator-index:v4.15
          imagePullPolicy: IfNotPresent
      ...
      
      
      
      And due to `imagePullPolicy: IfNotPresent` on the initContainer used to extract the index image (referenced by tag) content, they are never really updated. 
      
      
          

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

          OCP 4.15.0    

      How reproducible:

          100%    

      Steps to Reproduce:

          1. wait for the next version of a released operator on OCP 4.15
          2.
          3.
          

      Actual results:

          Operator catalogs are never really refreshed due to  imagePullPolicy: IfNotPresent for the index image

      Expected results:

          Operator catalogs are periodically (every 10 minutes by default) refreshed

      Additional info:

          

              krizza@redhat.com Kevin Rizza
              stirabos Simone Tiraboschi
              Jian Zhang Jian Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: