NetApp / trident

Storage orchestrator for containers
Apache License 2.0
762 stars 222 forks source link

nouuid mount option for XFS volumes lost when mountOptions are defined in StorageClass #788

Closed tongpu closed 1 year ago

tongpu commented 1 year ago

Describe the bug In our environment we've run into the issue reported in #514, but we're already running v22.01.1, which should contain the fix.

After further investigation we believe that this is caused, because we've configured the discard mount option in our StorageClass, which seems to cause the nouuid option to not be added anymore.

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

To Reproduce

Expected behavior

Observed behavior

clintonk commented 1 year ago

Hello, @tongpu. This is expected, as the set of mount options specified in the storage class (if present) fully replace the set of mount options configured in a Trident backend. Mount options specified in both places could easily conflict, and given the wide array of available mount options, attempting to cleanly resolve such conflicts doesn't sound feasible.

https://github.com/NetApp-openstack-dev/trident/blob/master/frontend/csi/controller_server.go#L365

tongpu commented 1 year ago

@clintonk Quick follow-up to this. I've now added both nouuid and discard to the mountOptions in the StorageClass, but when I create a PVC from a VolumeSnapshot the discard option somehow gets dropped. Is this expected as well?