From 02cd53c53b1913a6bd71c3b047dbbfb417edfafe Mon Sep 17 00:00:00 2001 From: Lorenz Bausch Date: Wed, 5 Oct 2022 15:42:00 +0200 Subject: [PATCH] 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 --- src/pybind/mgr/balancer/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/balancer/module.py b/src/pybind/mgr/balancer/module.py index 7a43b7ce220..48579fe5500 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: