Bug 2001941 - Fixing PVC conflicts in state migration plan using the web console causes the migration to run twice
Summary: Fixing PVC conflicts in state migration plan using the web console causes the...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: General
Version: 1.6.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 1.6.0
Assignee: Ian
QA Contact: Xin jiang
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-07 13:54 UTC by Sergio
Modified: 2021-09-29 14:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-29 14:35:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github konveyor mig-ui pull 1323 0 None None None 2021-09-08 18:55:24 UTC
Github konveyor mig-ui pull 1327 0 None None None 2021-09-09 19:18:32 UTC
Red Hat Product Errata RHSA-2021:3694 0 None None None 2021-09-29 14:36:09 UTC

Description Sergio 2021-09-07 13:54:46 UTC
Description of problem:
When we have a migration plan with PVC conflicts and we execute a State migration the migmigration resource will report a critical condition. The only way to fix this conflict using the UI is by executing a new State migration and mapping the PVCs correctly. If we do so, the result is that the critical condition disappears and the migration is executed twice.


Version-Release number of selected component (if applicable):
SOURCE CLUSTER: AWS OCP 3.11 (MTC 1.5.1) NFS
TARGET CLUSTER: AWS OCP 4.9 (MTC 1.6.0) OCS4

How reproducible:
Always


Steps to Reproduce:
1. Create an namespace with a pvc and a pod mounting the pvc

$ oc new-project ocp-44516-statewarning-ns

$ cat <<EOF | oc create -f -
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  namespace: ocp-44516-statewarning-ns
  name: test-data
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
EOF

$ cat <<EOF | oc create -f -
apiVersion:  apps/v1
kind: Deployment
metadata:
  labels:
    app: state-warning-test
  name: state-warning-test
  namespace: ocp-44516-statewarning-ns
spec:
  replicas:  1
  selector:
    matchLabels:
      app: resize-test
  template:
    metadata:
      labels:
        app: resize-test
    spec:
      containers:
      - name: podtest
        imagePullPolicy: Always
        image: quay.io/openshifttest/alpine
        command: [ "/bin/sh", "-c", "--" ]
        args:
        - while true; do sleep 30; done;
        restartPolicy: Never
        volumeMounts:
        - name: testvolume
          mountPath: /data/test
      volumes:
      - name: testvolume
        persistentVolumeClaim:
          claimName: test-data
EOF


2. Create an intra-cluster migration plan.

3. Execute a "State" migration without mapping anything.

4. Once the Critical condition is reported, execute a new State migration, and now map the PVC to a different PVC name

Actual results:
After mapping the PVC name and fixing the conflict, the critical condition will disappear and the State migration will be executed twice.

Expected results:
There should be a way of using the UI and fix the PVC conflict running this migration only once.

Additional info:

Comment 5 Xin jiang 2021-09-15 08:01:25 UTC
verified with mtc1.6.0. This issue won't occur again.

registry.redhat.io/rhmtc/openshift-migration-ui-rhel8@sha256:ac56919a13dd6bbf36ce7a5dfc7696d3dfebe6c9438da64b3bcd1d70b33c549c

Comment 7 errata-xmlrpc 2021-09-29 14:35:53 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 (Moderate: Migration Toolkit for Containers (MTC) 1.6.0 security & bugfix 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-2021:3694


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