containerized-data-importer: CDI Upgrade from 1.59.1 to 1.59.2 causes failed import of disks

What happened: I upgraded the CDI operator from 1.59.1 to 1.59.2. After that, DataVolume imports on my longhorn-rwx storage class fails with the following error:

  Type     Reason                  Age                From                     Message
  ----     ------                  ----               ----                     -------
  Warning  FailedScheduling        82s                default-scheduler        0/4 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/4 nodes are available: 4 Preemption is not helpful for scheduling.
  Warning  FailedScheduling        81s                default-scheduler        0/4 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/4 nodes are available: 4 Preemption is not helpful for scheduling.
  Normal   Scheduled               79s                default-scheduler        Successfully assigned virtualmachines/importer-prime-ef9556e0-cdd4-445d-9c38-4921f3680bc5 to kube2
  Normal   SuccessfulAttachVolume  44s                attachdetach-controller  AttachVolume.Attach succeeded for volume "pvc-ac31cb2a-24d3-47e3-b734-691857476bf0"
  Warning  FailedMapVolume         11s (x7 over 44s)  kubelet                  MapVolume.MapPodDevice failed for volume "pvc-ac31cb2a-24d3-47e3-b734-691857476bf0" : rpc error: code = Internal desc = failed to bind mount "/var/lib/kubelet/plugins/kubernetes.io/csi/volumeDevices/staging/pvc-ac31cb2a-24d3-47e3-b734-691857476bf0/pvc-ac31cb2a-24d3-47e3-b734-691857476bf0" at "/var/lib/kubelet/plugins/kubernetes.io/csi/volumeDevices/publish/pvc-ac31cb2a-24d3-47e3-b734-691857476bf0/3c72acb2-8e4e-401e-8d6c-36432bb395fb": mount failed: exit status 32
Mounting command: mount
Mounting arguments:  -o bind /var/lib/kubelet/plugins/kubernetes.io/csi/volumeDevices/staging/pvc-ac31cb2a-24d3-47e3-b734-691857476bf0/pvc-ac31cb2a-24d3-47e3-b734-691857476bf0 /var/lib/kubelet/plugins/kubernetes.io/csi/volumeDevices/publish/pvc-ac31cb2a-24d3-47e3-b734-691857476bf0/3c72acb2-8e4e-401e-8d6c-36432bb395fb
Output: mount: /var/lib/kubelet/plugins/kubernetes.io/csi/volumeDevices/publish/pvc-ac31cb2a-24d3-47e3-b734-691857476bf0/3c72acb2-8e4e-401e-8d6c-36432bb395fb: special device /var/lib/kubelet/plugins/kubernetes.io/csi/volumeDevices/staging/pvc-ac31cb2a-24d3-47e3-b734-691857476bf0/pvc-ac31cb2a-24d3-47e3-b734-691857476bf0 does not exist.
       dmesg(1) may have more information after failed mount system call.

This perfectly works on 1.59.1 though.

What you expected to happen: Importing a disk to my Storageclass with longhorn-rwx

How to reproduce it (as minimally and precisely as possible):

  • Create a DataVolume import on on my storageclass longhorn-rwx

Additional context:

This is the storageclass used at the moment:

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: longhorn-rwx
provisioner: driver.longhorn.io
allowVolumeExpansion: true
reclaimPolicy: Delete
volumeBindingMode: Immediate
parameters:
  numberOfReplicas: "2"
  staleReplicaTimeout: "2880"
  fromBackup: ""
  fsType: "ext4"
  nfsOptions: "vers=4.2,noresvport,softerr,timeo=600,retrans=5"

Environment:

  • CDI version: 1.59.2
  • Kubernetes version (use kubectl version): 1.31.6
  • DV specification: N/A
  • Cloud provider or hardware configuration: N/A
  • OS (e.g. from /etc/os-release): Talos Linux 1.9.3
  • Kernel (e.g. uname -a): 6.12.11-talos
  • Install tools: N/A
  • Others: N/A

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 25 (2 by maintainers)

Most upvoted comments

@MichaelTrip note that following #3687 driver.longhorn.io StorageProfile will allow ReadWriteMany, Filesystem only if the StorageClass has the nfsOptions parameter, which was removed in your last StorageClass. When you only have the fsType parameter you’ll get ReadWriteOnce, Filesystem.

@MichaelTrip Back from a vacation, I easily reproduced it on the main branch. Fixing it.

Awesome! Let me know if I can test anything?

/reopen

I think we do have in bug in that we ignore the nfs hints on the longhorn storage class

Hey, thanks for opening the issue!

It’s possible this is the change from the changelog between those two releases that breaks you: #3488 (Though I doubt we override the user-specified storage profile settings)

Did we get the capabilities of longhorn wrong? could you attach the pvc spec from before/after the upgrade?

Do you want me to drop the yaml output of a pvc created by a DataVolume before and after the upgrade, right? I can do that. Give me a moment 😃