Description of problem: Migrate an application with action move, when create migplan from UI, no storage class for movied PVs to select. Version-Release number of selected component (if applicable): mig-ui:quay.io/ocpmigrate/mig-ui:latest, @sha256:44765c02d59cf3c31622c1ca751c15ca5d245ac8ad522c9c023f49c44e3f67ad mig-controller: quay.io/ocpmigrate/mig-controller:latest @sha256:9c373f323fa485156cbb010fd507908255895e67605650ceb65a1202cce8d1c0 How reproducible: always Steps to Reproduce: 1.install an application for PV move, use mysql application: [root@ip-172-18-6-131 ~]# oc get pod NAME READY STATUS RESTARTS AGE mysql-1-d727t 1/1 Running 0 2h [root@ip-172-18-6-131 ~]# oc get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE mysql Bound mysql-data 2Gi RWX nfs-sc 2h [root@ip-172-18-6-131 ~]# oc get pv NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE mysql-data 2Gi RWX Recycle Bound mysql-move/mysql nfs-sc 2h storage class in ocp4 : $ oc get sc NAME PROVISIONER AGE gp2 (default) kubernetes.io/aws-ebs 29h nfs-sc no-provisioning 35m 2. create migration plan. select cluster and repos select namespace; select PV select storage class Actual results: In the `select storage class` page, no storage class to choose. and the plan it created use the default storage class. spec: destMigClusterRef: name: host namespace: openshift-migration migStorageRef: name: zitang-mig namespace: openshift-migration namespaces: - mysql-move persistentVolumes: - capacity: 2Gi name: mysql-data pvc: accessModes: - ReadWriteMany name: mysql namespace: mysql-move selection: storageClass: gp2 supported: actions: - copy - move srcMigClusterRef: name: ocp311 namespace: openshift-migration The migcluster resource can list storage class: host cluster: spec: isHostCluster: true storageClasses: - accessModes: - ReadWriteOnce default: true name: gp2 provisioner: kubernetes.io/aws-ebs - accessModes: - ReadWriteOnce name: nfs-sc provisioner: no-provisioning ocp3 cluster: spec: clusterRef: name: ocp311 namespace: openshift-migration isHostCluster: false serviceAccountSecretRef: name: ocp311 namespace: openshift-config storageClasses: - accessModes: - ReadWriteOnce default: true name: gp2 provisioner: kubernetes.io/aws-ebs - accessModes: - ReadWriteOnce name: nfs-sc provisioner: no-provisioning Expected results: Using UI can select storage class for movied PVs Additional info:
Created attachment 1606871 [details] image of 'select storage class'
I see 2 things to consider with this BZ 1) For 'move' we may want to skip Step 4, Storage Class, selection. I think for most (maybe all) cases of move, we would not support changing a storage class 2) We should think some more and try out a move of a 'gluster PV' provisioned via heketi on source cluster to a destination cluster lacking heketi, this may tease out some other issues for us to consider. For background my understanding is: My assumption is that changing a storage class is only involved for 'Copy'. Thought is storage class is involved when a PVC is created, without a PV. The storage class in the PVC helps k8s determine if it's possible to use a provisioner to create the PV. In the case of move, we are recreating the PVC and PV definitions, no provisioner is used, so it's not possible/applicable to change storage class...though we may need to delete the storageclass define and use a 'no-provisioner'. I think that might be needed when considering use-case move a Gluster PV that was provisioned via heketi, so it had a storageclass/provisioner on the source PVC/PV and we try to move it to destination that lacks the storage class. Feels like a possible use case that would expose problems.
I agree we will not support changing storage class for 'move'; But after create plan by default, the `selection.storageClass` part should be the same with source pv storageclass. Not the default sc in Destination cluster. persistentVolumes: - capacity: 2Gi name: mysql-data pvc: accessModes: - ReadWriteMany name: mysql namespace: mysql-move selection: storageClass: gp2 supported: actions: - copy - move I think in the UI part, if the action is move, it can show the storage class as un-selectable, and value is source pv storageclass.
Closing as stale. Please reopen if issue persists.