From: Venky Shankar Date: Tue, 29 May 2018 05:45:40 +0000 (-0400) Subject: rbd-mirror: schedule rebalancer to level-load instances X-Git-Tag: v14.0.1~1123^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d96cee13d7427bca617e473c522ad7cf00274566;p=ceph.git rbd-mirror: schedule rebalancer to level-load instances Policy implementation takes care of evenly balancing images across rbd mirror instances. This is done when images are added to the map and/or instances are added or removed with the exception of image removal -- removing images does not reshuffle other (mapped) images which can result in some of the instances under loaded (in worst case, if one removes images which all map to a particular instance, that instance would remain idle until more images are added or a shuffle is triggered). We could possibly trigger map shuffle when images are removed, but that would change the interface between Policy and ImageMap class (in the form of changes to Policy::remove_images()). Also, policy (and its implementations) would have to do more work when the above class method is invoked. Therefore, an interval based rebalancer is added to ImageMap for periodic rebalancing of images only if the following conditions are met: - policy has been idle for a configured time duration - no scheduled or in-transit operations Signed-off-by: Venky Shankar --- diff --git a/src/common/options.cc b/src/common/options.cc index 2a31285ff228..fc7df3b4df89 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -6511,6 +6511,10 @@ static std::vector