From: John Spray Date: Wed, 11 Nov 2015 14:28:00 +0000 (+0000) Subject: pybind: minor fixes to volumeclient X-Git-Tag: v10.0.3~16^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c665bf391dbb48d960062b33806c679df17c6c4a;p=ceph.git pybind: minor fixes to volumeclient Signed-off-by: John Spray --- diff --git a/src/pybind/ceph_volume_client.py b/src/pybind/ceph_volume_client.py index e613fdf87b45..2e284b280caa 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']