Skip to content
Snippets Groups Projects
Commit 340019d7 authored by Filippos Giannakos's avatar Filippos Giannakos
Browse files

Fix KeyError in case of missing cephx_id

parent c1f98a66
No related branches found
No related tags found
No related merge requests found
......@@ -297,7 +297,7 @@ def format_qemu_uri(name, pool=None, cephx=None, conf_file=None, cache=None,
uri = 'kvm:rbd:%s' % RBD.format_name(name, pool=pool)
extra_conf = ''
# Only id is supported for cephx authentication, for the userspace URI.
if cephx['id']:
if cephx.get('id'):
extra_conf += ':id=%s' % cephx['id']
if conf_file:
extra_conf += ':conf=%s' % conf_file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment