Bug 1816962

Summary: Upgrade from 1.0.1 to 1.1.2 fails
Product: OpenShift Container Platform Reporter: Sergio <sregidor>
Component: Migration ToolingAssignee: Jason Montleon <jmontleo>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: high Docs Contact:
Priority: high    
Version: 4.3.zCC: chezhang, dymurray, ernelson, jmatthew, pvauter, rpattath, whu, xjiang
Target Milestone: ---   
Target Release: 4.3.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 1816960 Environment:
Last Closed: 2020-04-23 17:32:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1816960    
Bug Blocks:    

Description Sergio 2020-03-25 09:26:31 UTC
+++ This bug was initially created as a clone of Bug #1816960 +++

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:34 UTC
https://github.com/konveyor/mig-operator/pull/273

Comment 2 Sergio 2020-03-30 15:57:44 UTC
Verified in CAM 1.1.2 stage

Comment 5 errata-xmlrpc 2020-04-23 17:32:08 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:1552