From: Lorenz Bausch Date: Wed, 5 Oct 2022 13:42:00 +0000 (+0200) Subject: mgr/balancer: Fix `end_weekday` being exclusive X-Git-Tag: v18.1.0~708^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=02cd53c53b1913a6bd71c3b047dbbfb417edfafe;p=ceph.git mgr/balancer: Fix `end_weekday` being exclusive The check for `end_weekday` was exclusive which resulted in balancing stopping one day too early. Fixes: https://tracker.ceph.com/issues/57768 Signed-off-by: Lorenz Bausch --- diff --git a/src/pybind/mgr/balancer/module.py b/src/pybind/mgr/balancer/module.py index 7a43b7ce2201..48579fe5500e 100644 --- a/src/pybind/mgr/balancer/module.py +++ b/src/pybind/mgr/balancer/module.py @@ -646,7 +646,7 @@ class Module(MgrModule): begin_weekday = cast(int, self.get_module_option('begin_weekday')) end_weekday = cast(int, self.get_module_option('end_weekday')) if begin_weekday < end_weekday: - permit = begin_weekday <= weekday < end_weekday + permit = begin_weekday <= weekday <= end_weekday elif begin_weekday == end_weekday: permit = True else: