Bug 2024398 - oc adm upgrade indicate a wrong cluster version when blocked by a precondition check [NEEDINFO]
Summary: oc adm upgrade indicate a wrong cluster version when blocked by a preconditio...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.10
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: ---
Assignee: Ross Peoples
QA Contact: liujia
URL:
Whiteboard: LifecycleStale
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-18 02:38 UTC by liujia
Modified: 2023-01-17 13:53 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-17 13:53:55 UTC
Target Upstream Version:
Embargoed:
mfojtik: needinfo?


Attachments (Terms of Use)

Description liujia 2021-11-18 02:38:46 UTC
Description of problem:
Copied from https://bugzilla.redhat.com/show_bug.cgi?id=1822752#c27


Version-Release number of selected component (if applicable):
4.10.0-0.nightly-2021-11-09-181140

How reproducible:
always

Steps to Reproduce:

Scenario 1(corresponding to the issue in description):
1. Install a v4.10 cluster

2. Patch cv with internal upstream

3. Pick up a available version without signature.
# ./oc adm upgrade --to 4.10.0-0.nightly-2021-11-10-212548
Updating to 4.10.0-0.nightly-2021-11-10-212548
# ./oc get clusterversion
NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.10.0-0.nightly-2021-11-09-181140   True        True          14m     Unable to apply 4.10.0-0.nightly-2021-11-10-212548: the image may not be safe to use
# ./oc adm upgrade
info: An upgrade is in progress. Unable to apply 4.10.0-0.nightly-2021-11-10-212548: the image may not be safe to use

Upstream: https://openshift-release.apps.ci.l2s4.p1.openshiftapps.com/graph
Channel: stable-4.10
Available Updates:

VERSION                            IMAGE
4.10.0-0.nightly-2021-11-10-212548 registry.ci.openshift.org/ocp/release@sha256:b15acfa35c303c15148e1032774c91df0b38ea2b3efee4d8c408777d64467c70

// Above shows the cluster is still at 4.10.0-0.nightly-2021-11-09-181140 and 4.10.0-0.nightly-2021-11-10-212548 is still in available list.

4. Go on to do upgrade to 4.10.0-0.nightly-2021-11-10-212548.
# ./oc adm upgrade --to 4.10.0-0.nightly-2021-11-10-212548
info: Cluster is already at version 4.10.0-0.nightly-2021-11-10-212548 (// Here the information is not correct, which hint a wrong cluster version)

5. Let's go back to 4.10.0-0.nightly-2021-11-09-181140.
# ./oc adm upgrade --to 4.10.0-0.nightly-2021-11-09-181140
error: The update 4.10.0-0.nightly-2021-11-09-181140 is not one of the available updates: 4.10.0-0.nightly-2021-11-10-212548

6. Then we can cancel the upgrade(// Could we add the cancel way in above information if users don't know how to get rid of the predicament?)
# ./oc adm upgrade --clear
Cleared the update field, still at 4.10.0-0.nightly-2021-11-10-212548 (// The version is still not correct, and the information still makes user confused, because the cancel actually happened, and it will go to original version)
# ./oc get clusterversion
NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.10.0-0.nightly-2021-11-09-181140   True        True          23m     Working towards 4.10.0-0.nightly-2021-11-09-181140: 363 of 756 done (48% complete)
# ./oc get clusterversion
NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.10.0-0.nightly-2021-11-09-181140   True        False         4m12s   Cluster version is 4.10.0-0.nightly-2021-11-09-181140

Actual results:
oc adm upgrade indicate a wrong cluster version.

Expected results:
During the block time, the current cluster version should be consistent and correct.

Additional info:

Comment 1 Jack Ottofaro 2021-12-01 21:34:52 UTC
(In reply to liujia from comment #0)
> ...
> 
> 2. Patch cv with internal upstream
> ...

What's the exact command you used for #2 above?

Comment 2 liujia 2021-12-02 01:12:14 UTC
> What's the exact command you used for #2 above?
oc patch clusterversion/version --patch '{"spec":{"upstream":"https://openshift-release.apps.ci.l2s4.p1.openshiftapps.com/graph"}}' --type=merge

Comment 3 Michal Fojtik 2022-01-01 01:22:28 UTC
This bug hasn't had any activity in the last 30 days. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're marking this bug as "LifecycleStale" and decreasing the severity/priority. If you have further information on the current state of the bug, please update it, otherwise this bug can be closed in about 7 days. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. Additionally, you can add LifecycleFrozen into Whiteboard if you think this bug should never be marked as stale. Please consult with bug assignee before you do that.


Note You need to log in before you can comment on or make changes to this bug.