Bug 1807804

Summary: [Customer0 data migration] The storage class name that is exported from VirtualMachine.spec.dataVolumeTemplates is not changed
Product: Container Native Virtualization (CNV) Reporter: Qixuan Wang <qixuan.wang>
Component: StorageAssignee: Adam Litke <alitke>
Status: CLOSED ERRATA QA Contact: Qixuan Wang <qixuan.wang>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.2.0CC: awels, cnv-qe-bugs, ncredi, ycui
Target Milestone: ---   
Target Release: 2.3.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: 2020-05-04 19:10:56 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 Qixuan Wang 2020-02-27 09:53:39 UTC
Description of problem:
The storageClassName of DataVolume and PVC were exported as "hostpath-provisioner", but it was still "kubevirt-hostpath-provisioner" on VirtualMachine.spec.dataVolumeTemplates


Version-Release number of selected component (if applicable):
CNV 2.2 and 2.3


How reproducible:
100%


Steps to Reproduce:
1. Prepare PVC/DV/VM resources.
2. Export these resources using ./import <node_name> from https://gitlab.cee.redhat.com/awels/hostpath-provisioner-upgrade


Actual results:
2. 
{
            "apiVersion": "kubevirt.io/v1alpha3",
            "kind": "VirtualMachine",
            "metadata": {
                "generation": 1,
                "labels": {
                    "kubevirt.io/vm": "vm-cirros-dv-2"
                },
                "name": "vm-cirros-dv-2",
                "namespace": "test-migration-2",
                "resourceVersion": "",
                "selfLink": "/apis/kubevirt.io/v1alpha3/namespaces/test-migration-2/virtualmachines/vm-cirros-dv-2",
                "uid": ""
            },
            "spec": {
                "dataVolumeTemplates": [
                    {
                        "metadata": {
                            "annotations": {
                                "kubevirt.io/provisionOnNode": "cnv-executor-cnv14-node-e6a2cb-1.example.com"
                            },
                            "creationTimestamp": null,
                            "name": "cirros-dv-2"
                        },
                        "spec": {
                            "pvc": {
                                "accessModes": [
                                    "ReadWriteOnce"
                                ],
                                "resources": {
                                    "requests": {
                                        "storage": "100M"
                                    }
                                },
                                "storageClassName": "kubevirt-hostpath-provisioner"
                            },
                            "source": {
                                "http": {
                                    "url": "http://cnv-qe-server.rhevdev.lab.eng.rdu2.redhat.com/files/cdi-test-images/cirros_images/cirros-0.4.0-x86_64-disk.qcow2"
                                }
                            }
                        },
                        "status": {}
                    }
                ],
                "running": "false",
                "template": {
                    "metadata": {
                        "creationTimestamp": null,
                        "labels": {
                            "kubevirt.io/vm": "vm-datavolume"
                        }
                    },
                    "spec": {
                        "domain": {
                            "devices": {
                                "disks": [
                                    {
                                        "disk": {
                                            "bus": "virtio"
                                        },
                                        "name": "datavolumevolume"
                                    }
                                ]
                            },
                            "machine": {
                                "type": ""
                            },
                            "resources": {
                                "requests": {
                                    "memory": "64M"
                                }
                            }
                        },
                        "terminationGracePeriodSeconds": 0,
                        "volumes": [
                            {
                                "dataVolume": {
                                    "name": "cirros-dv-2"
                                },
                                "name": "datavolumevolume"
                            }
                        ]
                    }
                }
            },
            "status": {
                "created": true,
                "ready": true
            }
        },


Expected results:
All storageClassName should be exported as "hostpath-provisioner"


Additional info:

Comment 1 Alexander Wels 2020-02-27 15:27:14 UTC
Fixed

Please grab latest from https://gitlab.cee.redhat.com/awels/hostpath-provisioner-upgrade/

Comment 2 Qixuan Wang 2020-02-28 03:51:59 UTC
The bug has been fixed, so move it to VERIFIED, thanks.

Validation steps:
[cloud-user@ocp-psi-executor hostpath-provisioner-upgrade-master]$ ls
README.md  export.sh  export_pv.py  import.sh  import_pv.py  qwang-23-fbfr6-worker-5rkbs  qwang-23-fbfr6-worker-d64fh
[cloud-user@ocp-psi-executor hostpath-provisioner-upgrade-master]$ cat qwang-23*/export.json | grep kubevirt-hostpath-provisioner
[cloud-user@ocp-psi-executor hostpath-provisioner-upgrade-master]$

Comment 7 errata-xmlrpc 2020-05-04 19:10:56 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, 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/RHEA-2020:2011