From: Ramana Raja Date: Wed, 22 Jul 2020 10:26:36 +0000 (+0530) Subject: nautilus: mgr/volumes: use MgrModule's mon_command() X-Git-Tag: v14.2.11~17^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a15a582616157ff7c09d25f785572d86fca281d4;p=ceph.git nautilus: mgr/volumes: use MgrModule's mon_command() ... instead of 'check_mon_command' which is not in nautilus, and not compatible with python2 and early versions of py3. Signed-off-by: Ramana Raja --- diff --git a/src/pybind/mgr/volumes/fs/volume.py b/src/pybind/mgr/volumes/fs/volume.py index 1cc91ca5faba..d74330ec7e41 100644 --- a/src/pybind/mgr/volumes/fs/volume.py +++ b/src/pybind/mgr/volumes/fs/volume.py @@ -98,12 +98,14 @@ class VolumeClient(object): "that is what you want, re-issue the command followed by " \ "--yes-i-really-mean-it.".format(volname) - ret, out, err = self.mgr.check_mon_command({ + ret, out, err = self.mgr.mon_command({ 'prefix': 'config get', 'key': 'mon_allow_pool_delete', - 'who': 'mon', + 'who': 'mon.*', 'format': 'json', }) + if ret != 0: + return ret, out, err mon_allow_pool_delete = json.loads(out) if not mon_allow_pool_delete: return -errno.EPERM, "", "pool deletion is disabled; you must first " \