Skip to content

Bug 1935909: Allow non-CSV-owned ServiceAccounts to satisfy CSV requirements. #2029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

benluddy
Copy link
Contributor

@benluddy benluddy commented Mar 4, 2021

The existing check, intended to prevent a race condition that could
occur during CSV upgrades, marks a ServiceAccount as NotPresent when
it has at least one owner but is not owned by the current CSV. It's
expected for the ServiceAccount "default" not to be have an
ownerreference to a CSV, so the check can be relaxed to only consider
owners of kind ClusterServiceVersion.

This also combines two ServiceAccount checks that were independently
added to address the same race condition into a single check.

@benluddy benluddy requested a review from dinhxuanvu March 4, 2021 20:38
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 4, 2021
@benluddy benluddy force-pushed the sa-present-when-owned-by-non-csv branch from 4af5d80 to b81e7ce Compare March 4, 2021 20:38
@benluddy
Copy link
Contributor Author

benluddy commented Mar 5, 2021

/test e2e-aws-console-olm

This test failure should now be resolved by openshift/console#8289.

@benluddy benluddy changed the title Allow non-CSV-owned ServiceAccounts to satisfy CSV requirements. Bug 1935909: Allow non-CSV-owned ServiceAccounts to satisfy CSV requirements. Mar 5, 2021
@openshift-ci-robot openshift-ci-robot 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 Mar 5, 2021
@openshift-ci-robot
Copy link
Collaborator

@benluddy: This pull request references Bugzilla bug 1935909, 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.8.0) matches configured target release for branch (4.8.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1935909: Allow non-CSV-owned ServiceAccounts to satisfy CSV requirements.

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.

@benluddy
Copy link
Contributor Author

benluddy commented Mar 5, 2021

/cherry-pick release-4.7

@openshift-cherrypick-robot

@benluddy: once the present PR merges, I will cherry-pick it on top of release-4.7 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.7

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.

@njhale
Copy link
Member

njhale commented Mar 5, 2021

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 5, 2021
@njhale
Copy link
Member

njhale commented Mar 5, 2021

/lgtm cancel

@benluddy said he was going to add some e2e tests.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 5, 2021
@benluddy benluddy linked an issue Mar 5, 2021 that may be closed by this pull request
@benluddy benluddy force-pushed the sa-present-when-owned-by-non-csv branch 2 times, most recently from 1014561 to 7a62dd1 Compare March 8, 2021 18:44
The existing check, intended to prevent a race condition that could
occur during CSV upgrades, marks a ServiceAccount as NotPresent when
it has at least one owner but is not owned by the current CSV. It's
expected for the ServiceAccount "default" not to be have an
ownerreference to a CSV, so the check can be relaxed to only consider
owners of kind ClusterServiceVersion.

This also combines two ServiceAccount checks that were independently
added to address the same race condition into a single check.

Signed-off-by: Ben Luddy <[email protected]>
@benluddy benluddy force-pushed the sa-present-when-owned-by-non-csv branch from 7a62dd1 to b375c4e Compare March 8, 2021 18:52
Copy link
Member

@njhale njhale 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-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 8, 2021
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benluddy, njhale

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

The pull request process is described here

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-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 8ccfdb9 into operator-framework:master Mar 9, 2021
@openshift-ci-robot
Copy link
Collaborator

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

Bugzilla bug 1935909 has been moved to the MODIFIED state.

In response to this:

Bug 1935909: Allow non-CSV-owned ServiceAccounts to satisfy CSV requirements.

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-cherrypick-robot

@benluddy: new pull request created: #2034

In response to this:

/cherry-pick release-4.7

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.

Service account is not owned by this ClusterServiceVersion
7 participants