From: Sunny Kumar Date: Thu, 24 Feb 2022 16:07:39 +0000 (+0000) Subject: mgr/rbd_support: cast pool_id from int to str when collecting LevelSpec X-Git-Tag: v18.0.0~1293^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=05f2cfd9b5fdd34afc7f65685e57024dc183619f;p=ceph-ci.git mgr/rbd_support: cast pool_id from int to str when collecting LevelSpec While collecting LevelSpec using class method from_name make sure to cast pool_id from int to string. This is necessary to match the internal representation of LevelSpec where pool_id is maintained as str. Fixes: https://tracker.ceph.com/issues/53915 Signed-off-by: Sunny Kumar --- diff --git a/src/pybind/mgr/rbd_support/schedule.py b/src/pybind/mgr/rbd_support/schedule.py index 615c002a043..b8507a1b8fe 100644 --- a/src/pybind/mgr/rbd_support/schedule.py +++ b/src/pybind/mgr/rbd_support/schedule.py @@ -125,7 +125,8 @@ class LevelSpec: raise ValueError("pool {} does not exist".format(pool_name)) if pool_id not in get_rbd_pools(module): raise ValueError("{} is not an RBD pool".format(pool_name)) - id += str(pool_id) + pool_id = str(pool_id) + id += pool_id if match.group(2) is not None or match.group(3): id += "/" with module.rados.open_ioctx(pool_name) as ioctx: