[openstack-dev] [oslo] Option conflict when mixing projects
Daniel P. Berrange
berrange at redhat.com
Wed Feb 20 19:40:53 UTC 2013
On Wed, Feb 20, 2013 at 09:02:22AM -0500, Doug Hellmann wrote:
> On Wed, Feb 20, 2013 at 8:34 AM, Daniel P. Berrange <berrange at redhat.com>wrote:
>
> > On Wed, Feb 20, 2013 at 02:14:31PM +0100, Julien Danjou wrote:
> > > 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.
> >
> > IMHO the core issue here is that Ceilometer should not be putting
> > its code into Nova. Any code that is intended to run inside Nova
> > processes should be part of the Nova GIT repo, not the ceilometer
> > GIT repo. By mixing code from two projects you are exposing both
> > projects to each others' internal implementation details. Any
> > integration between the projects should be exclusively via well
> > defined RPC / REST APIs interfaces, rather than dropping in chunks
> > of external code.
> >
>
> The notifier API is supposed to be a hook point for other projects to
> inject code, isn't it?
Yes & no. Arbitrary code hooks are fine for allowing 3rd party to
plugin their custom out-of-tree enhancements. They'll never be able
to provide a stable interface unless we stop making changes to Nova
internal APIs, which we're obviously not going todo. As such features
based on dropping in code hooks is doomed to break again & again
over the long term. So if we have integration points between things
like ceilometer & nova then we'd be better off having a stable
interface for integration which doesn't expose either side to the
internal code of the other.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the OpenStack-dev
mailing list