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

Not working for subPath #4

Open
AmreeshTyagi opened this issue Dec 11, 2018 · 9 comments

Comments

@AmreeshTyagi
Copy link

@AmreeshTyagi AmreeshTyagi commented Dec 11, 2018

Thanks for providing this provisioner. I am setting up MySQL HA using Kubernetes Stateful example.

I have tried this provisioner, but it is creating dynamic PV & mounting also but not in DEFAULT provided directory, but on this path /var/lib/kubelet/pods/82d24112-fc50-11e8-90e7-005056b146f6/volume-subpaths.

I found that it is happeing if I use subPath, otherwise it works well.

Any idea, how can I resolve this issue?

@steav

This comment has been minimized.

Copy link

@steav steav commented Jan 27, 2019

Yes, same for me.

Working without subpath (findmnt):
|-/vol1 datastore[/local-path-pvc/pvc-b499d69f-2252-11e9-8fc6-14dda9d41a28] zfs rw,relatime,xattr,noacl

Problem using subpath:
|-/vol1 overlay[/mnt/datastore/local-path-pvc/pvc-c0de97a5-2254-11e9-8fc6-14dda9d41a28/subdir1] overlay rw,relatime,lowerdir=/var/lib/docker/overlay2/l/

Creating the directory tree before deployment does not help.

@yasker

This comment has been minimized.

Copy link
Member

@yasker yasker commented Feb 26, 2019

@AmreeshTyagi @steav Can you elaborate the problem? Or provide a yaml for expected behavior? Does the container work?

@khassel

This comment has been minimized.

Copy link

@khassel khassel commented May 11, 2019

same for me. Seems that the volume-mount does not work with a subpath.
The pod.yaml example works as expected, but if you add a subpath it doesn't work.
Executing kubectl exec volume-test -- sh -c "echo local-path-test > /data/test" will write a test-file somewhere in /var/lib/kubelet/pods/... but not in the directory provided by the pvc local-path-pvc

@yasker

This comment has been minimized.

Copy link
Member

@yasker yasker commented May 11, 2019

@khassel

This comment has been minimized.

Copy link

@khassel khassel commented May 11, 2019

yes, exactly.

@DrMurx

This comment has been minimized.

Copy link

@DrMurx DrMurx commented May 31, 2019

I came across the same issue:

  1. Create a single node Rancher cluster
  2. Install local-path-provisioner storage class
  3. Enable cluster level monitoring built into RKE, and enable persistent storage for Prometheus on the local-path storage class
@khassel

This comment has been minimized.

Copy link

@khassel khassel commented Jun 2, 2019

@yasker Could you reproduce this subPath issue? Can we expect a solution?

@yasker

This comment has been minimized.

Copy link
Member

@yasker yasker commented Jun 4, 2019

@khassel You're right, I am able to reproduce the issue now.

It seems due to kubernetes/kubernetes#61456 , which is a problem with containerized kubelet. If you're using RKE, we have an issue tracking it with Rancher: rancher/rancher#14836

I've also tried using LocalVolume instead of HostPath, but it doesn't work for RKE as well. Seems not much I can do at the moment except waiting for the RKE fix.

@khassel

This comment has been minimized.

Copy link

@khassel khassel commented Jun 4, 2019

@yasker Thanks for this info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.