Bug 1601593 - neutron-dist.conf is conflicting with neutron.conf when disabling notifications
Summary: neutron-dist.conf is conflicting with neutron.conf when disabling notifications
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 11.0 (Ocata)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z3
: 13.0 (Queens)
Assignee: Nate Johnston
QA Contact: Federico Ressi
URL:
Whiteboard:
: 1318512 1563389 (view as bug list)
Depends On:
Blocks: 1581780
TreeView+ depends on / blocked
 
Reported: 2018-07-16 19:28 UTC by David Hill
Modified: 2022-08-16 08:38 UTC (History)
14 users (show)

Fixed In Version: openstack-neutron-12.0.3-4.el7ost
Doc Type: Bug Fix
Doc Text:
The notification_driver parameter could not be managed because it was defined in both neutron.conf and neutron-dist.conf within the neutron server container. As a result, notifications could not be disabled. To address this issue, the conflicting entry was removed from neutron-dist.conf notifications can now be disabled by managing the notification_driver parameter.
Clone Of:
Environment:
Last Closed: 2018-11-13 23:32:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
RDO 14764 0 None None None 2018-09-11 19:47:02 UTC
RDO 14765 0 None pike-rdo: MERGED openstack/neutron-distgit: Remove messaging section from neutron-dist.conf (Ie6dc5e5b7ea6c16a18d54b512a7dbc5f723e252a) 2018-08-28 11:20:40 UTC
Red Hat Issue Tracker OSP-5116 0 None None None 2022-08-16 08:38:36 UTC
Red Hat Knowledge Base (Solution) 3780611 0 None None None 2019-01-01 16:08:45 UTC
Red Hat Product Errata RHBA-2018:3614 0 None None None 2018-11-13 23:34:31 UTC

Description David Hill 2018-07-16 19:28:54 UTC
Description of problem:
neutron-dist.conf is conflicting with neutron.conf when disabling notifications

Here is a quick reproducer:

# python
args='/usr/bin/python2 /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/share/neutron/server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-server --log-file /var/log/neutron/server.log'.split(' ')
from oslo_config import cfg
from neutron.common import config
from neutron.common import rpc as n_rpc
config.init(args[2:])

for k, v in cfg.CONF.oslo_messaging_notifications.iteritems(): print k, v
transport_url None
topics ['notifications']
driver ['neutron.openstack.common.notifier.rpc_notifier', 'noop']    

The problem is originating in /usr/share/neutron/neutron-dist.conf and commenting the notification_driver solves the problem:

[DEFAULT]
verbose = True
lock_path = $state_path/lock
#notification_driver = neutron.openstack.common.notifier.rpc_notifier
allow_overlapping_ips = True
use_stderr = False
api_paste_config = /usr/share/neutron/api-paste.ini

[agent]
root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf
root_helper_daemon = sudo neutron-rootwrap-daemon /etc/neutron/rootwrap.conf


and running it again:
transport_url None
topics ['notifications']
driver ['noop']

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Assaf Muller 2018-07-17 16:29:48 UTC
*** Bug 1318512 has been marked as a duplicate of this bug. ***

Comment 2 Nate Johnston 2018-07-17 16:38:06 UTC
RDO changes to remove the messaging section for neutron-dist.conf are in review.  

https://review.rdoproject.org/r/#/q/topic:bz1318512

Comment 4 Michele Baldessari 2018-07-23 13:23:34 UTC
*** Bug 1563389 has been marked as a duplicate of this bug. ***

Comment 6 Nate Johnston 2018-08-13 19:43:11 UTC
Change has merged in RDO upstream so setting to POST

Comment 10 Lon Hohberger 2018-09-18 10:36:34 UTC
According to our records, this should be resolved by openstack-neutron-12.0.3-5.el7ost.  This build is available now.

Comment 11 Federico Ressi 2018-11-12 15:14:22 UTC
After logging into controller-0 node and entering into neutron server container I executed below python test case and I didn't got any error. Should I check in other nodes or containers?

--- Commands executed from heat container ---

CONTAINER_ID=$(sudo docker ps | awk '($2 ~ /openstack-neutron-server/){print $1}')
sudo docker cp bug_1601593.py ${CONTAINER_ID}:bug_1601593.py 
sudo docker exec -ti ${CONTAINER_ID} python bug_1601593.py 

--- Output ---
['messagingv2']
.
----------------------------------------------------------------------
Ran 1 test in 0.118s

OK

--- content of file bug_1601593.py ---

!/usr/bin/env python

import unittest
from oslo_config import cfg
from neutron.common import config
from neutron.common import rpc as n_rpc


CONF = cfg.CONF


class TestBug1601593(unittest.TestCase):

    def test_config_files(self):
	# Given
        args = ['/usr/bin/python2', '/usr/bin/neutron-server',
		'--config-file', '/usr/share/neutron/neutron-dist.conf',
		'--config-dir', '/usr/share/neutron/server',
		'--config-file', '/etc/neutron/neutron.conf',
		'--config-file', '/etc/neutron/plugin.ini',
		'--config-dir', '/etc/neutron/conf.d/common',
		'--config-dir', '/etc/neutron/conf.d/neutron-server',
		'--log-file', '/var/log/neutron/server.log']
  
	# When
    	config.init(args[2:])

        print(CONF.oslo_messaging_notifications['driver'])

	# Then
	self.assertNotIn('neutron.openstack.common.notifier.rpc_notifier',
			 CONF.oslo_messaging_notifications['driver'])


if __name__ == '__main__':
     unittest.main()

Comment 12 Nate Johnston 2018-11-12 17:34:09 UTC
The neutron server container is the only one that needs to be tested.  This looks good to me. :-)

Comment 13 Bernard Cafarelli 2018-11-13 00:42:45 UTC
Another bug verified then!

Comment 15 errata-xmlrpc 2018-11-13 23:32:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3614


Note You need to log in before you can comment on or make changes to this bug.