Skip to content

S3CSI-224: Reject -o mount option with InvalidArgument error#346

Open
anurag4DSB wants to merge 1 commit intomainfrom
improvment/S3CSI-224-add-mount-option-rejection
Open

S3CSI-224: Reject -o mount option with InvalidArgument error#346
anurag4DSB wants to merge 1 commit intomainfrom
improvment/S3CSI-224-add-mount-option-rejection

Conversation

@anurag4DSB
Copy link
Copy Markdown
Collaborator

@anurag4DSB anurag4DSB commented Mar 10, 2026

Summary

  • The CSI driver previously silently stripped the fstab-style -o flag from mountOptions, giving no indication to users that the flag was unsupported. After upgrade, any PV or StorageClass carrying -o would mount without it — silently ignoring user intent.
  • This change makes -o an explicit rejection: NodePublishVolume returns an InvalidArgument gRPC error with a clear message, causing the pod event to surface the issue immediately with actionable guidance.
  • This is a breaking change: any existing deployment with -o in mountOptions will see pod failures after upgrade. The migration path is simply to remove the -o entries (they were always ignored and had no effect on the mount).

Breaking Change

Any PV or StorageClass that has -o in mountOptions will fail to mount after this upgrade.

Migration: Remove -o entries from mountOptions. If the intent was to pass options like -o uid=1000,allow-other, specify each option as its own entry instead:

# Before (broken after upgrade)
mountOptions:
  - "-o uid=1000,allow-other"

# After
mountOptions:
  - "uid=1000"
  - "allow-other"

Test plan

  • Unit test passes: make test
  • E2E static provisioning: pod with -o in PV mountOptions fails with not supported in CSI Driver event
  • E2E dynamic provisioning: pod with -o in StorageClass mountOptions fails with not supported in CSI Driver event
  • Docs render correctly: make docs — verify Troubleshooting and Mount Options pages show new content

Issue: S3CSI-224

Previously the driver silently stripped the fstab-style -o flag from
mount options, giving no feedback to users who specified it. This change
makes -o an explicit rejection at NodePublishVolume time: the driver
returns an InvalidArgument gRPC error, so the pod event immediately
shows a clear, actionable message instead of mounting silently with the
flag ignored.

Includes unit and E2E test updates to assert the rejection behaviour,
a mountpoint version bump to 1.22.0, and documentation updates:
- Release notes classify this as a breaking change with a migration note
- Troubleshooting guide adds the new error to the Mount Issues table
- Mount options reference adds an "Unsupported Syntax" section

Issue: S3CSI-224
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 10, 2026

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
133 3 130 58
View the top 3 failed test(s) by shortest run time
Scality CSI Driver for S3 E2E Suite::[It] [sig-storage] CSI Volumes [Driver: s3.csi.scality.com] [Testpattern: Pre-provisioned PV (default fs)] filepermissions should handle mv correctly (metadata intact or ENOTSUP) [sig-storage]
Stack Traces | 8.39s run time
[FAILED] Expected an error to have occurred.  Got:
    <nil>: nil
In [It] at: .../e2e/customsuites/filepermissions.go:1153 @ 03/10/26 17:08:28.492
Scality CSI Driver for S3 E2E Suite::[It] [sig-storage] CSI Volumes [Driver: s3.csi.scality.com] [Testpattern: Dynamic PV (default fs)] dynamic-provisioning-mount-options Mount args policy enforcement in dynamic provisioning should reject -o mount option with InvalidArgument error [sig-storage]
Stack Traces | 130s run time
[FAILED] timed out after 2m0s waiting for error pattern "not supported in CSI Driver" on pod pvc-tester-jn565
In [It] at: .../e2e/customsuites/dynamic_provisioning_mount_options.go:526 @ 03/10/26 17:09:24.684
Scality CSI Driver for S3 E2E Suite::[It] [sig-storage] CSI Volumes [Driver: s3.csi.scality.com] [Testpattern: Pre-provisioned PV (default fs)] mountoptions Mount arg policy enforcement rejects -o flag with InvalidArgument error [sig-storage]
Stack Traces | 130s run time
[FAILED] timed out after 2m0s waiting for error pattern "not supported in CSI Driver" on pod pvc-tester-vk4lh
In [It] at: .../e2e/customsuites/mountoptions.go:277 @ 03/10/26 17:10:53.478

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant