Bug 1934666

Summary: MigrationController pod crash-loops because of nil pointer exception
Product: Migration Toolkit for Containers Reporter: Guillermo Ojea Quitana <gojeaqui>
Component: ControllerAssignee: Scott Seago <sseago>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: medium Docs Contact: Avital Pinnick <apinnick>
Priority: unspecified    
Version: 1.4.1CC: dwhatley, ernelson, mbagga, rjohnson, sseago
Target Milestone: ---   
Target Release: 1.4.2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-15 08:15:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
migration-controller pod log none

Description Guillermo Ojea Quitana 2021-03-03 16:11:58 UTC
Created attachment 1760415 [details]
migration-controller pod log

Description of problem:
Migration Controller Pod starts crash looping.

Error observed in the logs:
/opt/rh/go-toolset-1.15/root/usr/lib/go-toolset-1.15-golang/src/runtime/asm_amd64.s:1374
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x16503cd]

And:
E0303 16:04:59.456071       1 runtime.go:69] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)

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


How reproducible:
Difficult, only happened once by now but I upgraded to MTC v1.4.1 yesterday

Steps to Reproduce:
1. ?
2. ?
3. ?

Actual results:


Expected results:


Additional info:

Comment 1 Derek Whatley 2021-03-03 16:13:44 UTC
This bug is related to `getDISMProgress()` in `pkg/apis/migration/v1alpha1/directimagemigration_types.go:203`

Nil ptr exception while constructing progress string. Fix will be to check for nils.

is := fmt.Sprintf("ImageStream %s (dism %s): %s ", path.Join(item.Namespace, item.Name), path.Join(item.DirectMigration.Namespace, item.DirectMigration.Name), state)

Comment 6 Xin jiang 2021-03-09 02:43:10 UTC
verified with following steps:



1. In source cluster. Create a new namespace
$ oc new-project bz-test


2. In source cluster. Create an internal imagestream in this namespace
oc new-build -D $'FROM centos:7\nRUN yum install -y httpd' -n bz-test

3. Execute the migration for bz-test namespace

Comment 7 Guillermo Ojea Quitana 2021-03-09 14:00:35 UTC
I think this bug is also related to this one:
https://bugzilla.redhat.com/show_bug.cgi?id=1935357

It seems that under some circumstances the Direct Image Migration object is not being created.

I can only guess without knowing the code.

Comment 11 errata-xmlrpc 2021-03-15 08:15:38 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 (Migration Toolkit for Containers (MTC) image release advisory 1.4.2), 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/RHBA-2021:0814