Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: When we execute an intra-cluster "State" migration and then we execute a rollback, the rollback is always failing. Version-Release number of selected component (if applicable): SOURCE CLUSTER: AWS 3.11 (MTC 1.5.1) TARGET CLUSTER: AWS 4.9 (MTC 1.6.0) (CONTROLLER + UI) How reproducible: Always Steps to Reproduce: 1.In local cluster (host), create a namespace with a pvc and a pod $ oc new-project ocp-44561-state-intralocal $ cat <<EOF | oc create -f - apiVersion: v1 kind: PersistentVolumeClaim metadata: namespace: ocp-44561-state-intralocal name: test-data-app1 spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi EOF $ cat <<EOF | oc create -f - apiVersion: apps/v1 kind: Deployment metadata: labels: app: state-only-mig name: state-only-mig namespace: ocp-44561-state-intralocal spec: replicas: 1 selector: matchLabels: app: state-only-mig template: metadata: labels: app: state-only-mig 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-app1 EOF 2. Create an intra-cluster migration plan, from local cluster (host) to local cluster (host). (No mapping) 3. Execute the intra-cluster "State" migration. 4. Execute a "Rollback". Actual results: The rollback will fail with this error "Source PVCs [...] are mapped to destination PVCs which result in conflicts. Please ensure that each source PVC is mapped to a distinct destination PVC and try again." Expected results: The rollback should be executed without problems. Additional info: The error in the rollback happens because: 1. We have 1 pvc, with name P1:P1 2. We map it to P1:P2 and I run the intra cluster state migration 3. The result is that in the migplan now we have 2 PVCs: - P1:P2 - P2:P2 We can see that P2 is mapped to P2 and that is triggering the error in the rollback.
Since the impact of this is a pretty specific edge case (you need to be rolling back a migration that's within the same cluster AND namespace), we're going to push this to a 1.6.1 z stream release.
Verified with MTC 1.6.1 Image: registry.redhat.io/rhmtc/openshift-migration-controller-rhel8@sha256:c65bb630b5fbb44529861051be16fcceb67f19cfa90d36864095ba70a5533ace
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.6.1 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-2021:4023