summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMykola Golub <mgolub@suse.com>2020-03-12 14:40:25 +0100
committerMykola Golub <mgolub@suse.com>2020-03-12 14:40:25 +0100
commitef4c3ec399b3b96da6da9acd37b34afe943461f1 (patch)
treed5de097fe07fd43599a345dccd80f23463925f36 /src
parentqa/workunits/rbd: wait for schedule status updated (diff)
downloadceph-ef4c3ec399b3b96da6da9acd37b34afe943461f1.tar.xz
ceph-ef4c3ec399b3b96da6da9acd37b34afe943461f1.zip
mgr/rbd_support: fix recursive non-global level schedule listing
For the case when the non-global level does not have a schedule and a higher level is used as the parent, it wrongly listed schedules from all branches under the parent, instead of only the interested one. Signed-off-by: Mykola Golub <mgolub@suse.com>
Diffstat (limited to 'src')
-rw-r--r--src/pybind/mgr/rbd_support/schedule.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pybind/mgr/rbd_support/schedule.py b/src/pybind/mgr/rbd_support/schedule.py
index d791522446b..795f8f5fe2b 100644
--- a/src/pybind/mgr/rbd_support/schedule.py
+++ b/src/pybind/mgr/rbd_support/schedule.py
@@ -497,7 +497,7 @@ class Schedules:
result = {}
for level_spec_id, schedule in self.schedules.items():
ls = self.level_specs[level_spec_id]
- if ls == parent or ls.is_child_of(parent):
+ if ls == parent or ls == level_spec or ls.is_child_of(level_spec):
result[level_spec_id] = {
'name' : schedule.name,
'schedule' : schedule.to_list(),