[WIP] Bug 2012120: Console deletes operands regardless of interdependency
While there are several issues and options discussed in this BZ, this PR attempts to fix this root cause:
"there's an issue that if the CSV (and thus the operator deployment) gets deleted before operands get deleted, then operands with finalizers will get stuck waiting (forever) for something to handle and remove the finalizer(s)."
To that end, this PR does two things:
-
A step has been added to wait for all operands to be deleted before attempting to uninstall the operator.
See video. -
If there is an error deleting an operand, then the uninstall of the operator is NOT performed and an error alert is shown
Before this PR

After this PR

@dtaylor113: This pull request references Bugzilla bug 2012120, 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.10.0) matches configured target release for branch (4.10.0)
- bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Requesting review from QA contact: /cc @yapei
In response to this:
[WIP] Bug 2012120: Console deletes operands regardless of interdependency
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.
@dtaylor113: This pull request references Bugzilla bug 2012120, which is valid.
3 validation(s) were run on this bug
- bug is open, matching expected state (open)
- bug target release (4.10.0) matches configured target release for branch (4.10.0)
- bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Requesting review from QA contact: /cc @yapei
In response to this:
Bug 2012120: Console deletes operands regardless of interdependency
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.
@dtaylor113: This pull request references Bugzilla bug 2012120, which is valid.
3 validation(s) were run on this bug
- bug is open, matching expected state (open)
- bug target release (4.10.0) matches configured target release for branch (4.10.0)
- bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Requesting review from QA contact: /cc @yapei
In response to this:
[WIP] Bug 2012120: Console deletes operands regardless of interdependency
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.
/retest
/retest
/hold
New changes are detected. LGTM label has been removed.
/retest
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: dtaylor113, jhadvig
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~frontend/packages/operator-lifecycle-manager/OWNERS~~ [jhadvig]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/retest
/retest
For right now let's keep this on hold. There are discussions on how operators should be deleted - especially to ensure that the CLI and console work the same way. In addition, there may be an option for an operator to "opt out" of the automated delete process requiring the user to remove dependencies manually.
@kevinrizza may need to help with "... an option for an operator to 'opt out' of the automated delete process"
Latest comment in BZ about this PR:
Dan Kenigsberg 2021-12-14 15:14:43 UTC
Please keep the severity=high. As an owner of a complex operator, I would like to opt out of this feature.
Console (or anyone) should not delete anything in openshift-cnv but the top-level CR. I would like to
annotate my CSV so that the option to delete parts of the resources is not exposed in UI.
Please share with us the opt-out annotation as soon as you can, because we have only one sprint for
our own API freeze.
Hi @spadgett & @alimobrem, I'm not sure whose doing the opt-out annotation? -thanks
/bugzilla refresh
The requirements for Bugzilla bugs have changed (BZs linked to PRs on master branch need to target OCP 4.11), recalculating validity.
@openshift-bot: This pull request references Bugzilla bug 2012120, which is invalid:
- expected the bug to target the "4.11.0" release, but it targets "4.10.0" instead
Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.
In response to this:
/bugzilla refresh
The requirements for Bugzilla bugs have changed (BZs linked to PRs on master branch need to target OCP 4.11), recalculating validity.
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.
Tying some threads together :slightly_smiling_face:
Here's where the OLM folks landed on their perspective of the "Operand Deletion" feature:
We're punting this feature to 4.11. There's not enough time to get this change into Console, communicate it to operator authors, have them test whether they support operand deletion, and if they don't, for them to submit a new bundle version that uses the opt-out mechanism.
The OLM team decided to stick with the original decision of using an annotation in the CSV to allow operator versions to opt-out of operand deletion. The primary reason for this decision was to make it as easy as possible for operator authors to set the opt-out. Using only operator conditions would force operator authors to make code changes.
This decision does not preclude further discussion around allowing dynamic opt-out via operator conditions. The annotation and operator condition mechanisms are not mutually exclusive.
The chosen annotation name is "console.openshift.io/disable-operand-delete"
We want to land this feature in Console as quickly as possible after 4.11 master opens so that we can go ahead and communicate with operator authors and have them start testing against 4.11 nightlies.
We aim to fix this BZ as part of the 4.12 release. We created s story, which is part of the OLM epic for 4.12, to track this effort.
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
/lifecycle stale
@dtaylor113: PR needs rebase.
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.
Closing in favour of https://github.com/openshift/console/pull/12234
@dtaylor113: This pull request references Bugzilla bug 2012120. The bug has been updated to no longer refer to the pull request using the external bug tracker. All external bug links have been closed. The bug has been moved to the NEW state. Warning: Failed to comment on Bugzilla bug with reason for changed state.
In response to this:
[WIP] Bug 2012120: Console deletes operands regardless of interdependency
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.