Bug 1934666 - MigrationController pod crash-loops because of nil pointer exception
Summary: MigrationController pod crash-loops because of nil pointer exception
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: Controller
Version: 1.4.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: 1.4.2
Assignee: Scott Seago
QA Contact: Xin jiang
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-03 16:11 UTC by Guillermo Ojea Quitana
Modified: 2024-06-14 00:37 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-15 08:15:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
migration-controller pod log (17.34 KB, text/plain)
2021-03-03 16:11 UTC, Guillermo Ojea Quitana
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github konveyor mig-controller pull 978 0 None open Bug 1934666: Fixed nil pointer error with DIM progress reporting 2021-03-03 16:14:00 UTC
Red Hat Product Errata RHBA-2021:0814 0 None None None 2021-03-15 08:15:46 UTC

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


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