Bug 2059359

Summary: platform upgrade policy cannot determine whether a cluster is compliant or not
Product: OpenShift Container Platform Reporter: Nishant Parekh <nparekh>
Component: Telco EdgeAssignee: Nishant Parekh <nparekh>
Telco Edge sub component: RAN QA Contact: yliu1
Status: CLOSED ERRATA Docs Contact:
Severity: urgent    
Priority: unspecified CC: alosadag, angwang, grajaiya, keyoung, mcornea, yliu1
Version: 4.11   
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2038954 Environment:
Last Closed: 2022-08-26 16:43:57 UTC Type: ---
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: 2038954    

Comment 1 yliu1 2022-03-01 01:05:31 UTC
Status field cannot be overridden from PGT.

See https://bugzilla.redhat.com/show_bug.cgi?id=2038954#c3 for details.

Comment 2 yliu1 2022-03-04 20:57:58 UTC
I tried using two source-crs, but once the second policy becomes compliant, the first will be NonCompliant because of different wave numbers added in the source-crs. 

ztp-upgrade.du-upgrade-cluster-version-policy1   inform               NonCompliant       7d23h
ztp-upgrade.du-upgrade-cluster-version-policy2   inform               Compliant          130m

PGTs used: http://registry.kni-qe-0.lab.eng.rdu2.redhat.com:3000/kni-qe/ztp-site-configs/src/0f94253f803fc32a380cd601a4c4fd0322b704e9/policygentemplates/upgrade.yaml#L24-L45

Also, since we now added code to handle status field, we can use only one source-cr. This source-cr should have default spec.channel and spec.upstream set, and have spec.desiredUpdate and status fields commented out (commenting out so user can still see them as example if they check source-crs).

Comment 3 Nishant Parekh 2022-03-06 17:55:26 UTC
updated here: https://github.com/openshift-kni/cnf-features-deploy/pull/995
per the discussion on the PR the sourceCRs are consolidated into 1.

Comment 5 yliu1 2022-03-11 13:48:04 UTC
Set to verified by reviewing the code. end to end test will be done with 4.10 ztp container.