Description of problem: When we edit an existing hook, the result is that the fields "executionNamespace" and "serviceAccount" are empty in the migration plan. Showing the MigPlan a critical condition. Version-Release number of selected component (if applicable): KONVEYOR 1.2 How reproducible: Always Steps to Reproduce: 1. Create a migration plan with a hook 2. Edit the migration plan created in step 1. And click Edit hook on the "Hooks" screen. 3. Click "Update Hook" and save the existing hook without doing any modification. Actual results: This error is displayed after the plan edition: Failed to validate migration plan XXXXXX. Critical The serviceAccount specified is invalid, DNS-1123 subdomain regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*' Critical The executionNamespace specified is invalid, DNS-1123 label regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?'. - category: Critical lastTransitionTime: "2020-04-29T14:27:50Z" message: The serviceAccount specified is invalid, DNS-1123 subdomain regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*' reason: NotSet status: "True" type: InvalidHookSAName - category: Critical lastTransitionTime: "2020-04-29T14:27:50Z" message: The executionNamespace specified is invalid, DNS-1123 label regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?'. reason: NotSet status: "True" type: InvalidHookNSName observedDigest: 727c5556c16c0dc2d8dd04cfe4e2a4855b99654b7686a1bcd3a0fa0e5821772e When we check the MigPlan information, we can see that the "serviceAccount" and "executionNamespaces" fiels are empty: hooks: - executionNamespace: "" phase: PreBackup reference: name: fail namespace: openshift-migration serviceAccount: "" Expected results: The hook should have the right values, and the migration plan should show no critical condition. Additional info:
https://github.com/konveyor/mig-ui/pull/847
Using CAM 1.2 stage Following the steps described in this BZ we still get the executionNamespace and the serviceAccount fields empty. spec: destMigClusterRef: name: host namespace: openshift-migration hooks: - executionNamespace: "" phase: PreBackup reference: name: hook namespace: openshift-migration serviceAccount: "" migStorageRef: name: automatic namespace: openshift-migration namespaces: - mssql-example srcMigClusterRef: name: source-cluster namespace: openshift-migration We move the status to ASSIGNED. As an extra information, if we edit the service account and we change from source service account to target service account, the request fails and an error is prompted on the UI. Do you need this to be another BZ? or can we consider it as a part of this one since the hooks update is not working properly? We can open a new BZ for this behavior is necessary.
https://github.com/konveyor/mig-ui/pull/860
Verified with CAM 1.2
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