[openstack-dev] [oslo] Option conflict when mixing projects
Julien Danjou
julien at danjou.info
Wed Feb 20 13:14:31 UTC 2013
Hi,
Context: Ceilometer provides a special notifier driver for Nova,
publishing the last counters before an instance get destroyed.
That means this code is run from `nova-compute' and uses some Ceilometer
code. The problem is that when importing Ceilometer modules from this
notifier, it ends up importing `ceilometer.openstack.common.rpc', which
tries to register the `rpc_backend' option inside
`oslo.config.cfg.CONF', object which already has this option defined by
nova.openstack.common.rpc. So `DuplicateOptError' is raised, and
badaboum.
It's likely we're a unique case because most projects using their own
copy of oslo don't mix, but we do, and we're facing a regression now
that oslo.config has been released in the wild.
So we all already knew that global state is bad, and here's another
proof. I'm not sure yet on how we'll fix this, it's going to be tricky
and we'll have to bend our code to avoid such situation.
--
Julien Danjou
// Free Software hacker / freelance consultant
// http://julien.danjou.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130220/8a8ba497/attachment.pgp>
More information about the OpenStack-dev
mailing list