Bug 1816960 - Upgrade from 1.0.1 to 1.1.2 fails
Summary: Upgrade from 1.0.1 to 1.1.2 fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Migration Tooling
Version: 4.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.4.0
Assignee: John Matthews
QA Contact: Xin jiang
URL:
Whiteboard:
Depends On:
Blocks: 1816962
TreeView+ depends on / blocked
 
Reported: 2020-03-25 09:23 UTC by Sergio
Modified: 2020-05-28 11:10 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1816962 (view as bug list)
Environment:
Last Closed: 2020-05-28 11:09:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
operator logs (1.06 MB, text/plain)
2020-03-25 09:23 UTC, Sergio
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:2326 0 None None None 2020-05-28 11:10:37 UTC

Description Sergio 2020-03-25 09:23:05 UTC
Created attachment 1673348 [details]
operator logs

Description of problem:
When we try to upgrade CAM from version 1.0.1 to version 1.1.2 the operator fails and controller and UI pods are not upgraded. Restic pods and velero are upgraded, though.

Version-Release number of selected component (if applicable):
CAM 1.1.2 stage
OCP 4.3


How reproducible:
Always

Steps to Reproduce:
1. Install 1.0.1 with controller and UI in an OCP 4.3 cluster
2. Upgrade to 1.1.2


Actual results:
Velero and restic pods are upgraded, but controller and UI pods are not. 

There is an error in the operator pod, regarding immutable attributes

TASK [migrationcontroller : Set up mig controller] *****************************\r
\u001b[1;30mtask path: /opt/ansible/roles/migrationcontroller/tasks/main.yml:378\u001b[0m
\u001b[0;31mfatal: [localhost]: FAILED! => {\"changed\": false, \"error\": 422, \"msg\": \"Failed to patch object: {\\\"kind\\\":\\\"Status\\\",\\\"apiVersion\\\":\\\"v1\\\",\\\"metadata\\\":{},\\\"status\\\":\\\"Failure\\\",\\\"message\\\":\\\"Deployment.apps \\\\\\\"migration-controller\\\\\\\" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{\\\\\\\"app\\\\\\\":\\\\\\\"migration\\\\\\\", \\\\\\\"control-plane\\\\\\\":\\\\\\\"controller-manager\\\\\\\", \\\\\\\"controller-tools.k8s.io\\\\\\\":\\\\\\\"1.0\\\\\\\"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable\\\",\\\"reason\\\":\\\"Invalid\\\",\\\"details\\\":{\\\"name\\\":\\\"migration-controller\\\",\\\"group\\\":\\\"apps\\\",\\\"kind\\\":\\\"Deployment\\\",\\\"causes\\\":[{\\\"reason\\\":\\\"FieldValueInvalid\\\",\\\"message\\\":\\\"Invalid value: v1.LabelSelector{MatchLabels:map[string]string{\\\\\\\"app\\\\\\\":\\\\\\\"migration\\\\\\\", \\\\\\\"control-plane\\\\\\\":\\\\\\\"controller-manager\\\\\\\", \\\\\\\"controller-tools.k8s.io\\\\\\\":\\\\\\\"1.0\\\\\\\"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable\\\",\\\"field\\\":\\\"spec.selector\\\"}]},\\\"code\\\":422}\
\", \"reason\": \"Unprocessable Entity\", \"status\": 422}\u001b[0m


Expected results:

The upgrade should have no failures, and all pods should be updated to the desired images.

Additional info:

Comment 1 Erik Nelson 2020-03-25 14:15:27 UTC
https://github.com/konveyor/mig-operator/pull/273

Comment 5 Sergio 2020-05-11 14:57:37 UTC
Verified using CAM 1.2 stage


Upgrading from 1.0.1 -> 1.2 upgraded all the pods.

$ oc get pods
NAME                                    READY   STATUS        RESTARTS   AGE
migration-controller-575b8cbf8d-tpjt7   2/2     Running       0          39s
migration-operator-67cf6c488-vp7hv      2/2     Running       0          2m22s
migration-ui-7658c877b9-fjd7s           1/1     Terminating   0          63m
migration-ui-fb9478878-mj46n            1/1     Running       0          32s
restic-hj4ms                            1/1     Running       0          39s
restic-kjvjz                            1/1     Running       0          23s
restic-sm9wd                            1/1     Running       0          54s
velero-68c5d86ccc-c6w6q                 1/1     Running       0          66s

$ oc get pods migration-operator-67cf6c488-vp7hv -o yaml | grep olm.ski
    olm.skipRange: '>=0.0.0 <1.2.0'

Comment 7 errata-xmlrpc 2020-05-28 11:09:55 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, 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/RHEA-2020:2326


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