Affinity rules for LXD


(Andras Dosztal) #1

Is there a way to use (anti-)affinity rules for the containers on LXD clusters, or the only way is selecting the cluster targets manually? If the latter, is this feature on the roadmap?


(Stéphane Graber) #2

Right now the scheduler is simply picking whichever node has the least amount of containers. Anything more complex has to be done outside of LXD and then use targeting to place the container where desired.

Right now making the scheduler smarter, including by taking additional cues from the user isn’t on the roadmap and it seems unlikely to make it in the next little while at least. Expanding our resource reporting APIs to make it easier for an external scheduler to do its job is something we do plan on doing though.


(Andras Dosztal) #3

Thanks, I’ll delegate this to my Ansible playbook then.