Description of problem: When we create migplan from the backend it should verify the target namespace name and report warnings if itβs not a DNS compliant name. Version-Release number of selected component (if applicable): SOURCE CLUSTER: AWS 4.6 (MTC 1.6.0) TARGET CLUSTER: AWS 4.9 (MTC 1.6.0) (CONTROLLER + UI) How reproducible: Always Steps to Reproduce: 1. Create a migplan from UI 2. Edit migplan from backend $ oc edit migplan test -n openshift-migration 3.Map namespace to any destination namespace which is not DNS compliant $ oc get migplan -n openshift-migration test -o yaml spec: destMigClusterRef: name: host namespace: openshift-migration indirectImageMigration: true indirectVolumeMigration: true migStorageRef: name: automatic namespace: openshift-migration namespaces: - test:test- Actual results: Migplan is in ready state Expected results: Migplan should be in not ready state Additional info: Migplan is in ready state Expected results: Migplan should be in not ready state Additional Info: oc get migplan -n openshift-migration test -o yaml status: conditions: - category: Required lastTransitionTime: "2021-09-20T09:38:27Z" message: The `persistentVolumes` list has been updated with discovered PVs. reason: Done status: "True" type: PvsDiscovered - category: Required lastTransitionTime: "2021-09-20T09:38:27Z" message: The storage resources have been created. reason: Done status: "True" type: StorageEnsured - category: Required lastTransitionTime: "2021-09-20T09:38:27Z" message: The migration plan is ready. status: "True" type: Ready
The code is written in a way that it filters out the namespace from not DNS compliant names, in this case, mig-plan controller filters the namespace name "test" from the passed name "test:test-", and since the namespaces named "test" exists in the source cluster the plan will eventually end up in Ready state if everything else is alright! This is the expected behavior since such behavior is explicitly coded in, this shouldn't be considered as a bug. @
@
Sorry, I misread the code and comments on bug, fixed the bug and with this PR - https://github.com/konveyor/mig-controller/pull/1250 and now the result is namespaces: - 'crane-ui-plugin:test-' srcMigClusterRef: name: source namespace: openshift-migration status: conditions: - category: Warn lastTransitionTime: '2022-01-10T18:46:37Z' message: >- Cluster operator versions do not match. Source, destination, and host clusters must all have the same MTC operator version. reason: Conflict status: 'True' type: ClusterVersionMismatch - category: Required lastTransitionTime: '2022-01-10T18:46:40Z' message: The `persistentVolumes` list has been updated with discovered PVs. reason: Done status: 'True' type: PvsDiscovered - category: Critical lastTransitionTime: '2022-01-10T18:58:44Z' message: 'Destination Namespaces [test-] are not DNS compliant.' reason: NotDNSCompliant status: 'True' type: NotDNSCompliantNamespece
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) 1.7.0 release advisory), 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-2022:1043