Bug 2062917

Summary: ImageVerificationFailed when upgrade ocp in disconnected env
Product: OpenShift Container Platform Reporter: yliu1
Component: Telco EdgeAssignee: Angie Wang <angwang>
Telco Edge sub component: ZTP QA Contact: yliu1
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: angwang, keyoung
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:    
Bug Blocks: 2067306    

Description yliu1 2022-03-10 22:06:35 UTC
Description of problem:
In a disconnected env, we have two options to start an ocp upgrade after ocp image is mirrored to disconnected registry:
1) use force option in clusterversion to skip upgrade path and image signature verification
2) use upgrade graph in disconnected env, and this option requires an additional image signature verification configmap to avoid using "force".  

Currently, if we want to use option2, user would need to apply the configmap to every spoke manually. 

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

How reproducible:
100%

Steps to Reproduce:
1. In a disconnected env, mirror the image to disconnected registry, and attempt to start upgrade
2. check clusterversion on spoke
3.

Actual results:
upgrade cannot start due to imageverficationfailed
- lastTransitionTime: "2022-03-10T21:29:11Z"
      message: 'The update cannot be verified: context deadline exceeded'
      reason: ImageVerificationFailed
      status: "True"
      type: Failing
    - lastTransitionTime: "2022-03-10T21:03:25Z"
      message: 'Unable to apply 4.10.4: the image may not be safe to use'
      reason: ImageVerificationFailed
      status: "True"
      type: Progressing

Expected results:
upgrade started

Additional info:
workaround is to manually apply a configmap on spoke like below to verify the signature.

[kni@provisionhost-0-0 ~]$ cat sigconfigmap.yaml 
apiVersion: v1
kind: ConfigMap
metadata:
  name: signature-yp-4.10.4
  namespace: openshift-config-managed
  labels:
    release.openshift.io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0yO3N3EqtHF9kXH6x2B+RsrY5/vi/d4uLJU37q0Jnj5He9lnpedHZn5+dGHbL91bv4v57ky6GFbLb+w10+Vyr9798gjPkG8nJCaYvtS2ancpWBb9LXHhoRvdqt4/OIUjDmUuW+Lot/y8mGcy28Z74UvYVR9I5Vgs+5Vk+z5xu3//xRNf3qwMyPzeCgA=

Comment 2 yliu1 2022-03-28 14:44:36 UTC
Mark as verified to unblock backport to 4.10 as we currently can't install 4.11 builds yet in pipeline.