Skip to content

Volumes provisioned for migrated CSI drivers have wrong provisioned-by annotation #576

Closed
kubernetes-sigs/sig-storage-lib-external-provisioner
#104
@jsafrane

Description

@jsafrane

When CSI migration is enabled and the external-provisioner provisions an in-tree PV, it files wrong pv.kubernetes.io/provisioned-by annotation. As result, when the CSI migration is disabled later, such PVs can be deleted only by the external-provisioner. They should be deleted by the in-tree one.

  1. Enable CSI migration (OpenStack Cinder used below).

  2. Create StorageClass for in-tree volume plugin

    provisioner: kubernetes.io/cinder
    
  3. Create PVC with this StorageClass

  4. Check that the external-provisioner created in-tree PV (with cinder), but with a wrong provisioned-by:

    apiVersion: v1
    kind: PersistentVolume
    metadata:
      annotations:
        pv.kubernetes.io/provisioned-by: cinder.csi.openstack.org
      name: pvc-6d2b1fb9-324c-4350-926f-639ff087eaaa
    spec:
      cinder:
        fsType: ext4
        volumeID: 49921926-4dd7-4d17-b32d-742cff332a2f
    
  5. Disable the CSI migration.

  6. Delete the PVC.

Actual result: The PV is deleted by the CSI driver.
Expected result: The PV is deleted by in-tree volume plugin. The CSI driver may not be installed at that time.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions