Support for pre-provisioned volumes
WanzenBug opened this issue · 0 comments
WanzenBug commented
In theory, we should be able to support pre-provisioned volumes like this:
-
Create a LINSTOR volume:
linstor rd c pv1 linstor vd c pv1 1g linstor rd ap pv1
-
Create a persistent volume and claim:
apiVersion: v1 kind: PersistentVolume metadata: name: pv1 spec: accessModes: - ReadWriteOnce capacity: storage: 1Gi csi: driver: linstor.csi.linbit.com fsType: ext4 volumeAttributes: {} volumeHandle: pv1 persistentVolumeReclaimPolicy: Delete volumeMode: Filesystem ---- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: pv1 spec: storageClassName: "" # Empty string must be explicitly set otherwise default StorageClass will be set volumeName: pv1 accessModes: - ReadWriteOnce resources: requests: storage: 1Gi
When using the pod we get the following issue:
Warning FailedAttachVolume 85s (x4 over 11m) attachdetach-controller (combined from similar events): AttachVolume.Attach failed for volume "pv1" : rpc error: code = Internal desc = ControllerPublishVolume failed for mwa1: unable to find CSI volume annotation on resource {Name:pv1 ExternalName: Props:map[DrbdOptions/Resource/on-no-quorum:io-error DrbdOptions/Resource/quorum:majority DrbdOptions/auto-verify-alg:crct10dif-generic DrbdPrimarySetOn:DEMO1.LINSTOR-DAYS.AT.LINBIT.COM] Flags:[] LayerData:[{Type:DRBD Data:0xc00003b040} {Type:STORAGE Data:<nil>}] Uuid:2d154ba7-bd20-4729-9ddd-f480eb6b301a ResourceGroupName:DfltRscGrp}
This points in a similar direction as #60
I believe removing the need for the magic annotation would fix this issue.