Bug 2100486

Summary: [MTC UI] Target storage class field is not getting respected when clusters don't have replication repo configured.
Product: Migration Toolkit for Containers Reporter: Prasad Joshi <prajoshi>
Component: UIAssignee: Pranav Gaikwad <pgaikwad>
Status: CLOSED ERRATA QA Contact: Prasad Joshi <prajoshi>
Severity: urgent Docs Contact: Anjana Suparna Sriram <asriram>
Priority: urgent    
Version: 1.7.2CC: akarol, rjohnson
Target Milestone: ---   
Target Release: 1.7.2   
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-07-01 09:53:23 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 Prasad Joshi 2022-06-23 13:49:04 UTC
Description of problem: Target storage class field not getting respected when the cluster doesn't have a replication repo configured. Looks like the UI is skipping the validations when the replication repo is not configured. 


Version-Release number of selected component (if applicable):
Source GCP 4.6   MTC 1.7.2 + OADP 1.0.3
Target GCP  4.10   MTC 1.7.2 + OADP 1.0.3

Also present in MTC 1.7.1

How reproducible: Always


Steps to Reproduce:
1. Make sure you don’t have replication repo configured in your cluster
2. Deploy an application source cluster
3. Create a scc plan, go to step no.3 i.e. PersistentVolumes page. Change the target storage class.
4. Verify target storage class value is getting updated to the migplan


Actual results: Target storage class field is not getting respected.


Expected results: target storage class field should be respected by UI, migplan resources should reflect the same.


Additional info:

Comment 4 Prasad Joshi 2022-06-24 04:03:49 UTC
Verified with MTC 1.7.2 (prestage)

metadata_nvr: openshift-migration-operator-metadata-container-v1.7.2-19

target storage class field getting respected by UI with and without replication repo. 

$ oc get migplan -n openshift-migration -o yaml scc

spec:
  destMigClusterRef:
    name: host
    namespace: openshift-migration
  namespaces:
  - ocp-attached-pvc
  persistentVolumes:
  - capacity: 1Gi
    name: pvc-e9e6d0c7-dab7-46bf-ba80-18987de33006
    proposedCapacity: 1Gi
    pvc:
      accessModes:
      - ReadWriteOnce
      hasReference: true
      name: test-data:test-data-new
      namespace: ocp-attached-pvc
    selection:
      action: copy
      copyMethod: filesystem
      storageClass: standard-csi
    storageClass: standard
    supported:
      actions:
      - skip
      - copy
      copyMethods:
      - filesystem
      - snapshot
  srcMigClusterRef:
    name: host
    namespace: openshift-migration

$ oc get pvc -n ocp-attached-pvc
NAME            STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
test-data       Bound    pvc-e9e6d0c7-dab7-46bf-ba80-18987de33006   1Gi        RWO            standard       20m
test-data-new   Bound    pvc-79f40538-b495-4d43-a451-2ac1244cd3a6   1Gi        RWO            standard-csi   9m36s

Moving this to verified status.

Comment 10 errata-xmlrpc 2022-07-01 09:53:23 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.7.2 security and bug fix 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-2022:5483