I've imported openstack.common.versionutils to get @deprecated decorator in muranodashboard (Horizon dashboard plugin), but once the module which uses versionutils is imported itself, I get the following error.
Traceback (most recent call last):
File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 72, in __call__
return self.application(environ, start_response)
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 255, in __call__
response = self.get_response(request)
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 178, in get_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/horizon/decorators.py", line 38, in dec
return view_func(request, *args, **kwargs)
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/horizon/decorators.py", line 54, in dec
return view_func(request, *args, **kwargs)
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/horizon/decorators.py", line 38, in dec
return view_func(request, *args, **kwargs)
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/catalog/views.py", line 137, in __inner
return func(request, **kwargs)
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/catalog/views.py", line 168, in __inner
return func(request, **kwargs)
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 25, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/catalog/views.py", line 191, in quick_deploy
do_redirect=True, drop_wm_form=True)
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/catalog/views.py", line 137, in __inner
return func(request, **kwargs)
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/catalog/views.py", line 168, in __inner
return func(request, **kwargs)
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 25, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/catalog/views.py", line 181, in deploy
do_redirect=do_redirect, drop_wm_form=drop_wm_form)
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/catalog/views.py", line 137, in __inner
return func(request, **kwargs)
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/catalog/views.py", line 228, in view
forms = initforms(request, kwargs)
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/dynamic_ui/services.py", line 163, in get_app_forms
app = import_app(request, kwargs.get('app_id'))
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/dynamic_ui/services.py", line 149, in import_app
app = _apps[app_id] = Service(app_data, **service)
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/dynamic_ui/services.py", line 75, in __init__
self._add_form(name, field_specs, validators)
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/dynamic_ui/services.py", line 83, in _add_form
import muranodashboard.dynamic_ui.forms as forms
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/dynamic_ui/forms.py", line 24, in <module>
import muranodashboard.dynamic_ui.fields as fields
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/dynamic_ui/fields.py", line 40, in <module>
from muranodashboard.openstack.common import versionutils
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/openstack/common/versionutils.py", line 24, in <module>
from muranodashboard.openstack.common import log as logging
File "/home/timur/develop/murano/murano-dashboard/muranodashboard/openstack/common/log.py", line 193, in <module>
CONF.register_cli_opts(logging_cli_opts)
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/oslo/config/cfg.py", line 1579, in __inner
result = f(self, *args, **kwargs)
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/oslo/config/cfg.py", line 1739, in register_cli_opts
self.register_cli_opt(opt, group, clear_cache=False)
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/oslo/config/cfg.py", line 1583, in __inner
return f(self, *args, **kwargs)
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/oslo/config/cfg.py", line 1733, in register_cli_opt
return self.register_opt(opt, group, cli=True, clear_cache=False)
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/oslo/config/cfg.py", line 1583, in __inner
return f(self, *args, **kwargs)
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/oslo/config/cfg.py", line 1704, in register_opt
if _is_opt_registered(self._opts, opt):
File "/home/timur/develop/murano/murano-dashboard/.venv/local/lib/python2.7/site-packages/oslo/config/cfg.py", line 494, in _is_opt_registered
raise DuplicateOptError(opt.name)
DuplicateOptError: duplicate option: log-format
I guess that has something to do with the fact that openstack.common.log is imported both by versionutils module and openstack_dashboard. Is there any way to retain the functionality of versionutils module and avoid that error?
This is usually caused by 2 copies of the option being registered with slight differences (most frequently it is the help string). Make sure all copies of openstack/ common/ log.py are the same by syncing updates from the incubator into the projects using them.