Bug 2188629

Summary: Storage class conversion: Mig Plan results in error when a namespace contains a statefulset that uses a volume which is not created via a StatefulSet volume template
Product: Migration Toolkit for Containers Reporter: Pranav Gaikwad <pgaikwad>
Component: ControllerAssignee: John Matthews <jmatthew>
Status: NEW --- QA Contact: ssingla
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.7.8CC: dymurray, rjohnson
Target Milestone: ---   
Target Release: 1.8.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: 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 Pranav Gaikwad 2023-04-21 12:49:33 UTC
Description of problem:
Statefulsets can use volumes in two ways. First, it can create a volume it needs dynamically via spec.volumeClaimTemplates field. Second, it can use a normal volume not created by the statefulset itself via spec.volumes field. MTC fails to recognize volumes used by statefulsets which are under spec.volumes but not in spec.volumeClaimTemplates.

Version-Release number of selected component (if applicable):
1.7.8

How reproducible:
Always

Steps to Reproduce:
1. Create a PVC in a namespace.
2. Create a StatefulSet in the namespace and add the PVC in spec.volumes field just like you would add in a Pod spec.
3. Create MigPlan for that namespace.

Actual results:
MigPlan fails and generates an error about PVC name.

Expected results:
MigPlan shouldn't generate the error.

Additional info: