From b196b27eafc71c60435bdb0e31b380ece96626ac Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 18 Jul 2017 14:48:29 -0400 Subject: [PATCH] test/ceph_objectstore_tool.py: fix parsing of osd tree output Signed-off-by: Sage Weil --- src/test/ceph_objectstore_tool.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/test/ceph_objectstore_tool.py b/src/test/ceph_objectstore_tool.py index 52850523bb1..bae12f4d884 100755 --- a/src/test/ceph_objectstore_tool.py +++ b/src/test/ceph_objectstore_tool.py @@ -513,8 +513,12 @@ def get_osd_weights(CFSD_PREFIX, osd_ids, osd_path): shell=True) weights = [] for line in output.strip().split('\n'): - osd_id, weight, osd_name = re.split('\s+', line) - weights.append(float(weight)) + print(line) + linev = re.split('\s+', line) + if linev[0] is '': + linev.pop(0) + print('linev %s' % linev) + weights.append(float(linev[1])) return weights -- 2.39.5