]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_volume_client: check if volume metadata is empty
authorRamana Raja <rraja@redhat.com>
Wed, 28 Sep 2016 08:36:54 +0000 (14:06 +0530)
committerRamana Raja <rraja@redhat.com>
Tue, 4 Oct 2016 11:23:37 +0000 (16:53 +0530)
... when recovering from partial auth updates.

Auth update happens in the following order:
auth metadata update, volume metadata update, and then Ceph auth
update.

A partial auth update can happen such that auth metadata is updated,
but the volume metadata isn't updated and is empty, and the auth
update did not propogate to Ceph. When recovering from such a
scenario, check if volume metadata is empty and if so remove the
partial auth update info in auth metadata.

Signed-off-by: Ramana Raja <rraja@redhat.com>
src/pybind/ceph_volume_client.py

index e0939de3d545f3576c0febf7f3e8c68d98c07616..dfc6767efaf616d20f04665bc2571b9c7e9fae63 100644 (file)
@@ -338,7 +338,7 @@ class CephFSVolumeClient(object):
                 # No VMeta update indicates that there was no auth update
                 # in Ceph either. So it's safe to remove corresponding
                 # partial update in AMeta.
-                if auth_id not in vol_meta['auths']:
+                if not vol_meta or auth_id not in vol_meta['auths']:
                     remove_volumes.append(volume)
                     continue