Description of problem: While creating an intra-cluster state migration plan, change the target namespace value to the same as source. UI is showing migration type as a state-migration but from backend itβs showing it as storage class conversion. Version-Release number of selected component (if applicable): MTC 1.7.0 How reproducible: Always Steps to Reproduce: 1. Create an empty project in source cluster $ oc new-project test 2. Login to the MTC UI and Click on "Create migplan" button 3. Enter the plan name 4. Select migration type as a "State migration" 5. Select target and source cluster as a same 6. On the namespace page click on the edit button(Pencil Icon) and change the target namespace value to similar as source. 7. Click on Next and create a migplan Actual results: Backend is treating this plan as a storageclass conversion but the UI is showing the migration type as a state migration. Expected results: UI should not allow us to change/edit the target namespace value which is equal to source namespace. Additional info: $ oc get migplan test -o yaml apiVersion: migration.openshift.io/v1alpha1 kind: MigPlan metadata: annotations: migration.openshift.io/selected-migplan-type: state name: test namespace: openshift-migration spec: destMigClusterRef: name: source-cluster namespace: openshift-migration migStorageRef: name: automatic namespace: openshift-migration namespaces: - ocp-32834-pvc-terminating:ocp-32834-pvc-terminating srcMigClusterRef: name: source-cluster namespace: openshift-migration status: conditions: - category: Advisory lastTransitionTime: "2022-02-22T12:36:35Z" message: This is an intra-cluster migration plan and none of the source namespaces are mapped to different destination namespaces. This plan can only be used for Storage Conversion. reason: StorageConversionPlan status: "True" type: MigrationTypeIdentified - category: Required lastTransitionTime: "2022-02-22T12:36:36Z" message: The `persistentVolumes` list has been updated with discovered PVs. reason: Done status: "True" type: PvsDiscovered - category: Required lastTransitionTime: "2022-02-22T12:36:36Z" message: The storage resources have been created. reason: Done status: "True" type: StorageEnsured - category: Required lastTransitionTime: "2022-02-22T12:36:36Z" message: The migration plan is ready. status: "True" type: Ready destStorageClasses: - accessModes: - ReadWriteOnce default: true name: gp2 provisioner: kubernetes.io/aws-ebs excludedResources: - imagetags - templateinstances - clusterserviceversions - packagemanifests - subscriptions - servicebrokers - servicebindings - serviceclasses - serviceinstances - serviceplans - operatorgroups - events - events.events.k8s.io - rolebindings.authorization.openshift.io observedDigest: e97b7e5e0e9393493fa3ffb090f69dcae0201b10c34382305e5a15f2f3efc1f4 srcStorageClasses: - accessModes: - ReadWriteOnce default: true name: gp2 provisioner: kubernetes.io/aws-ebs
Verified with MTC 1.7.2 (Stage) UI is not allowing target namespace as source. I see the below warning under the target namespace section when source and target namespace name is same. """ Target namespace name cannot be the same as source namespace name. Enter a unique name for this target namespace. """ Moving this to verified status.
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.7.2 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:5483