console icon indicating copy to clipboard operation
console copied to clipboard

[WIP] Bug 2012120: Console deletes operands regardless of interdependency

Open dtaylor113 opened this issue 4 years ago • 24 comments

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:

  1. A step has been added to wait for all operands to be deleted before attempting to uninstall the operator. image See video.

  2. 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 image

After this PR image

dtaylor113 avatar Oct 20 '21 14:10 dtaylor113

@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.

openshift-ci[bot] avatar Oct 20 '21 14:10 openshift-ci[bot]

@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.

openshift-ci[bot] avatar Oct 25 '21 15:10 openshift-ci[bot]

@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.

openshift-ci[bot] avatar Oct 27 '21 19:10 openshift-ci[bot]

/retest

dtaylor113 avatar Oct 28 '21 20:10 dtaylor113

/retest

dtaylor113 avatar Oct 29 '21 13:10 dtaylor113

/retest-required

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

openshift-bot avatar Nov 02 '21 10:11 openshift-bot

/retest-required

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

openshift-bot avatar Nov 02 '21 10:11 openshift-bot

/retest-required

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

openshift-bot avatar Nov 02 '21 12:11 openshift-bot

/retest-required

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

openshift-bot avatar Nov 02 '21 12:11 openshift-bot

/retest-required

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

openshift-bot avatar Nov 02 '21 14:11 openshift-bot

/retest-required

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

openshift-bot avatar Nov 02 '21 14:11 openshift-bot

/hold

spadgett avatar Nov 02 '21 19:11 spadgett

New changes are detected. LGTM label has been removed.

openshift-ci[bot] avatar Nov 03 '21 19:11 openshift-ci[bot]

/retest

dtaylor113 avatar Nov 04 '21 14:11 dtaylor113

[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

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[bot] avatar Nov 05 '21 15:11 openshift-ci[bot]

/retest

dtaylor113 avatar Nov 08 '21 20:11 dtaylor113

/retest

dtaylor113 avatar Nov 09 '21 23:11 dtaylor113

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.

kdoberst avatar Nov 30 '21 19:11 kdoberst

@kevinrizza may need to help with "... an option for an operator to 'opt out' of the automated delete process"

dtaylor113 avatar Dec 02 '21 19:12 dtaylor113

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

dtaylor113 avatar Dec 14 '21 17:12 dtaylor113

/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 avatar Jan 28 '22 18:01 openshift-bot

@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.

openshift-ci[bot] avatar Jan 28 '22 18:01 openshift-ci[bot]

Tying some threads together :slightly_smiling_face:

Here's where the OLM folks landed on their perspective of the "Operand Deletion" feature:

  1. 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.

  2. 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"

  3. 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.

joelanford avatar Mar 23 '22 18:03 joelanford

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.

jhadvig avatar Jul 20 '22 16:07 jhadvig

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

openshift-bot avatar Oct 19 '22 01:10 openshift-bot

@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.

openshift-merge-robot avatar Oct 19 '22 01:10 openshift-merge-robot

Closing in favour of https://github.com/openshift/console/pull/12234

jhadvig avatar Nov 11 '22 14:11 jhadvig

@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.

openshift-ci[bot] avatar Nov 11 '22 14:11 openshift-ci[bot]