Notifier's default_publisher_id option requires a 'host' option to be registered

Bug #1073732 reported by Mark McLoughlin
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.messaging
Invalid
Medium
Unassigned

Bug Description

This review:

  https://review.openstack.org/14466

threw up an interesting issue. In openstack.common.notifier.api we do:

    cfg.StrOpt('default_publisher_id',
               default='$host',
               help='Default publisher_id for outgoing notifications'),

We also have this:

  def publisher_id(service, host=None):
      if not host:
          host = CONF.host
      return "%s.%s" % (service, host)

which basically means projects can only use this API if they first register a 'host' configuration option.

I guess we have a few options:

1) We could make 'host' a config option registered by some base part of the library - I'm a little reluctant to do this because the semantics are a little weird. What does changing it mean? It affects a whole bunch of places in Nova, for example. Also, what part of openstack-common would it make sense to register the option from?

2) Make the default for default_publisher_id be socket.getfqdn() - this sucks because the behaviour of 'just change the host option' breaks

3) We make projects which use the notifier API supply the publisher ID in a setup function - I think this is something we want to support anyway, so perhaps doing this makes most sense

Mark McLoughlin (markmc)
affects: openstack-common → oslo
Mark McLoughlin (markmc)
Changed in oslo:
importance: High → Medium
status: Confirmed → Triaged
affects: oslo-incubator → oslo.messaging
Revision history for this message
Mehdi Abaakouk (sileht) wrote :

I don't think this is still a issue, openstack.common.notifier.api have disappeared, everybody have switch to oslo.messaging.Notifier and set the publisher_id manually and use CONF.host by default (every project have naturally used Option #3).

Changed in oslo.messaging:
status: Triaged → Won't Fix
status: Won't Fix → Invalid
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.