From c665bf391dbb48d960062b33806c679df17c6c4a Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 11 Nov 2015 14:28:00 +0000 Subject: [PATCH] pybind: minor fixes to volumeclient Signed-off-by: John Spray --- src/pybind/ceph_volume_client.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pybind/ceph_volume_client.py b/src/pybind/ceph_volume_client.py index e613fdf87b4..2e284b280ca 100644 --- a/src/pybind/ceph_volume_client.py +++ b/src/pybind/ceph_volume_client.py @@ -23,7 +23,6 @@ except EnvironmentError as e: raise ImportError(e.__str__()) - class RadosError(Exception): """ Something went wrong talking to Ceph with librados @@ -116,7 +115,7 @@ class RankEvicter(threading.Thread): def _ready_to_evict(self): if self._mds_map['up'].get("mds_{0}".format(self.rank), None) != self.gid: log.info("Evicting {0} from {1}/{2}: rank no longer associated with gid, done.".format( - self._client_spec, + self._client_spec, self.rank, self.gid )) raise RankEvicter.GidGone() @@ -273,6 +272,9 @@ class CephFSVolumeClient(object): volume_path.volume_id) def _get_group_path(self, group_id): + if group_id is None: + raise ValueError("group_id may not be None") + return os.path.join( self.VOLUME_PREFIX, group_id @@ -337,7 +339,7 @@ class CephFSVolumeClient(object): self.disconnect() def _get_pool_id(self, osd_map, pool_name): - # Maybe borrow the OSDMap wrapper class from calamari if more helpers like this aren needed. + # Maybe borrow the OSDMap wrapper class from calamari if more helpers like this aren't needed. for pool in osd_map['pools']: if pool['pool_name'] == pool_name: return pool['pool'] -- 2.47.3