Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-48641

ClusterVersion spec.desiredUpdate docs should explain requested-version vs. requested-image validation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 4.17, 4.18, 4.19
    • Documentation / OTA
    • None
    • None
    • 1
    • OTA 265, OTA 266
    • 2
    • False
    • Hide

      None

      Show
      None

      Description of problem

      Since 4.8, cvo#431 has the CVO checking to see whether the requested image's version matches the requested version, and erroring out if they don't match. For example, asking a 4.17.12 cluster to move to a 4.17.13 pullspec but claiming it will have a 4.17.99 version:

      oc patch clusterversion version --type json -p '[{"op": "add", "path": "/spec/desiredUpdate", "value": {"image": "quay.io/openshift-release-dev/ocp-release@sha256:82aa2a914d4cd964deda28b99049abbd1415f96c0929667b0499dd968864a8dd", "version": "4.17.99"}}]'
      

      fails with ReleaseAccepted=False:

      $ oc adm upgrade
      Cluster version is 4.17.12
      
      ReleaseAccepted=False
      
        Reason: VerifyPayloadVersion
        Message: Verifying payload failed version="4.17.99" image="quay.io/openshift-release-dev/ocp-release@sha256:82aa2a914d4cd964deda28b99049abbd1415f96c0929667b0499dd968864a8dd" failure=release image version 4.17.13 does not match the expected upstream version 4.17.99
      
      Upstream: https://api.integration.openshift.com/api/upgrades_info/graph
      Channel: candidate-4.17 (available channels: candidate-4.17, candidate-4.18, fast-4.17)
      
      Recommended updates:
      
        VERSION     IMAGE
        4.17.13     quay.io/openshift-release-dev/ocp-release@sha256:82aa2a914d4cd964deda28b99049abbd1415f96c0929667b0499dd968864a8dd
      

      API godocs should be updated to accurately explain this behavior.

      Version-Release number of selected component

      The current CVO behavior dates back to 4.8, cvo#431. The current (and incorrect) API godocs date back to 4.13, api#1339.

      How reproducible

      Every time.

      Steps to Reproduce

      1. View ClusterVersion API docs, e.g. 4.17's.

      Actual results

      See strings like "version is ignored if image is specified".

      Expected results

      Have the actual cluster-version operator behavior accurately described.

      Additional info

      cvo#431 landing in 4.8:

      cvo$ git diff origin/release-4.7..origin/release-4.8 -- pkg/cvo/sync_worker.go | grep -2 FIXME                         err = fmt.Errorf("release image version %s does not match the expected upstream version %s", payloadUpdate.Release.Version, work.Desired.Version)
                              w.eventRecorder.Eventf(cvoObjectRef, corev1.EventTypeWarning, "VerifyPayloadVersionFailed", "verifying payload failed version=%q image=%q failure=%v", work.Desired.Version, work.Desired.Image, err)
      -                       /* FIXME: Ignore for now.  I will make this fatal in a follow-up pivot
                              reporter.Report(SyncWorkerStatus{
                                      Generation:  work.Generation,
      

      api#1339 landing in 4.13:

      api$ git diff origin/release-4.12..origin/release-4.13 -- config/v1/types_cluster_version.go | grep 'version is ignored if image is specified'
      +       // version is ignored if image is specified and required if
      

              trking W. Trevor King
              trking W. Trevor King
              Jia Liu Jia Liu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: