Skip to content

Commit

Permalink
Merge pull request #11656: jewel: ceph_volume_client: fix recovery fr…
Browse files Browse the repository at this point in the history
…om partial auth update

Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
Loic Dachary committed Nov 23, 2016
2 parents fb8316d + 805f032 commit 609ba04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pybind/ceph_volume_client.py
Expand Up @@ -318,7 +318,7 @@ def recover(self):

log.debug("Recovered from partial auth updates (if any).")

def _recover_auth_meta(auth_id, auth_meta):
def _recover_auth_meta(self, auth_id, auth_meta):
"""
Call me after locking the auth meta file.
"""
Expand All @@ -329,6 +329,7 @@ def _recover_auth_meta(auth_id, auth_meta):
continue

(group_id, volume_id) = volume.split('/')
group_id = group_id if group_id is not 'None' else None
volume_path = VolumePath(group_id, volume_id)
access_level = volume_data['access_level']

Expand All @@ -338,7 +339,7 @@ def _recover_auth_meta(auth_id, auth_meta):
# 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

Expand Down

0 comments on commit 609ba04

Please sign in to comment.