]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_volume_client: set an existing auth ID's default mon caps 11917/head
authorRamana Raja <rraja@redhat.com>
Fri, 11 Nov 2016 13:12:40 +0000 (18:42 +0530)
committerRamana Raja <rraja@redhat.com>
Mon, 21 Nov 2016 10:05:21 +0000 (15:35 +0530)
... 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 <rraja@redhat.com>
src/pybind/ceph_volume_client.py

index 012bc6afac879817345e5dcaf39045c1bb1e6c1f..89722ec95e737470427dedf1546fc58e0c65b832 100644 (file)
@@ -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