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

fix(csi-ds): mountpoint-dir same mountpath in pod #628

Merged
merged 2 commits into from
Oct 19, 2021

Conversation

eyenx
Copy link
Contributor

@eyenx eyenx commented Oct 19, 2021

Fixes the mountpoint-dir overwrite introduced in #603

The mountppath inside the pod should be the same as on the node, or you'll end up with a no such file or directory error

  Warning  FailedMount  13m (x94 over 3h8m)    kubelet  MountVolume.SetUp failed for volume "mypod-vault" : rpc error: code = Unknown desc = failed to mount secrets store objects for pod default/mypod-6lv8db, err: rpc error: code = Unknown desc = error making mount request: secrets-store csi driver failed to write objectname-secret at /var/differentpath/var/lib/kubelet/pods/a9493f5e-ed2b-40c7-8f13-6f20eeb0134f/volumes/kubernetes.io~csi/mypod-vault/mount: open /var/differentpath/var/lib/kubelet/pods/a9493f5e-ed2b-40c7-8f13-6f20eeb0134f/volumes/kubernetes.io~csi/mypod-vault/mount/objectname-secret: no such file or directory

Signed-off-by: Toni Tauro [email protected]

@eyenx
Copy link
Contributor Author

eyenx commented Oct 19, 2021

Pinging @benashz This is something we didn't test :D Sorry

@calvn calvn requested review from tvoran and benashz October 19, 2021 16:22
@benashz benashz self-assigned this Oct 19, 2021
@benashz benashz added the bug Something isn't working label Oct 19, 2021
Copy link
Contributor

@benashz benashz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinging @benashz This is something we didn't test :D Sorry

Yeah looks like one of the updates was missed. No worries at all.

@@ -44,7 +44,7 @@ spec:
- name: providervol
mountPath: "/provider"
- name: mountpoint-dir
mountPath: /var/lib/kubelet/pods
mountPath: {{ .Values.csi.daemonSet.kubeletRootDir }}/pods
Copy link
Contributor

@benashz benashz Oct 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine as long as the csi-provider's kubeletRootDir is configured the same. I don't see the need to ever change the default value however, since this would entail deploying the worker nodes in a nonstandard way.

Perhaps when/if we add support for Windows to the CSI the we could turn this into a helper function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @benashz

Of course I agree with you, there should never be the need to change the default dir for /var/lib/kubelet

We encountered Nutanix Karbon doing this and putting /var/lib/kubelet under /var/nutanix/var/lib/kubelet, this is why we are in need of this change.

@benashz benashz merged commit 6914c4d into hashicorp:main Oct 19, 2021
benashz added a commit that referenced this pull request Oct 21, 2021
benashz added a commit that referenced this pull request Oct 21, 2021
@tvoran tvoran mentioned this pull request Oct 21, 2021
illegalnumbers pushed a commit to streamnative/vault-helm that referenced this pull request Mar 17, 2022
* fix(csi-ds): mountpoint-dir same mountpath in pod

Signed-off-by: Toni Tauro <[email protected]>

* Update Chart.yaml

Co-authored-by: Ben Ash <[email protected]>
illegalnumbers pushed a commit to streamnative/vault-helm that referenced this pull request Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants