Bug 2052124

Summary: Updated operator index image is not picked up by catsrc pod
Product: OpenShift Container Platform Reporter: yliu1
Component: Telco EdgeAssignee: Sharat Akhoury <sakhoury>
Telco Edge sub component: ZTP QA Contact: yliu1
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: jramsay, mfilanov, nparekh, sakhoury
Version: 4.10   
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-26 16:43:57 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: 2074483, 2093486    
Bug Blocks: 2094368    

Description yliu1 2022-02-08 18:30:11 UTC
Description of problem:

DefaultCatsrc.yaml in ztp source-crs have registry poll disabled, so updated operator index image will not be picked up automatically, thus operator upgrade will not happen.

Following spec should be added to catsrc CR:
  updateStrategy:
    registryPoll: 
      interval: 10m


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

How reproducible:
100%

Steps to Reproduce:
1. Deploy a cluster via ZTP
2. Update redhat-operator catsrc index image
3. Wait for redhat-operators pod to restart and pick up the change

Actual results:
redhat-operators pod never restarted, old image is still used

Expected results:
redhat-operators pod restarted within poll interval to pick up the updated index image 

Additional info:
In our upgrade documentation, this info should also be included to ensure spoke cluster already has the up to date index image before triggering upgrade.

Comment 1 yliu1 2022-02-14 23:03:35 UTC
Workaround: Add updateStrategy to default catsrc in common PGT and make that policy enforce. (This policy needs to be applied first, so that subscriptions-policy will become nonCompliant.)

Comment 5 yliu1 2022-07-04 17:14:13 UTC
Perhaps there is build issue. I don't see this change in latest downstream ztp container image.

$ podman run registry-proxy.engineering.redhat.com/rh-osbs/openshift4-ztp-site-generate:v4.11.0 cat source-crs/DefaultCatsrc.yaml
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
    name: default-cat-source
    namespace: openshift-marketplace
    annotations:
        target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
        ran.openshift.io/ztp-deploy-wave: "1"
spec:
    displayName: default-cat-source
    image: $imageUrl
    publisher: Red Hat
    sourceType: grpc

Comment 6 Nishant Parekh 2022-07-08 11:00:45 UTC
this build should have the changes:
https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=2080403

Comment 7 yliu1 2022-07-08 14:56:54 UTC
Verified with latest 4.11 ztp site generate image.