Description of problem: When we create a plan with a double dash in its name, the reconciliation fails. Version-Release number of selected component (if applicable): CAM 1.1.2 stage How reproducible: Always Steps to Reproduce: 1. Click on "Add" migration plan 2. Use a fill in the migration plan name with a name with a double dash. For instance "c1-mig-test--pi12" 3. Select the resources you want to migrate 4. In the "Persistent Volumes" screen an error will be displayed complaining about the reconciliation Actual results: An error occurs and is displayed in the Persistent Volumes screen The status of the migration plan is $ oc get migplan c1-mig-test--pi12 -o yaml -n openshift-migration ... status: conditions: - category: Required lastTransitionTime: "2020-04-14T13:41:29Z" message: The `persistentVolumes` list has been updated with discovered PVs. reason: Done status: "True" type: PvsDiscovered - category: Required lastTransitionTime: "2020-04-14T13:41:30Z" message: The storage resources have been created. status: "True" type: StorageEnsured - category: Critical lastTransitionTime: "2020-04-14T14:42:06Z" message: 'Reconcile failed: [ImageStream.image.openshift.io "registry-c1-mig-test--pi12-d7682" is invalid: metadata.name: Invalid value: "registry-c1-mig-test--pi12-d7682": must match "[a-z0-9]+(?:[._-][a-z0-9]+)*"]. See controller logs for details.' status: "True" type: ReconcileFailed Expected results: The migration should be reconciled properly or, if the name of the plan is not allowed, the name of the plan should be rejected in the migrationplan name field validation. Additional info:
https://github.com/konveyor/mig-controller/pull/483
Moving to POST as our controller side change allows for migplans to have double dashes in their name.
Verified using CAM 1.2 stage. A migration plan with double dash in its name could be migrated without problems. apiVersion: migration.openshift.io/v1alpha1 kind: MigPlan metadata: annotations: openshift.io/touch: 3f1af95c-9141-11ea-a4c0-0a580a810232 creationTimestamp: "2020-05-08T15:20:06Z" generation: 5 name: c1-mig-test--pi12 namespace: openshift-migration resourceVersion: "772769" selfLink: /apis/migration.openshift.io/v1alpha1/namespaces/openshift-migration/migplans/c1-mig-test--pi12 uid: ff061460-5e61-4dc8-a300-4af55ade929a spec: ....... status: conditions: - category: Required lastTransitionTime: "2020-05-08T15:20:15Z" message: The `persistentVolumes` list has been updated with discovered PVs. reason: Done status: "True" type: PvsDiscovered - category: Required lastTransitionTime: "2020-05-08T15:20:16Z" message: The storage resources have been created. status: "True" type: StorageEnsured - category: Required lastTransitionTime: "2020-05-08T15:20:18Z" message: The migration registry resources have been created. status: "True" type: RegistriesEnsured - category: Required lastTransitionTime: "2020-05-08T15:20:18Z" message: The migration plan is ready. status: "True" type: Ready - category: Advisory lastTransitionTime: "2020-05-08T15:21:11Z" message: Limited validation; PV discovery and resource reconciliation suspended. status: "True" type: Suspended
Clearing needinfo as this discussion has been moved off bugzilla.
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, 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/RHEA-2020:2326