Start a Conversation

Solved!

Go to Solution

1877

June 7th, 2021 07:00

Unity CSI driver not creating volume on Unity

Hi Gurus,

- I'm setting up kubernetes cluster, and following https://dell.github.io/storage-plugin-docs/docs/installation/helm/unity/, to install CSI driver for unity.

- I'm able to get the pods running:

[root@master test]# kubectl get po -n unity
NAME READY STATUS RESTARTS AGE
snapshot-controller-0 1/1 Running 2 4d15h
unity-controller-69f859885b-hnhzk 5/5 Running 15 131m
unity-node-n9bjd 2/2 Running 2 131m
unity-node-xmgmc 2/2 Running 2 131m

- I'm able to specify the storageclass in myvalyes.yaml file, and created storageclasses:

[root@master test]# kubectl get storageclasses
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
unity-iscsi csi-unity.dellemc.com Retain WaitForFirstConsumer true 135m
unity-nfs csi-unity.dellemc.com Retain WaitForFirstConsumer true 135m

 

- I tried to create a pvc as below, but i cannot see the request send to Unity storage in controller pods:

[root@master test]# cat pvc.json
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pvol1
# namespace: test-unity
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 25Gi
storageClassName: unity-iscsi

[root@master test]# kubectl create -f pvc.json

- I'm expecting the PVC will dynamically create the volume on unity, but actually, there's no event happened

[root@master ~]# kubectl logs -f unity-controller-69f859885b-hnhzk -c driver -n unity

 

- Now, PVC is created but due to no volume created, it's left in pending state.

[root@master test]# kubectl get pvc -A
NAMESPACE NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
default pvol1 Pending unity-iscsi 30s

 

- I thought after the PVC has the storageclass field specified, the volume will be provisioned dynamically, but it doesn't happen in my case. 

 

How to troubleshoot this ? 

 

Thanks in advance.

 

 

B/R

Jason

23 Posts

June 8th, 2021 05:00

Thanks a lot to bring the volumeBindMode to me. Back to Unity CSI driver version 1.2.0, I was not aware of this parameter, and from the note I had before, seems it was default "immediate", because right after create the PVC, I was able to verify the volume on unity storage.

For this case, I found the issue, it was the char "_"  used in myvalues.yaml file, it should be an unsupported char, and after removed it. I'm able to create a statefulset with PVC bound to storageclass.

 

Here's the log messages from controller pod:

 

E0608 07:07:05.824590 1 volume_store.go:144] error saving volume jij8_csivol-eca6144d1e: PersistentVolume "jij8_csivol-eca6144d1e" is invalid: metadata.name: Invalid value: "jij8_csivol-eca6144d1e": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
 
After remove it from myvalues.yaml and recreate all including the statefulset, it's showing fine now. And I can continue my tests:
 
[root@master test]# kubectl get pvc -A
NAMESPACE NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
test-unity pvol1 Bound jij8-csivol-caaf49426e 25Gi RWO unity-iscsi 34s

286 Posts

June 7th, 2021 09:00

I created a video on the installation, it should still be valid. You may want to confirm it was installed correctly. It seems that way since the pods are running.

Is there anything in the "get pv" output?

Can you send the kubectl detail for pvol1?

 

13 Posts

June 7th, 2021 12:00

I see storage-class details as mentioned- 
unity-iscsi csi-unity.dellemc.com Retain WaitForFirstConsumer true 135m

WaitForFirstConsumer indicates volume will be in pending state unless you created corresponding pod for the same volume then only dynamic pvc creation will be triggered. 

If you are not interested to use WaitForFirstConsumer you may change this to Immediate and see dynamic pvc will be provisioned immediately without pod creation.

Hope you understand the difference and its by nature as Topology implementation is at place.

 

286 Posts

June 8th, 2021 09:00

Was the parameter that you used '_' the volumeNamePrefix?

23 Posts

June 8th, 2021 14:00

yes. It's stupid, but I was not realizing it's harmful.

286 Posts

June 9th, 2021 08:00

i just ask so we can make sure our documentation is updated

No Events found!

Top