Bug 1975372 - Destination namespace in MigPlan custom resource is not validated
Summary: Destination namespace in MigPlan custom resource is not validated
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: Controller
Version: 1.5.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 1.6.0
Assignee: Scott Seago
QA Contact: Xin jiang
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-23 14:14 UTC by Sergio
Modified: 2021-09-29 14:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-29 14:35:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github konveyor mig-controller pull 1172 0 None None None 2021-08-18 20:11:56 UTC
Red Hat Product Errata RHSA-2021:3694 0 None None None 2021-09-29 14:35:12 UTC

Description Sergio 2021-06-23 14:14:42 UTC
Description of problem:
When we create a migration plan using the CLI and the we map the source namespace to a destination namespace with a name longer than 63 characters, the migration plan does not show any critical condition. Any migration using a destination namespace with an invalid namespace name will fail, migrations to not-valid namespaces should not be allowed.

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

How reproducible:
Always

Steps to Reproduce:
1. Create a migration plan using the CLI (not the UI) and map the namespace to a destination namespace longer than 63 characters.

Actual results:
No errors or problems reported.

(In DVM an warning is reported regarding the route, though, but even if we take that into account the migration will fail. We need to report a critical condition and forbid the execution of the migration)

Expected results:
The controller should validate that the destination namespace is a valid namespace format. We should probably validate the regexp to make sure that destination namespace is always valid.

Additional info:

Comment 4 Xin jiang 2021-08-30 07:35:51 UTC
Verified by Prasad. 

Image:
 image: registry.redhat.io/rhmtc/openshift-migration-controller-rhel8@sha256:d1bb94853b42abef96ec2c63600ebac41b0163d88fc25571f7b40c6c1d2f8c40

Comment 6 errata-xmlrpc 2021-09-29 14:35:03 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.0 security & bugfix 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-2021:3694


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