Bug 1829494 - [MIG-UI] To edit an existing hook breaks the migplan
Summary: [MIG-UI] To edit an existing hook breaks the migplan
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Migration Tooling
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Ian
QA Contact: Xin jiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-29 15:59 UTC by Sergio
Modified: 2020-05-28 11:11 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-28 11:10:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:2326 0 None None None 2020-05-28 11:11:15 UTC

Description Sergio 2020-04-29 15:59:18 UTC
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:

Comment 1 Erik Nelson 2020-04-30 13:38:17 UTC
https://github.com/konveyor/mig-ui/pull/847

Comment 6 Sergio 2020-05-08 16:14:56 UTC
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.

Comment 11 Xin jiang 2020-05-15 09:09:55 UTC
Verified with CAM 1.2

Comment 13 errata-xmlrpc 2020-05-28 11:10:47 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, 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


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