local-path-provisioner icon indicating copy to clipboard operation
local-path-provisioner copied to clipboard

Multiple Path Round Robin

Open stephenstubbs opened this issue 5 years ago • 2 comments

Hi,

Thank you for this great project. I'm currently trying to deploy multiple instances of the minio operator. Unfortunately their privisioner https://github.com/minio/direct-csi doesn't support multiple storage classes when deploying multiple instances of it like this project does.

I'm wondering is it possible for this provisioner to create the pvs in each path of a config using round robin instead of at random? Then I could use this for everything which would be great.

stephenstubbs avatar Oct 22 '20 12:10 stephenstubbs

Hi,

Thank you for this great project. I'm currently trying to deploy multiple instances of the minio operator. Unfortunately their privisioner https://github.com/minio/direct-csi doesn't support multiple storage classes when deploying multiple instances of it like this project does.

I'm wondering is it possible for this provisioner to create the pvs in each path of a config using round robin instead of at random? Then I could use this for everything which would be great.

Thanks for the idea and technically it's doable by having an extra layer to keep the path usage info. I will add to the backlog and see if any plan to do in the future.

innobead avatar Mar 02 '21 18:03 innobead

@innobead I'd like to contribute to this feature if it's not too complicated, and I'm glad to get some guidence.

The first intuition after glanced the code:

  1. Add a per-node ConfigMap option like policy to choose between random and round-robin, etc.
  2. Store the runtime per-node current round-robin index in some variable somewhere.
  3. Implement a getRoundRobinPathOnNode().
  4. Call getRandomPathOnNode() or getRoundRobinPathOnNode() depending on the policy config of the node.

Any thoughts?

ccll avatar Jul 04 '22 06:07 ccll