From: Ramana Raja Date: Fri, 11 Nov 2016 13:12:40 +0000 (+0530) Subject: ceph_volume_client: set an existing auth ID's default mon caps X-Git-Tag: v11.1.0~171^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b0fa3a403373e4312fd805ab7653f055f4933eae;p=ceph.git 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 --- 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