rpc-api-review: should be able to use non-global conf

Bug #1131233 reported by Mark McLoughlin
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
High
Unassigned
oslo-incubator
Fix Released
High
Unassigned

Bug Description

Issue raised by Julien here:

  http://lists.openstack.org/pipermail/openstack-dev/2013-February/thread.html#5861

Basically, we should be able to create a new ConfigOpts() object and have the rpc code use that instead of global cfg.CONF

An rpc.get_impl() call may be sufficient:

 +def get_impl(conf):
  + conf.register_opts(rpc_opts)
 + try:
 + return = importutils.import_module(conf.rpc_backend)
 + except ImportError:
 + # For backwards compatibility with older nova config.
 + impl = conf.rpc_backend.replace('nova.rpc',
 + 'nova.openstack.common.rpc')
 + return importutils.import_module(impl)

Prototype patch for ceilometer here: https://github.com/markmc/ceilometer/commits/non-global-conf

Mark McLoughlin (markmc)
description: updated
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

In practice the logging package also caused an issue. We solved it in ceilometer's nova notifier plugin with some heavy rewriting and module shadowing. See https://review.openstack.org/#/c/22759/

Changed in ceilometer:
status: New → Confirmed
Julien Danjou (jdanjou)
Changed in ceilometer:
importance: Undecided → High
Revision history for this message
Mark McLoughlin (markmc) wrote :

oslo.messaging supports using non-global CONF, so I'm marking this as FixReleased

Changed in oslo:
status: Confirmed → Fix Released
Revision history for this message
gordon chung (chungg) wrote :

Ceilometer uses oslo.messaging so marking this as committed... patch for reference:

https://review.openstack.org/#/c/57457/
https://review.openstack.org/#/c/99891/

Changed in ceilometer:
status: Confirmed → Fix Committed
Changed in ceilometer:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.