openshift / openshift/managed-upgrade-operator

Channel is not updated when both spec.desired.image and spec.desired.channel are set in UpgradeConfig

Open
#698 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
52
Forks
113
Avg merge
17h 20m
Merged PRs (30d)
4

Description

Summary

When an UpgradeConfig has spec.desired.image populated alongside spec.desired.channel
and spec.desired.version, the operator performs the version upgrade but never updates the
cluster's channel to match spec.desired.channel. This means that after a cross-minor
upgrade (e.g. stable-4.20 -> stable-4.21), the cluster's channel stays on the old value and
has to be changed manually afterwards via oc adm upgrade channel.

Steps to reproduce
  1. Cluster is on channel stable-4.20, running version 4.20.27.
  2. Create/update an UpgradeConfig with all three desired fields populated, e.g.:
    spec:
      desired:
        channel: stable-4.21
        image: quay.io/openshift-release-dev/ocp-release@sha256:<digest>
        version: 4.21.27
    
  3. The upgrade proceeds and the cluster is successfully updated to version 4.21.27.
  4. The cluster's channel remains stable-4.20 instead of being updated to stable-4.21,
    even though channel: stable-4.21 was explicitly set in the UpgradeConfig.
Expected behavior

When spec.desired.channel is set and differs from the cluster's current channel, the
operator should update the cluster's channel to match, regardless of whether the upgrade
is being driven via spec.desired.image or via spec.desired.channel + spec.desired.version.
Today this only appears to happen for the latter case, not when image is also set.

Impact

Admins/automation that populate image (e.g. to pin an exact release) together with
channel for cross-minor upgrades end up with a cluster left on the wrong channel after
the upgrade completes, requiring a manual follow-up step to correct it. This is easy to
miss and can go unnoticed until the next upgrade cycle.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the operator handles UpgradeConfig.spec.desired.image, channel, and version during an upgrade. Compare the channel-update path when image is absent with the path when all three fields are set. Done means a configured channel is applied even when an image pins the release, while the existing version upgrade behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.