From: Ramana Raja Date: Wed, 28 Sep 2016 08:36:54 +0000 (+0530) Subject: ceph_volume_client: check if volume metadata is empty X-Git-Tag: v11.1.0~587^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a95de7882cdf70e04e3c918ff41fc690d0d9bda3;p=ceph.git ceph_volume_client: check if volume metadata is empty ... 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 --- diff --git a/src/pybind/ceph_volume_client.py b/src/pybind/ceph_volume_client.py index e0939de3d545..dfc6767efaf6 100644 --- a/src/pybind/ceph_volume_client.py +++ b/src/pybind/ceph_volume_client.py @@ -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