Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tridentctl import cannot mount LUKS encrypted volumes in backend without LUKS as a default #849

Closed
alifelan opened this issue Aug 4, 2023 · 1 comment

Comments

@alifelan
Copy link

alifelan commented Aug 4, 2023

Describe the bug
When having a backend with two virtual pools, one for LUKS and one for non LUKS, and a default without LUKS, we can create LUKS encrypted volumes. Then, we can create a snapshot of the volume. But when we try to import the volume with tridentctl import, the import itself succeeds, but the volume cannot be mounted to a pod due to the following error:

kubelet  MountVolume.MountDevice failed for volume "pvc-72b02d9a-3198-47c2-8318-5a85a858036c" : rpc error: code = Internal desc = failed to stage volume: LUN trident_pvc_72b02d9a_3198_47c2_8318_5a85a858036c, device dm-11 already formatted with other filesystem: crypto_LUKS

Environment
Provide accurate information about the environment to help us reproduce the issue.

  • Trident version: 23.04.0 with extra patches
  • Container runtime: containerd://1.6.18
  • Kubernetes version: v1.26.2
  • OS: Ubuntu 20.04.6 LTS
  • NetApp backend types: ontapp-san

To Reproduce

  • Have a backend with the following pools:
...
    defaults:
      encryption: "false"
    storage:
    - defaults:
        luksEncryption: "false"
      labels:
        luks: "false"
    - defaults:
        luksEncryption: "true"
      labels:
        luks: "true"
...
  • Create a PVC with a LUKS storage class
  • Snapshot the PVC
  • Delete it
  • Import it back with tridentctl import
  • Mount it to a pod

Expected behavior
The pod should be able to mount and read/write to the volume

@vasum0406
Copy link
Collaborator

This has been fixed in Trident 24.06.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants