From b0fa3a403373e4312fd805ab7653f055f4933eae Mon Sep 17 00:00:00 2001 From: Ramana Raja Date: Fri, 11 Nov 2016 18:42:40 +0530 Subject: [PATCH] ceph_volume_client: set an existing auth ID's default mon caps ... as 'allow r' (the minimum mon caps required to access a share) when: * authorizing the auth ID to access a volume. * deauthorizing the auth ID to access a volume, but the auth ID is authorized to access other volumes. In both the above cases, the ceph_volume_client previously tried to set the mon caps of the auth ID to an invalid value, None. Fixes: http://tracker.ceph.com/issues/17800 Signed-off-by: Ramana Raja --- src/pybind/ceph_volume_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/ceph_volume_client.py b/src/pybind/ceph_volume_client.py index 012bc6afac87..89722ec95e73 100644 --- a/src/pybind/ceph_volume_client.py +++ b/src/pybind/ceph_volume_client.py @@ -1084,7 +1084,7 @@ class CephFSVolumeClient(object): 'caps': [ 'mds', mds_cap_str, 'osd', osd_cap_str, - 'mon', cap['caps'].get('mon')] + 'mon', cap['caps'].get('mon', 'allow r')] }) caps = self._rados_command( 'auth get', @@ -1218,7 +1218,7 @@ class CephFSVolumeClient(object): 'caps': [ 'mds', mds_cap_str, 'osd', osd_cap_str, - 'mon', cap['caps'].get('mon')] + 'mon', cap['caps'].get('mon', 'allow r')] }) # FIXME: rados raising Error instead of ObjectNotFound in auth get failure -- 2.47.3