Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

Operator cannot be updated using OLM #1026

Closed
wtrocki opened this issue Sep 17, 2021 · 7 comments
Closed

Operator cannot be updated using OLM #1026

wtrocki opened this issue Sep 17, 2021 · 7 comments
Labels
kind/bug Something isn't working

Comments

@wtrocki
Copy link

wtrocki commented Sep 17, 2021

What is the environment (Minikube, Openshift)?

New version fails to update on the number of clusters (tests, end users, demo clusters, workshops etc.).

What is the SBO version used?

0.10.0

What are the steps to reproduce this issue?

  1. Have older version of Operator installed with OLM autoupdates
  2. Just wait :)

What is the expected behaviour?

Operator running

What is the actual behaviour?

Operator ends up in some strange state (two operators visible)
New one crashing in the loop (logs attached)
Old is not functional

Service Binding Operator Logs

Logs:
https://gist.github.com/b1zzu/c33f01cc1d565adcab2165295cf38f02

Additional Information (Screenshots, etc)

image
Screenshot 2021-09-17 at 16 16 29

@wtrocki wtrocki added the kind/bug Something isn't working label Sep 17, 2021
@wtrocki wtrocki changed the title [Critical] Operator cannot be updated using OLM Operator cannot be updated using OLM Sep 17, 2021
@wtrocki
Copy link
Author

wtrocki commented Sep 17, 2021

If you notice that problem.

Workaround:

Remove both operators
Cleanup all CR's and things left out by the operator (Not possible in some cases)
Install fresh operator version

@pmacik
Copy link
Contributor

pmacik commented Sep 17, 2021

Error message:

 install strategy failed: Deployment.apps "service-binding-operator" is
        invalid: spec.selector: Invalid value:
        v1.LabelSelector{MatchLabels:map[string]string{"control-plane":"service-binding-controller-manager"},
        MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable

The reason is most likely the change of the name of the control-pane of the controller manager introduced in #1020

/cc @pedjak

@pmacik
Copy link
Contributor

pmacik commented Sep 17, 2021

@wtrocki @pedjak I found and tested another (smaller) workaround for 0.9.1->0.10.0 update:

  • Delete the "old" service-binding-operator deployment
oc delete deployment service-binding-operator -n openshift-operators

no need to remove both operators or cleanup all CRs

@wtrocki
Copy link
Author

wtrocki commented Sep 17, 2021

@pmacik Thank you so much!

@xkwangcn
Copy link

xkwangcn commented Sep 27, 2021

Is this issue fixed now?
When update from 0.9.1->0.10.0, I also have this error

install strategy failed: Deployment.apps "service-binding-operator" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"control-plane":"service-binding-controller-manager"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable

And I uninstall 0.9.1 and reinstall 0.10.0 is succeed.

@xkwangcn
Copy link

But I met a new error, after installed 0.10.0, can't install 0.9.1 success.
I uninstall 0.10.0 from console, and then install 0.9.1, pending:
image

image

@pedjak
Copy link
Contributor

pedjak commented Sep 30, 2021

This is an OLM issue, reported here: operator-framework/operator-lifecycle-manager#1608 and closed with a proposed workaround, that we cannot apply on the existing releases. Closing. Moving forward we will have that proposed workaround in mind.

@pedjak pedjak closed this as completed Sep 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants