Comment 3 for bug 1789351

Revision history for this message
wangxiyuan (wangxiyuan) wrote :

In a recent oslo.config change[1] , it will call "versionutils.report_deprecated_feature" if the option is deprecated when getting the option.

And then in oslo.log "versionutils.report_deprecated_feature"[2], it will register a new option, so in this bug, when compare the CONF(there is a deprecated options "registry_host") in keystonemiddleware, the CONF's context is changed, that's the reason why the Error is "dictionary changed size during iteration" happened.

I'm not sure change != to "is not" in keystonemiddleware is the best way, because in keystonemiddleware here, it want to compare the content. If change to "is not", it'll not compare the content any more. (i.e. we should double check that it will not introduce other bugs)

I think the best way may be fixing it in oslo.log. When register oslo.log's options[3], it should register the "fatal_deprecations" as well.

Or a minimum change is in Glance, just add two lines in glance.cmd.api:

from oslo_log import versionutils
versionutils.register_options()

[1]: https://review.openstack.org/#/c/560094/4/oslo_config/cfg.py
[2]: https://git.openstack.org/cgit/openstack/oslo.log/tree/oslo_log/versionutils.py#n286
[3]: https://git.openstack.org/cgit/openstack/oslo.log/tree/oslo_log/log.py#n241