Skip to content

OCPBUGS-7904: [release-4.11] OCPBUGS-1556: Cleanup conversion webhooks when an operator is uninstalled #388

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

openshift-cherrypick-robot

This is an automated cherry-pick of #360

/assign timflannagan

Problem: When uninstalling a CSV, OLM has always avoided deleting the
associated CRD as all CRs on cluster are subsequently deleted, possibly
resulting in user dataloss.

OLM supports defining conversion webhooks within the CSV. On cluster,
conversion webhooks are defined with a CRD and point to a service that
handles conversion.  If the service is unable to fulfill the request,
all requests against the CRs associated with the CRD will fail.

When uninstalling a CSV, OLM does not remove the conversion webhook from
the CRD, meaning that all requests against the CRs associated with the
CRD will fail, resulting in at least two concerns:
1. OLM is unable to subsequently reinstall the operator. When installing
   a CSV, if the CRD already exists and instances of CRs exist as well,
   OLM performs a series of checks which ensure that none of the CRs are
   invalidated against the new schema. The existing CRD's conversion
   webhooks points to a non-existant service, causing the check to fail
   and preventing installs.
2. Broken conversion webhooks causes kubernete's garbage collection to
   fail.

Solution: When a CSV is deleted, if no CSV exists that is replacing it,
set the CRD's conversion strategy to None.

Signed-off-by: Alexander Greene <[email protected]>

Upstream-commit: 94374983d448c56d031f0493b84b6dce37b84741
Upstream-repository: operator-lifecycle-manager
@openshift-ci-robot
Copy link

@openshift-cherrypick-robot: Jira Issue OCPBUGS-78 has been cloned as Jira Issue OCPBUGS-1556. Retitling PR to link against new bug.
/retitle [release-4.11] OCPBUGS-1556: Cleanup conversion webhooks when an operator is uninstalled

In response to this:

This is an automated cherry-pick of #360

/assign timflannagan

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 openshift-ci bot changed the title [release-4.11] OCPBUGS-78: Cleanup conversion webhooks when an operator is uninstalled [release-4.11] OCPBUGS-1556: Cleanup conversion webhooks when an operator is uninstalled Sep 20, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 20, 2022

@openshift-cherrypick-robot: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

[release-4.11] OCPBUGS-1556: Cleanup conversion webhooks when an operator is uninstalled

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-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid 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 Sep 20, 2022
@openshift-ci-robot
Copy link

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-1556, which is valid. The bug has been moved to the POST state.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.11.z) matches configured target version for branch (4.11.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • dependent bug Jira Issue OCPBUGS-78 is in the state Verified (Done), which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE))
  • dependent Jira Issue OCPBUGS-78 targets the "4.12.0" version, which is one of the valid target versions: 4.12.0
  • bug has dependents

Requesting review from QA contact:
/cc @jianzhangbjz

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This is an automated cherry-pick of #360

/assign timflannagan

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 openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 20, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 20, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: openshift-cherrypick-robot, timflannagan

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 20, 2022
@kuiwang02
Copy link

the verification is done with PR. please refer to https://issues.redhat.com/browse/OCPBUGS-1556
/label cherry-pick-approved
/label qe-approved

@openshift-ci openshift-ci bot added cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. qe-approved Signifies that QE has signed off on this PR labels Sep 21, 2022
@timflannagan
Copy link
Contributor

/retest

@awgreene
Copy link
Contributor

/label backport-risk-assessed
/retest

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Sep 21, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 21, 2022

@openshift-cherrypick-robot: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-olm-flaky eb07e3c link false /test e2e-gcp-olm-flaky

Full PR test history. Your PR dashboard.

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-merge-robot openshift-merge-robot merged commit 6094188 into openshift:release-4.11 Sep 21, 2022
@openshift-ci-robot
Copy link

@openshift-cherrypick-robot: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-1556 has been moved to the MODIFIED state.

In response to this:

This is an automated cherry-pick of #360

/assign timflannagan

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.

@awgreene
Copy link
Contributor

awgreene commented Nov 8, 2022

/cherry-pick release-4.10

@openshift-cherrypick-robot
Copy link
Author

@awgreene: #388 failed to apply on top of branch "release-4.10":

Applying: Cleanup conversion webhooks when an operator is uninstalled (#2832)
Using index info to reconstruct a base tree...
M	staging/operator-lifecycle-manager/pkg/controller/operators/olm/operator.go
M	staging/operator-lifecycle-manager/test/e2e/csv_e2e_test.go
M	staging/operator-lifecycle-manager/test/e2e/webhook_e2e_test.go
M	vendor/github.com/operator-framework/operator-lifecycle-manager/pkg/controller/operators/olm/operator.go
Falling back to patching base and 3-way merge...
Auto-merging vendor/github.com/operator-framework/operator-lifecycle-manager/pkg/controller/operators/olm/operator.go
Auto-merging staging/operator-lifecycle-manager/test/e2e/webhook_e2e_test.go
CONFLICT (content): Merge conflict in staging/operator-lifecycle-manager/test/e2e/webhook_e2e_test.go
Auto-merging staging/operator-lifecycle-manager/test/e2e/csv_e2e_test.go
Auto-merging staging/operator-lifecycle-manager/pkg/controller/operators/olm/operator.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Cleanup conversion webhooks when an operator is uninstalled (#2832)
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-4.10

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.

@awgreene
Copy link
Contributor

/jira cherrypick OCPBUGS-1556

@openshift-ci-robot
Copy link

@awgreene: Jira Issue OCPBUGS-1556 has been cloned as Jira Issue OCPBUGS-7904. Retitling PR to link against new bug.
/retitle OCPBUGS-7904: [release-4.11] OCPBUGS-1556: Cleanup conversion webhooks when an operator is uninstalled

In response to this:

/jira cherrypick OCPBUGS-1556

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 openshift-ci bot changed the title [release-4.11] OCPBUGS-1556: Cleanup conversion webhooks when an operator is uninstalled OCPBUGS-7904: [release-4.11] OCPBUGS-1556: Cleanup conversion webhooks when an operator is uninstalled Feb 22, 2023
@openshift-ci-robot
Copy link

@openshift-cherrypick-robot: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-7904 has been moved to the MODIFIED state.

In response to this:

This is an automated cherry-pick of #360

/assign timflannagan

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.

@awgreene
Copy link
Contributor

/rename [release-4.11] OCPBUGS-1556: Cleanup conversion webhooks when an operator is uninstalled

perdasilva added a commit to perdasilva/operator-framework-olm that referenced this pull request Jan 15, 2025
Signed-off-by: Per Goncalves da Silva <[email protected]>
Co-authored-by: Per Goncalves da Silva <[email protected]>
Upstream-repository: api
Upstream-commit: e1ecd3a20bba3b7057043afc95ff7a4434c26e43
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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants