Skip to content

Conversation

@wking
Copy link
Member

@wking wking commented Jun 28, 2022

We dropped the run-level label from this namespace back in 8120317 (#159, 4.5). But because of how the cluster-version operator reconciles manifest labels, dropping a label from the manifest does not remove it from the in-cluster resource when old clusters are updated into the new manifest. This commit uses the approach the cluster-version operator used to drop its run-level, by setting the value to an empty string, which the run-level-consuming code treats identically to an unset label.

This avoids errors about:

...container has runAsNonRoot and image will run as root...

when updating to 4.11. Because the namespace manifest sorts before the deployment manifest, there is probably no need to get this change back into 4.10 manifests, although that wouldn't hurt.

We dropped the run-level label from this namespace back in 8120317
(no need to run CCO as privileged pod, 2020-03-03, openshift#159, 4.5 [1]).
But because of how the cluster-version operator reconciles manifest
labels, dropping a label from the manifest does not remove it from the
in-cluster resource when old clusters are updated into the new
manifest [2].  This commit uses the approach the cluster-version
operator used to drop its run-level [3], by setting the value to an
empty string, which the run-level-consuming code treats identically to
an unset label.

This avoids errors about:

  ...container has runAsNonRoot and image will run as root...

when updating to 4.11 [4].  Because the namespace manifest sorts
before the deployment manifest, there is probably no need to get this
change back into 4.10 manifests, although that wouldn't hurt.

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1806892
[2]: https://issues.redhat.com/browse/OTA-330
[3]: openshift/cluster-version-operator@539e944#diff-39019af7716ea5d1b86c1eb34e131de533e2701b1bb3014f9a2d71be603ff345R12
[4]: https://bugzilla.redhat.com/show_bug.cgi?id=2101880#c2
@openshift-ci openshift-ci bot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Jun 28, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 28, 2022

@wking: This pull request references Bugzilla bug 2101880, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.12.0) matches configured target release for branch (4.12.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @shivanthi-amara

Details

In response to this:

Bug 2101880: manifests/00-namespace: Set empty openshift.io/run-level

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jianping-shu
Copy link

/cc @jianping-shu

@openshift-ci openshift-ci bot requested a review from jianping-shu June 28, 2022 22:53
Copy link
Contributor

@akhil-rane akhil-rane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 28, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 28, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akhil-rane, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 28, 2022
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD c34501f and 8 for PR HEAD 8b47de1 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 1 against base HEAD c34501f and 7 for PR HEAD 8b47de1 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD c34501f and 6 for PR HEAD 8b47de1 in total

@jianping-shu
Copy link

Reproduced w/ the following steps:

  1. Install OCP cluster with 4.10.20
  2. oc label namespace openshift-cloud-credential-operator openshift.io/run-level=1
  3. oc adm upgrade --to-image quay.io/openshift-release-dev/ocp-release:4.11.0-fc.3-x86_64 --allow-explicit-upgrade --force
  4. The error appeared
    jianpingshu@jshu-mac ~ % oc get clusterversion
    NAME VERSION AVAILABLE PROGRESSING SINCE STATUS
    version 4.10.20 True True 81m Unable to apply 4.11.0-fc.3: the workload openshift-cloud-credential-operator/cloud-credential-operator has not yet successfully rolled out
    jianpingshu@jshu-mac ~ % oc get pods -n openshift-cloud-credential-operator
    NAME READY STATUS RESTARTS AGE
    cloud-credential-operator-7d4cf55cc4-gtlzw 1/2 CreateContainerConfigError 0 56m
    pod-identity-webhook-86c4b798bd-7jg48 1/1 Running 0 108m
  5. oc edit namespace openshift-cloud-credential-operator to remove "run-level=1"
  6. Upgrade finished successfully
    jianpingshu@jshu-mac ~ % oc get clusterversion -w
    NAME VERSION AVAILABLE PROGRESSING SINCE STATUS
    version 4.11.0-fc.3 True False 0s Cluster version is 4.11.0-fc.3

@jianping-shu
Copy link

Verified with cluster-bot build.

  1. Install OCP cluster with version 4.10.20
  2. oc label namespace openshift-cloud-credential-operator openshift.io/run-level=1
  3. oc adm upgrade --to-image registry.build05.ci.openshift.org/ci-ln-1nmfcrb/release:latest --allow-explicit-upgrade --force
  4. The upgrade was successful
    jianpingshu@jshu-mac ~ % oc get clusterversion -w
    NAME VERSION AVAILABLE PROGRESSING SINCE STATUS
    version 4.11.0-0.ci.test-2022-06-29-063403-ci-ln-1nmfcrb-latest True False 0s Cluster version is 4.11.0-0.ci.test-2022-06-29-063403-ci-ln-1nmfcrb-latest
  5. Check run-level label
    jianpingshu@jshu-mac verify % oc get namespace openshift-cloud-credential-operator -o yaml|grep run-level
    openshift.io/run-level: ""

@akhil-rane
Copy link
Contributor

/retest

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD 8287b02 and 5 for PR HEAD 8b47de1 in total

@codecov
Copy link

codecov bot commented Jun 29, 2022

Codecov Report

Merging #472 (8287b02) into master (c34501f) will not change coverage.
The diff coverage is n/a.

❗ Current head 8287b02 differs from pull request most recent head 8b47de1. Consider uploading reports for the commit 8b47de1 to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #472   +/-   ##
=======================================
  Coverage   46.08%   46.08%           
=======================================
  Files          94       94           
  Lines        9422     9422           
=======================================
  Hits         4342     4342           
  Misses       4553     4553           
  Partials      527      527           

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD 0d885d7 and 4 for PR HEAD 8b47de1 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 1 against base HEAD 0d885d7 and 3 for PR HEAD 8b47de1 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 0d885d7 and 2 for PR HEAD 8b47de1 in total

@akhil-rane
Copy link
Contributor

/override ci/prow/e2e-aws

@akhil-rane
Copy link
Contributor

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 30, 2022

@akhil-rane: Overrode contexts on behalf of akhil-rane: ci/prow/e2e-aws

Details

In response to this:

/override ci/prow/e2e-aws

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@akhil-rane
Copy link
Contributor

/override ci/prow/e2e-aws

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 30, 2022

@akhil-rane: Overrode contexts on behalf of akhil-rane: ci/prow/e2e-aws

Details

In response to this:

/override ci/prow/e2e-aws

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@akhil-rane
Copy link
Contributor

/override ci/prow/e2e-upgrade

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 30, 2022

@akhil-rane: Overrode contexts on behalf of akhil-rane: ci/prow/e2e-upgrade

Details

In response to this:

/override ci/prow/e2e-upgrade

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 30, 2022

@wking: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-ci openshift-ci bot merged commit ac1f02f into openshift:master Jun 30, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 30, 2022

@wking: All pull requests linked via external trackers have merged:

Bugzilla bug 2101880 has been moved to the MODIFIED state.

Details

In response to this:

Bug 2101880: manifests/00-namespace: Set empty openshift.io/run-level

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@akhil-rane
Copy link
Contributor

/cherry-pick release-4.11

@openshift-cherrypick-robot

@akhil-rane: new pull request created: #473

Details

In response to this:

/cherry-pick release-4.11

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants