Bug 2031793 - "migration-controller" pod goes into "CrashLoopBackOff" state if "MigPlan" CR contains an invalid "includedResources" resource
Summary: "migration-controller" pod goes into "CrashLoopBackOff" state if "MigPlan" CR...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: Controller
Version: 1.6.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: 1.6.3
Assignee: Pranav Gaikwad
QA Contact: Xin jiang
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-13 13:04 UTC by Simon Reber
Modified: 2025-04-04 13:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-01-20 06:31:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github konveyor mig-controller pull 1242 0 None open Bug 2031793: Add validation for provided resource list in the migplan 2021-12-14 16:55:07 UTC
Github konveyor mig-controller pull 1243 0 None open Bug 2031793: Add validation for provided resource list in the migplan (#1242) 2021-12-16 18:48:02 UTC
Red Hat Product Errata RHSA-2022:0202 0 None None None 2022-01-20 06:31:47 UTC

Description Simon Reber 2021-12-13 13:04:35 UTC
Description of problem:

When creating a `MigPlan` resource with `includedResources` and the `kind` for example has a typo or does not exist the `migration-controller` pod is stuck in `CrashLoopBackOff` state.

See https://docs.openshift.com/container-platform/4.9/migrating_from_ocp_3_to_4/advanced-migration-options-3-4.html#migration-kubernetes-objects_advanced-migration-options-3-4 for details about the `MigPlan`.

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

 - Migration Toolkit for Containers Operator 1.6.2

How reproducible:

 - Always

Steps to Reproduce:
1. Install Migration Toolkit for Containers Operator
2. Create a `MigPlan` that looks as following:

> apiVersion: migration.openshift.io/v1alpha1
> kind: MigPlan
> metadata:
>   name: <migplan>
>   namespace: openshift-migration
> spec:
>   includedResources:
>   - kind: Namespaces
>     group: ""
> [...]
>   labelSelector:
>     matchLabels:
>       <label> 
Mind the `kind: Namespaces` which is not valid (should be `kind: Namespace`)

3. Validate the state of migration-controller pod

Actual results:

The migration-controller pod is in `CrashLoopBackOff` state with `nil pointer` exception.

Expected results:

The migration-controller would in best case accept plural of resources (as per API definition) at if it's not valid report that `includedResources` is not valid but prevent the controller from going into `CrashLoopBackOff`

Additional info:

Comment 9 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


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