Comment 1 for bug 2052726

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

After some oob conversation with Przemyslaw, we worked out the bug is at:

https://opendev.org/openstack/charm-glance/src/commit/3fadd2374f99bb7d4e212cbe6cdb8116d5eecfbd/hooks/glance_contexts.py#L389

Essentially, this code reads as:

                for volume_type in volume_types:
                    if 'volume_type' not in ctxt['enabled_backend_configs']:
                        ctxt['enabled_backend_configs'][volume_type] = {}
                    ctxt['enabled_backend_configs'][volume_type].update(
                        {'cinder_catalog_info': volume_catalog_info})

And the bug is the string 'volume_type' rather than the bare volume_type in the "if 'volume_type' not in ...". It will always blank the ctxt[..][volume_type] as 'volume_type' (as a string key) doesn't exist in the ctxt[..] dictionary.

A relatively simple fix, but just waiting on Przemyslaw to do some live testing to see if the simple fix actually resolves the whole problem.