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

Backport of CSI: include volume namespace in staging path into release/1.6.x #20572

Merged

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #20532 to be assessed for backporting due to the inclusion of the label backport/1.6.x.

🚨

Warning automatic cherry-pick of commits failed. If the first commit failed,
you will see a blank no-op commit below. If at least one commit succeeded, you
will see the cherry-picked commits up to, not including, the commit where
the merge conflict occurred.

The person who merged in the original PR is:
@tgross
This person should manually cherry-pick the original PR into a new backport PR,
and close this one when the manual backport PR is merged in.

merge conflict error: POST https://api.github.com/repos/hashicorp/nomad/merges: 409 Merge conflict []

The below text is copied from the body of the original PR.


CSI volumes are namespaced. But the client does not include the namespace in the staging mount path. This causes CSI volumes with the same volume ID but different namespace to collide if they happen to be placed on the same host. The per-allocation paths don't need to be namespaced, because an allocation can only mount volumes from its job's own namespace.

Fixes: #18741
See #18741 (comment) for my notes on upgrade testing.


Overview of commits

Copy link

hashicorp-cla-app bot commented May 13, 2024

CLA assistant check
All committers have signed the CLA.

CSI volumes are namespaced. But the client does not include the namespace in the
staging mount path. This causes CSI volumes with the same volume ID but
different namespace to collide if they happen to be placed on the same host. The
per-allocation paths don't need to be namespaced, because an allocation can only
mount volumes from its job's own namespace.

Rework the CSI hook tests to have more fine-grained control over the mock
on-disk state. Add tests covering upgrades from staging paths missing
namespaces.

Fixes: #18741
@tgross tgross force-pushed the backport/csi-staging-conflicts/repeatedly-flexible-worm branch from 306205b to b28d0d3 Compare May 13, 2024 15:28
@tgross tgross marked this pull request as ready for review May 13, 2024 15:28
@tgross tgross merged commit 7a29b30 into release/1.6.x May 13, 2024
25 checks passed
@tgross tgross deleted the backport/csi-staging-conflicts/repeatedly-flexible-worm branch May 13, 2024 15:47
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.

None yet

2 participants