Bug 2001924

Summary: [MTC] "Stage" and "Cutover" options are not disabled when a PVC conflict happens
Product: Migration Toolkit for Containers Reporter: Sergio <sregidor>
Component: GeneralAssignee: Mike Turley <mturley>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: low Docs Contact: Avital Pinnick <apinnick>
Priority: high    
Version: 1.6.0CC: ernelson, midays, prajoshi, rjohnson, ssingla, xjiang
Target Milestone: ---   
Target Release: 1.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-24 06:32:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sergio 2021-09-07 13:16:23 UTC
Description of problem:
When a migration plan has a PVC conflict, the "Stage" and "Cutover" options should be disabled, but they are not.


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.

From source cluster to source cluster, no namespaces mapping.


Actual results:

The migplan is reporting the conflic

 - category: Warn
    lastTransitionTime: "2021-09-07T12:05:14Z"
    message: Source PVCs [ocp-44516-statewarning-ns/test-data] are mapped to destination PVCs which result in conflicts. Please map each source PVC to a distinct destination PVC before running a State Migration.
    reason: NotDistinct
    status: "True"
    type: PvNameConflict

But in the UI the kebab options "Stage" and "Cutover" are not disabled.

Expected results:
The "Stage" and "Cutover" options in the kebab should be disabled.

Additional info:

Comment 1 Ian 2021-09-10 16:21:07 UTC
https://github.com/konveyor/mig-ui/pull/1323 This bug should be fixed -

Comment 7 errata-xmlrpc 2022-03-24 06:32:26 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 (Migration Toolkit for Containers (MTC) 1.7.0 release 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/RHBA-2022:1043