MDS Balancer overrides
(Discussion from November 2016 meeting https://docs.google.com/a/redhat.com/document/d/11-O8uHWmOCqyc2_xGIukL0myjnqTfHZj3lc7xTBlQsY/edit?usp=sharing)
Motivation: provide an alternative to the automatic metadata balancing, so that users can get the benefit of spreading metadata across their cluster even if the automatic balancer algorithm isn't working well for their use case.
The idea is to add a vxattr that users can set on directories, which specifies that subtree splits should not happen beneath this directory, and what MDS rank should be used as the authority for this directory.
Various areas of code will need to pay attention to this:
- When seeing a directory with an override, if it is set to a rank other than myself, export it
- When considering a subtree split, look at ancestors and don't split if any have an override
- Regularly scan the subtree roots to see if any of them have an ancestor with an override (in case something got split/migrated before the user set an override on its ancestor), probably at same frequency as balancing.
- Ensure that export_targets includes the places we have exported directories with overrides, not just places we send things with the balancer.