]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
nautilus: mgr/volumes: use MgrModule's mon_command()
authorRamana Raja <rraja@redhat.com>
Wed, 22 Jul 2020 10:26:36 +0000 (15:56 +0530)
committerRamana Raja <rraja@redhat.com>
Mon, 27 Jul 2020 12:35:47 +0000 (18:05 +0530)
... 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 <rraja@redhat.com>
src/pybind/mgr/volumes/fs/volume.py

index 1cc91ca5faba1d18c75428442bcd12db39fb1f3a..d74330ec7e41ecb25c5b7fa18ce00fc1a89d7963 100644 (file)
@@ -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 " \