qnap-dev / QNAP-CSI-PlugIn

Apache License 2.0
29 stars 3 forks source link

Corresponding pool #4

Closed alanmilani-tomtom closed 1 week ago

alanmilani-tomtom commented 8 months ago

Hi, I have a Kubernetes cluster on my home lab and I REALLY would like to use my QNAP as Storage using this CSI Plugin After follow the documentation, I created a PVC that is stuck on Pending Looking at the tridentctl logs I see that "no valid pool can be used" I'm pretty sure that it's related to the step 1 of "Adding a Backend": "Make sure you have a corresponding pool" but I don't know how Based on the logs, I assume that it's expecting a Storage Pool of "backendName"-"serviceLevel". However I didn't find a way to give a name to a new Storage Pool when creating it and there is no way to rename an existent Storage Pool as well It would be great if you could elaborate a bit on this step Not sure if I should open an Issue for it but I didn't find much information about this software on my research Thanks in advance

davidcheng0716 commented 8 months ago

@alanmilani-tomtom Hi, Thank you for the comment

Before digging into the issue, a few things should be checked: (1) "StorageClass" are deployed (2) Physical Storages are created Pool from UI Screenshot from 2024-01-03 12-44-30 (3) PVC is deployed with correct storageclass

If all things are checked and not solve the problem, please provide your deploy information : (1) Backend.json (Sensitive data just let empty; address, user, password, etc) (2) StorageClass.yaml (3) PVC.yaml

Nikitiuk commented 8 months ago

storageclass.yaml.txt pvc.yaml.txt Backend.json I've added the requested files Not sure if it helps but I will add more information here: My equipment is a QNAP TS-473. The web interface to create a Storage Pool is a bit different than the screenshot added in the previous comment. It's running the firmware version "QTS 5.1.4.2596", so I understand it should be compatible I created the Kubernetes cluster in an external server using kubeadm In the "kubectl describe pvc nginx-pvc" I get: Name: nginx-pvc Namespace: default StorageClass: ts473-basic-sc Status: Pending Volume:
Labels: Annotations: trident.qnap.io/ThinAllocate: true volume.beta.kubernetes.io/storage-provisioner: csi.trident.qnap.io volume.kubernetes.io/storage-provisioner: csi.trident.qnap.io Finalizers: [kubernetes.io/pvc-protection] Capacity:
Access Modes:
VolumeMode: Filesystem Used By: task-pv-pod Events: Type Reason Age From Message


Warning ProvisioningFailed 5m51s (x13 over 11m) csi.trident.qnap.io_trident-controller-865f6466bf-7b542_0e3ef9b2-096a-45a7-9302-f29e5989a6bd failed to provision volume with StorageClass "ts473-basic-sc": rpc error: code = Unknown desc = encountered error(s) in creating the volume: [Failed to create volume pvc-44b4f915-3111-481e-9fd0-467167cefdca on storage pool ts473-basic from backend ts473: no valid pool can be used] Normal ExternalProvisioning 114s (x42 over 11m) persistentvolume-controller waiting for a volume to be created, either by external provisioner "csi.trident.qnap.io" or manually created by system administrator Normal Provisioning 97s (x22 over 11m) csi.trident.qnap.io_trident-controller-865f6466bf-7b542_0e3ef9b2-096a-45a7-9302-f29e5989a6bd External provisioner is provisioning volume for claim "default/nginx-pvc" Normal ProvisioningFailed 31s (x24 over 11m) csi.trident.qnap.io encountered error(s) in creating the volume: [Failed to create volume pvc-44b4f915-3111-481e-9fd0-467167cefdca on storage pool ts473-basic from backend ts473: no valid pool can be used]

I have 2 Storage Pools on my QNAP: "Storage Pool 1" and "Storage Pool 2". I didn't find a way to name it differently during the Storage Pool creation or even to rename it after creation

I hope it's enough to see what's wrong If you need more information, please let me know Thank you for looking at this, I appreciate

davidcheng0716 commented 8 months ago

@Nikitiuk

