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

Storage provisioner broken for multinode mode #12165

Closed
R-omk opened this issue Aug 9, 2021 · 15 comments · Fixed by #15062
Closed

Storage provisioner broken for multinode mode #12165

R-omk opened this issue Aug 9, 2021 · 15 comments · Fixed by #15062
Labels
addon/storage-provisioner Issues relating to storage provisioner addon co/multinode Issues related to multinode clusters help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@R-omk
Copy link

R-omk commented Aug 9, 2021

It seems that the hostpath provisioner is completely unsuitable for multinode installations.

It must create and prepare directories on the exact host on which a pv is requested. In addition, it must add nodeaffinity for every hostpath pv exactly the same as it happens at https://github.com/rancher/local-path-provisioner

Steps to reproduce the issue:

  1. minikube create -n 3
  2. install any statefulset that requests pv and has pod anti affinity rule

minikube version: v1.22.0
storage-provisioner: image: 'gcr.io/k8s-minikube/storage-provisioner:v5'

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 9, 2021

It seems that the hostpath provisioner is completely unsuitable for multinode installations.

I think this is a known limitation. Possibly somewhat undocumented, but not surprising.

Theoretically it could work, if "something else" was distributing the files between nodes ?

But node affinity sounds like a good addition. (multi-node was not really part of the spec)

Unfortunately minikube's local storage provisioner is somewhat old and unmaintained 😔

@afbjorklund afbjorklund added addon/storage-provisioner Issues relating to storage provisioner addon co/multinode Issues related to multinode clusters kind/bug Categorizes issue or PR as related to a bug. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Aug 9, 2021
@sharifelgamal sharifelgamal added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Aug 9, 2021
@sharifelgamal
Copy link
Collaborator

Yeah, this is a known issue. Thank you for filing this. Help wanted!

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 9, 2021

afaik, kind just uses the rancher local-path-provisioner (although somewhat customized) :
https://github.com/kubernetes-sigs/kind/blob/main/pkg/build/nodeimage/const_storage.go

See #3628 for history

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 7, 2021
@R-omk
Copy link
Author

R-omk commented Nov 7, 2021

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 7, 2021
@k8s-triage-robot

This comment was marked as outdated.

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 5, 2022
@Poweranimal
Copy link

Is there an alternative storage driver one can use for minikube that supports multi-node setups?

@R-omk
Copy link
Author

R-omk commented Feb 26, 2022

install_provisioner:
  curl https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml | sed 's/\/opt\/local-path-provisioner/\/var\/opt\/local-path-provisioner/ ' | kubectl apply -f -
  kubectl patch storageclass standard -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
  kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

@Poweranimal
Copy link

@R-omk Thanks for your quick reply.

So this installs the rancher local-path-provisioner into my minikube cluster.
Then one sets the local-path-provisioner to the default storage class.

I will install it in the upcoming days in my cluster and will let you know, if I face any troubles ;)

@Poweranimal
Copy link

@R-omk Yes, the local-path-provisioner solved all my multi node issues.
Thanks a lot!

@k8s-triage-robot

This comment was marked as outdated.

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 29, 2022
@klaases
Copy link
Contributor

klaases commented Mar 30, 2022

Hi @R-omk, we continue to seek help wanted for this issue.

@sharifelgamal sharifelgamal added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Apr 6, 2022
@sharifelgamal
Copy link
Collaborator

I've frozen this issue we won't end up accidentally closing it due to age.

@imrj
Copy link

imrj commented Jul 14, 2022

will this be fixed at some point? I am using the workaround from @R-omk but was hoping for a formal fix in a future release

@klaases
Copy link
Contributor

klaases commented Oct 6, 2022

Hi @imrj, it looks like @presztak has created a PR for this issue, hopefully this helps, please feel free to review #15062

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon/storage-provisioner Issues relating to storage provisioner addon co/multinode Issues related to multinode clusters help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants