... 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>
# 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