The error " no valid pool can be used" means no storage pool matching the requested QoS on the storage.

Two possible solutions :

(1) Add StorageClass for matching the current QoS In your case, Backend has three QoS : "performance": "basic", "standard" and "premium"

"basic" -> find the storage pool which matches "Tiering Disable & SATA"

Maybe, your storage pools are not this kind of type. You can deploy one more "StorageClass" for "performance=standard" and try to deploy your PVC with it.

(2) For deploying volume on any pool in storage : Add one more QoS and the corresponding "StorageClass" and try to deploy PVC again. (Detail in the sample)

Screenshot from 2024-01-04 10-15-55

Screenshot from 2024-01-04 10-16-01

Notes : StorageClass "selector" should match Backend "label"

divtiply commented 6 months ago

I'm having similar issue while trying to setup qnap-csi to provision volumes from QNAP TVS-h1688X. This device has QuTShero h5.1.5.2647 which does not supports storage tiering, so I'm using selector: "storage=sds1" in my storage class manifest (my backend.json has "backendName": "sds1" and "storage": [{"labels": {"storage": "sds1"}, "serviceLevel": "Any"},). After applying PVC manifest my QNAP successfuly provisions correspondig unmapped LUN but fails to create iSCSI target, logging the error:

Agent   iSCSI & Fibre Channel   iSCSI   [iSCSI & Fibre Channel] Failed to create iSCSI target "iscsi-trident-pvc-4a9cdafc-5739-4bc5-ae5f-d096fbba19b6".

In my k8s cluster I can see

csi.trident.qnap.io encountered error(s) in creating the volume: [Failed to create volume pvc-4a9cdafc-5739-4bc5-ae5f-d096fbba19b6 on storage pool sds1-Any from backend sds1: no valid pool can be used[]

Can you please guide how to configure qnap-csi to fix this?

pkerwien commented 6 months ago

@divtiply I have the exactly same problem as you when trying QuTS h5.1.5.2647. I have tried the following firmwares:

And the only firmware version I have got it to work with is QTS 5.0.1.2514.

jmrr commented 6 months ago

@davidcheng0716 would there be a way of making the qnap-csi work with the QuTS hero firmware, which doesn't support tiering. We're not interested in tiering but would very much need to have volumes created over iSCSI so they could be used by our k8s workloads.

Thanks!

nabkey commented 6 months ago

I'm seeing the same issue, using QTS 5.1.5.2679. Unmapped LUNs are being created on either storage pool (I also have Storage Pool 1 and Storage Pool 2).

I also see additional logs in the trident-controller pod, which I believe are related.

time="2024-02-27 14:06:15" level=info msg="Create Volume Successfully" Capacity=5 Index=1 Name=trident-pvc-bcae030b-6ab1-45d8-8a99-e56db3c0c607               
time="2024-02-27 14:06:15" level=info msg="---> Receive Iscsi Create Request"                                                                                 
time="2024-02-27 14:06:15" level=error msg="Iscsi CREATE Failed, Error : Create Target fail, API returns result : -22"                                        
time="2024-02-27 14:06:15" level=error msg="Iscsi CREATE Failed, Error : Create Target fail, API returns result : -22" 
JimmyTanMPM commented 6 months ago

Hi all, This issue is in to RD stage for modification, if there any schedule for release I will let you know

jdani commented 5 months ago

Hi all, This issue is in to RD stage for modification, if there any schedule for release I will let you know

Same situation here...

@JimmyTanMPM is there any date estimation? or even better, a workaround? creating target manually or something alike?

It would be great if we can unblock this even with an interim fix

Thanks!

nabkey commented 4 months ago

I just tried 1.2.0 and the issue seems resolved for me!

JimmyTanMPM commented 4 months ago

@nabkey @jdani @pkerwien @divtiply @davidcheng0716 @Nikitiuk @alanmilani-tomtom v1.2.0 is released Please refer to release notes (https://github.com/qnap-dev/QNAP-CSI-PlugIn/releases/tag/v1.2.0)