Bug 2027196

Summary: "migration-controller" pod goes into "CrashLoopBackoff" state if an invalid registry route is entered on the "Clusters" page of the web console
Product: Migration Toolkit for Containers Reporter: Xin jiang <xjiang>
Component: ControllerAssignee: Jaydip Gabani <jgabani>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: medium Docs Contact: Avital Pinnick <apinnick>
Priority: medium    
Version: 1.6.2CC: apinnick, ernelson, hitpatel, jmatthew, rjohnson, ssingla
Target Milestone: ---   
Target Release: 1.6.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2026693 Environment:
Last Closed: 2022-01-20 06:31:35 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: 2026693    
Bug Blocks:    

Description Xin jiang 2021-11-29 05:54:54 UTC
+++ This bug was initially created as a clone of Bug #2026693 +++

Description of problem: 

Migration Controller pod goes to “CrashLoopBackoff” when invalid route is entered from the “Expose route host to image registry” 

Version-Release number of selected component (if applicable):

MTC 1.5.2
SOURCE CLUSTER: AWS 3.11 MTC 1.5.2
TARGET CLUSTER: AWS 4.5 MTC 1.5.2

How reproducible:
Always

Steps to reproduce:

1. Login to the MTC UI and Go to the “Clusters” page.
2. Edit the source-cluster and provide any random value to “Expose route host to image registry”. For Ex: docker-registry-abc.com 
3. Click on “Update Cluster”
4. Login to the target cluster and check the migration-controller pod

Actual result:


It goes to “CrashLoopBackOff” state


Expected result:

It should not crash and properly validate the registry route


Additional Info:

{"level":"info","ts":1637847331.6560373,"logger":"cluster","msg":"CR","migCluster":"host","conditions":{"conditions":[{"type":"Ready","status":"True","category":"Required","message":"The cluster is ready.","lastTransitionTime":"2021-11-25T10:09:27Z"}]}}
{"level":"info","ts":1637847331.9475632,"logger":"cluster","msg":"CR","migCluster":"source-cluster","conditions":{"conditions":[{"type":"Ready","status":"True","category":"Required","message":"The cluster is ready.","lastTransitionTime":"2021-11-25T10:11:57Z"}]}}
E1125 13:35:31.947725       1 runtime.go:78] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
goroutine 579 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic(0x231a3a0, 0x3b945a0)
	/remote-source/app/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:74 +0x95
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)

Comment 1 Xin jiang 2021-11-29 05:56:45 UTC
This issue also is present in 1.6.2

Comment 11 errata-xmlrpc 2022-01-20 06:31:35 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: Migration Toolkit for Containers (MTC) 1.6.3 security and bug fix 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-2022:0202