Bug 1841175 - When an Install Plan gets deleted, OLM does not create a new one
Summary: When an Install Plan gets deleted, OLM does not create a new one
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.4
Hardware: Unspecified
OS: Unspecified
low
high
Target Milestone: ---
: 4.7.0
Assignee: Vu Dinh
QA Contact: Jian Zhang
URL:
Whiteboard:
: 1841179 1843394 1876501 (view as bug list)
Depends On:
Blocks: 1899747
TreeView+ depends on / blocked
 
Reported: 2020-05-28 14:43 UTC by Peter Braun
Modified: 2023-12-15 18:01 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Create a new InstallPlan if the previous pending InstallPlan is deleted Reason: Deleting an InstallPlan that is waiting for user approval will cause the operator to be stuck in unrecoverable state as the operator installation can't be completed Result: OLM will create a new InstallPlan to replace the deleted one, allow users to approve the new InstallPlan and proceed with the operator installation.
Clone Of:
Environment:
Last Closed: 2021-02-24 15:12:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github operator-framework operator-lifecycle-manager pull 1843 0 None closed Bug 1841175: Recreate pending installplan if deleted before approval 2021-02-18 21:30:47 UTC
Red Hat Knowledge Base (Solution) 5437091 0 None None None 2020-09-27 15:12:51 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:13:02 UTC

Internal Links: 1843394

Description Peter Braun 2020-05-28 14:43:51 UTC
Description of problem:

When an InstallPlan is deleted, OLM currently does nothing. We would have expected it to check the latest available CSV again and create a new InstallPlan based on that.


How reproducible:

Every time.

Steps to Reproduce:
1. Install an Operator (that you have controll over) through OLM
2. Push an update for the operator
3. OLM finds the update and awaits for your approval.
4. Do not approve, instead delete the install plan

Actual results:

OLM does not create a new InstallPlan.

Expected results:

OLM creates a new InstallPlan based on the latest CSV.

Comment 1 Daniel Sover 2020-05-28 15:18:46 UTC
*** Bug 1841179 has been marked as a duplicate of this bug. ***

Comment 3 Vu Dinh 2020-05-28 17:14:55 UTC
This seems to reach a rare case when there is a pending-approval (manually) installplan and user deletes it and OLM fails to reconcile and recreate the installplan for some reason.

Comment 5 Peter Braun 2020-06-02 15:36:05 UTC
Is OLM supposed to create a new InstallPlan already? In that case, maybe I just didn't wait long enough (a few minutes)?

Comment 8 Kevin Rizza 2020-06-19 13:23:13 UTC
*** Bug 1843394 has been marked as a duplicate of this bug. ***

Comment 10 Nick Hale 2020-07-23 16:03:59 UTC
After some discussion, we've determined that a missing InstallPlan shouldn't be terminal state for a Subscription. We'll fix this in the upcoming sprint at the latest.

Comment 13 Daniel Sover 2020-09-08 14:17:31 UTC
*** Bug 1876501 has been marked as a duplicate of this bug. ***

Comment 19 Jian Zhang 2020-11-23 03:36:44 UTC
Cluster version is 4.7.0-0.nightly-2020-11-22-204912

[root@preserve-olm-env data]# oc -n openshift-operator-lifecycle-manager  exec catalog-operator-757d4dd574-splbt -- olm --version
OLM version: 0.17.0
git commit: 3cb2cfd3cb7122f1b740787c7150852fcbd26371

1, Create an operator.
[root@preserve-olm-env data]# oc get sub -n default
NAME   PACKAGE   SOURCE                CHANNEL
etcd   etcd      community-operators   singlenamespace-alpha
[root@preserve-olm-env data]# oc get ip -n default
NAME            CSV                   APPROVAL   APPROVED
install-hzlrl   etcdoperator.v0.9.4   Manual     false
[root@preserve-olm-env data]# oc get csv -n default
No resources found in default namespace.

2, Delete this unapproved InstallPlan.
[root@preserve-olm-env data]# oc delete ip install-hzlrl -n default
installplan.operators.coreos.com "install-hzlrl" deleted

A new InstallPlan generated, LGTM.
[root@preserve-olm-env data]# oc get ip -n default
NAME            CSV                   APPROVAL   APPROVED
install-426cr   etcdoperator.v0.9.4   Manual     false

3, Approve it and delete the approved InstallPlan.
[root@preserve-olm-env data]# oc get ip -n default
NAME            CSV                   APPROVAL   APPROVED
install-426cr   etcdoperator.v0.9.4   Manual     true
[root@preserve-olm-env data]# oc get csv -n default
NAME                  DISPLAY   VERSION   REPLACES              PHASE
etcdoperator.v0.9.4   etcd      0.9.4     etcdoperator.v0.9.2   Succeeded

[root@preserve-olm-env data]# oc delete ip install-426cr -n default
installplan.operators.coreos.com "install-426cr" deleted

[root@preserve-olm-env data]# oc get ip -n default
No resources found in default namespace.

The approved InstallPlan will not be recreated. LGTM, verify it.

Comment 22 errata-xmlrpc 2021-02-24 15:12:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:5633


Note You need to log in before you can comment on or make changes to this bug.