Bug 1022725 - neutron-server is dead after enablement of the haproxy service provider in neutron.conf
neutron-server is dead after enablement of the haproxy service provider in ne...
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron (Show other bugs)
4.0
Unspecified Unspecified
low Severity high
: z2
: 5.0 (RHEL 6)
Assigned To: Ihar Hrachyshka
Roey Dekel
: ZStream
Depends On:
Blocks: 1154145 1202615
  Show dependency treegraph
 
Reported: 2013-10-23 16:57 EDT by Rami Vaknin
Modified: 2016-04-26 13:35 EDT (History)
11 users (show)

See Also:
Fixed In Version: openstack-neutron-2014.1.2-13.el6ost openstack-neutron-2014.1.2-11.el7ost
Doc Type: Bug Fix
Doc Text:
Cause: neutron-dist.conf file that sets default configuration values for Neutron contained service_provider setting for haproxy based load balancer plugin. Consequence: This made it impossible to disable the service by modifying neutron.conf. It also made Neutron fail when an identical configuration setting from neutron.conf was uncommented. Fix: service_providers section was removed from neutron-dist.conf. Result: now service configuration is defined solely by neutron.conf. Note for users who upgrade from previous versions: the following configuration setting should be manually added to /etc/neutron/neutron.conf to keep the load balancer service loaded: [service_providers] service_provider = LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
Story Points: ---
Clone Of:
: 1202615 (view as bug list)
Environment:
Last Closed: 2014-11-03 03:37:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rami Vaknin 2013-10-23 16:57:38 EDT
Version
=======
rhos 4.0 on rhel 6.5, puddle 2013-10-15.1, openstack-neutron-2013.2-0.12.rc1.el6ost


Description
===========
Uncommenting the following haproxy load-balancer service_provider in /etc/neutron/neutron.conf (done according to the commented-out instructions in neutron.conf itself) causes an exception and neutron-server service becomes dead after its restart.

"service_provider = LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default"

The reason is a duplicate service_provider, which caused by a service_provider defined in /usr/share/neutron/neutron-dist.conf:

# grep provider /usr/share/neutron/neutron-dist.conf
[service_providers]
service_provider = LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default 


The exception from the log file
===============================
2013-10-23 17:12:44.078 6668 ERROR neutron.services.provider_configuration [-] Driver neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver is no
t unique across providers
2013-10-23 17:12:44.078 6668 TRACE neutron.services.provider_configuration None
2013-10-23 17:12:44.078 6668 TRACE neutron.services.provider_configuration 
2013-10-23 17:12:44.079 6668 ERROR neutron.service [-] In serve_wsgi()
2013-10-23 17:12:44.079 6668 TRACE neutron.service Traceback (most recent call last):
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/service.py", line 96, in serve_wsgi
2013-10-23 17:12:44.079 6668 TRACE neutron.service     service.start()
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/service.py", line 65, in start
2013-10-23 17:12:44.079 6668 TRACE neutron.service     self.wsgi_app = _run_wsgi(self.app_name)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/service.py", line 109, in _run_wsgi
2013-10-23 17:12:44.079 6668 TRACE neutron.service     app = config.load_paste_app(app_name)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/common/config.py", line 144, in load_paste_app
2013-10-23 17:12:44.079 6668 TRACE neutron.service     app = deploy.loadapp("config:%s" % config_path, name=app_name)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 247, in loadapp
2013-10-23 17:12:44.079 6668 TRACE neutron.service     return loadobj(APP, uri, name=name, **kw)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 272, in loadobj
2013-10-23 17:12:44.079 6668 TRACE neutron.service     return context.create()
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 710, in create
2013-10-23 17:12:44.079 6668 TRACE neutron.service     return self.object_type.invoke(self)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 144, in invoke
2013-10-23 17:12:44.079 6668 TRACE neutron.service     **context.local_conf)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/util.py", line 56, in fix_call
2013-10-23 17:12:44.079 6668 TRACE neutron.service     val = callable(*args, **kw)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/paste/urlmap.py", line 25, in urlmap_factory
2013-10-23 17:12:44.079 6668 TRACE neutron.service     app = loader.get_app(app_name, global_conf=global_conf)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 350, in get_app
2013-10-23 17:12:44.079 6668 TRACE neutron.service     name=name, global_conf=global_conf).create()
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 710, in create
2013-10-23 17:12:44.079 6668 TRACE neutron.service     return self.object_type.invoke(self)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 144, in invoke
2013-10-23 17:12:44.079 6668 TRACE neutron.service     **context.local_conf)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/util.py", line 56, in fix_call
2013-10-23 17:12:44.079 6668 TRACE neutron.service     val = callable(*args, **kw)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/auth.py", line 59, in pipeline_factory
2013-10-23 17:12:44.079 6668 TRACE neutron.service     app = loader.get_app(pipeline[-1])
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 350, in get_app
2013-10-23 17:12:44.079 6668 TRACE neutron.service     name=name, global_conf=global_conf).create()
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 710, in create
2013-10-23 17:12:44.079 6668 TRACE neutron.service     return self.object_type.invoke(self)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 146, in invoke
2013-10-23 17:12:44.079 6668 TRACE neutron.service     return fix_call(context.object, context.global_conf, **context.local_conf)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/util.py", line 56, in fix_call
2013-10-23 17:12:44.079 6668 TRACE neutron.service     val = callable(*args, **kw)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/api/v2/router.py", line 72, in factory
2013-10-23 17:12:44.079 6668 TRACE neutron.service     return cls(**local_config)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/api/v2/router.py", line 76, in __init__
2013-10-23 17:12:44.079 6668 TRACE neutron.service     plugin = manager.NeutronManager.get_plugin()
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/manager.py", line 206, in get_plugin
2013-10-23 17:12:44.079 6668 TRACE neutron.service     return cls.get_instance().plugin
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/manager.py", line 201, in get_instance
2013-10-23 17:12:44.079 6668 TRACE neutron.service     cls._create_instance()
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/openstack/common/lockutils.py", line 247, in inner
2013-10-23 17:12:44.079 6668 TRACE neutron.service     retval = f(*args, **kwargs)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/manager.py", line 195, in _create_instance
2013-10-23 17:12:44.079 6668 TRACE neutron.service     cls._instance = cls()
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/manager.py", line 132, in __init__
2013-10-23 17:12:44.079 6668 TRACE neutron.service     self._load_service_plugins()
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/manager.py", line 168, in _load_service_plugins
2013-10-23 17:12:44.079 6668 TRACE neutron.service     plugin_inst = plugin_class()
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/services/loadbalancer/plugin.py", line 54, in __init__
2013-10-23 17:12:44.079 6668 TRACE neutron.service     self.service_type_manager = st_db.ServiceTypeManager.get_instance()
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/db/servicetype_db.py", line 47, in get_instance
2013-10-23 17:12:44.079 6668 TRACE neutron.service     cls._instance = cls()
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/db/servicetype_db.py", line 52, in __init__
2013-10-23 17:12:44.079 6668 TRACE neutron.service     self._load_conf()
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/db/servicetype_db.py", line 60, in _load_conf
2013-10-23 17:12:44.079 6668 TRACE neutron.service     pconf.parse_service_provider_opt())
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/services/provider_configuration.py", line 101, in __init__
2013-10-23 17:12:44.079 6668 TRACE neutron.service     self.add_provider(prov)
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/services/provider_configuration.py", line 122, in add_provider
2013-10-23 17:12:44.079 6668 TRACE neutron.service     self._ensure_driver_unique(provider['driver'])
2013-10-23 17:12:44.079 6668 TRACE neutron.service   File "/usr/lib/python2.6/site-packages/neutron/services/provider_configuration.py", line 109, in _ensure_driver_unique
2013-10-23 17:12:44.079 6668 TRACE neutron.service     raise n_exc.Invalid(msg)
2013-10-23 17:12:44.079 6668 TRACE neutron.service Invalid: Driver neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver is not unique across providers
2013-10-23 17:12:44.079 6668 TRACE neutron.service 
2013-10-23 17:12:44.082 6668 CRITICAL neutron [-] Driver neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver is not unique across providers
2013-10-23 17:12:44.082 6668 TRACE neutron Traceback (most recent call last):
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/bin/neutron-server", line 10, in <module>
2013-10-23 17:12:44.082 6668 TRACE neutron     sys.exit(main())
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/server/__init__.py", line 43, in main
2013-10-23 17:12:44.082 6668 TRACE neutron     neutron_service = service.serve_wsgi(service.NeutronApiService)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/service.py", line 96, in serve_wsgi
2013-10-23 17:12:44.082 6668 TRACE neutron     service.start()
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/service.py", line 65, in start
2013-10-23 17:12:44.082 6668 TRACE neutron     self.wsgi_app = _run_wsgi(self.app_name)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/service.py", line 109, in _run_wsgi
2013-10-23 17:12:44.082 6668 TRACE neutron     app = config.load_paste_app(app_name)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/common/config.py", line 144, in load_paste_app
2013-10-23 17:12:44.082 6668 TRACE neutron     app = deploy.loadapp("config:%s" % config_path, name=app_name)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 247, in loadapp
2013-10-23 17:12:44.082 6668 TRACE neutron     return loadobj(APP, uri, name=name, **kw)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 272, in loadobj
2013-10-23 17:12:44.082 6668 TRACE neutron     return context.create()
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 710, in create
2013-10-23 17:12:44.082 6668 TRACE neutron     return self.object_type.invoke(self)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 144, in invoke
2013-10-23 17:12:44.082 6668 TRACE neutron     **context.local_conf)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/util.py", line 56, in fix_call
2013-10-23 17:12:44.082 6668 TRACE neutron     val = callable(*args, **kw)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/paste/urlmap.py", line 25, in urlmap_factory
2013-10-23 17:12:44.082 6668 TRACE neutron     app = loader.get_app(app_name, global_conf=global_conf)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 350, in get_app
2013-10-23 17:12:44.082 6668 TRACE neutron     name=name, global_conf=global_conf).create()
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 710, in create
2013-10-23 17:12:44.082 6668 TRACE neutron     return self.object_type.invoke(self)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 144, in invoke
2013-10-23 17:12:44.082 6668 TRACE neutron     **context.local_conf)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/util.py", line 56, in fix_call
2013-10-23 17:12:44.082 6668 TRACE neutron     val = callable(*args, **kw)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/auth.py", line 59, in pipeline_factory
2013-10-23 17:12:44.082 6668 TRACE neutron     app = loader.get_app(pipeline[-1])
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 350, in get_app
2013-10-23 17:12:44.082 6668 TRACE neutron     name=name, global_conf=global_conf).create()
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 710, in create
2013-10-23 17:12:44.082 6668 TRACE neutron     return self.object_type.invoke(self)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 146, in invoke
2013-10-23 17:12:44.082 6668 TRACE neutron     return fix_call(context.object, context.global_conf, **context.local_conf)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/util.py", line 56, in fix_call
2013-10-23 17:12:44.082 6668 TRACE neutron     val = callable(*args, **kw)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/api/v2/router.py", line 72, in factory
2013-10-23 17:12:44.082 6668 TRACE neutron     return cls(**local_config)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/api/v2/router.py", line 76, in __init__
2013-10-23 17:12:44.082 6668 TRACE neutron     plugin = manager.NeutronManager.get_plugin()
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/manager.py", line 206, in get_plugin
2013-10-23 17:12:44.082 6668 TRACE neutron     return cls.get_instance().plugin
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/manager.py", line 201, in get_instance
2013-10-23 17:12:44.082 6668 TRACE neutron     cls._create_instance()
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/openstack/common/lockutils.py", line 247, in inner
2013-10-23 17:12:44.082 6668 TRACE neutron     retval = f(*args, **kwargs)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/manager.py", line 195, in _create_instance
2013-10-23 17:12:44.082 6668 TRACE neutron     cls._instance = cls()
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/manager.py", line 132, in __init__
2013-10-23 17:12:44.082 6668 TRACE neutron     self._load_service_plugins()
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/manager.py", line 168, in _load_service_plugins
2013-10-23 17:12:44.082 6668 TRACE neutron     plugin_inst = plugin_class()
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/services/loadbalancer/plugin.py", line 54, in __init__
2013-10-23 17:12:44.082 6668 TRACE neutron     self.service_type_manager = st_db.ServiceTypeManager.get_instance()
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/db/servicetype_db.py", line 47, in get_instance
2013-10-23 17:12:44.082 6668 TRACE neutron     cls._instance = cls()
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/db/servicetype_db.py", line 52, in __init__
2013-10-23 17:12:44.082 6668 TRACE neutron     self._load_conf()
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/db/servicetype_db.py", line 60, in _load_conf
2013-10-23 17:12:44.082 6668 TRACE neutron     pconf.parse_service_provider_opt())
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/services/provider_configuration.py", line 101, in __init__
2013-10-23 17:12:44.082 6668 TRACE neutron     self.add_provider(prov)
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/services/provider_configuration.py", line 122, in add_provider
2013-10-23 17:12:44.082 6668 TRACE neutron     self._ensure_driver_unique(provider['driver'])
2013-10-23 17:12:44.082 6668 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/services/provider_configuration.py", line 109, in _ensure_driver_unique
2013-10-23 17:12:44.082 6668 TRACE neutron     raise n_exc.Invalid(msg)
2013-10-23 17:12:44.082 6668 TRACE neutron Invalid: Driver neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver is not unique across providers
2013-10-23 17:12:44.082 6668 TRACE neutron
Comment 1 Rami Vaknin 2013-10-23 17:47:27 EDT
Removing the Blocker as workaround exists - remove the extra configuration from /usr/share/neutron/neutron-dist.conf.
Comment 2 Ryan O'Hara 2013-11-05 14:57:40 EST
I think the problem might be that you can define multiple service_providers, so there isn't a way to override this parameter. Instead we get an exception because the service_provider is defined twice (in neutron.conf and neutron-dist.conf), and it is not unique.

Perhaps service_provider should be removed from neutron-dist.conf?
Comment 3 Pádraig Brady 2013-11-11 13:20:32 EST
Ouch so service_provider is a MultiStrOpt

I suppose that only multiple names for such options should only be honored from a single file?

MultiStrOpt are horrible for many reasons and there
was talk about dropping support for them,
though there are quite a few of these options now :(

http://lists.openstack.org/pipermail/openstack-dev/2013-August/thread.html#14378
Comment 4 Ryan O'Hara 2013-11-11 15:51:58 EST
(In reply to Pádraig Brady from comment #3)
> Ouch so service_provider is a MultiStrOpt

Yes.

> I suppose that only multiple names for such options should only be honored
> from a single file?

I don't think this is the case. It seems plausible that you could have multiple names in separate files, but they must still be unique. I think the most sane solution at this point is to have duplicate values be ignored and log a warning. In other words, I don't think this should be fatal.

As it stands now, the service_provider entry in /etc/neutron/neutron.conf is commented out. The service_provider entry in /usr/share/neutron/neutron.conf is *not* commented out. There is no problem unless a user uncomments the entry in /etc/neutron/neutron.conf.

> MultiStrOpt are horrible for many reasons and there
> was talk about dropping support for them,
> though there are quite a few of these options now :(
> 
> http://lists.openstack.org/pipermail/openstack-dev/2013-August/thread.
> html#14378
Comment 5 lpeer 2013-11-17 07:21:05 EST
per comment 4 I'm lowering the priority of this bug.
There is an issue only if the user uncomment the 'service_provider' entry in /etc/neutron/neutron.conf and does not make sure it has a unique value.

I think the suggestion above to ignore duplicate values instead of crashing makes sense.
Comment 6 lpeer 2013-11-19 14:03:00 EST
The problem was caused because the provider was manually edited by the user and had a duplicate value.

A long term solution would be to remove the service_provider from the neutron-dist.conf as there is no way to override the value with an empty value, for example, in addition we need to add support for configuring it in the puppet module.
Comment 8 Miguel Angel Ajo 2014-06-02 09:36:00 EDT
Doesn't look like a blocker, as the solution is not to enable this setting. 


I'd propose to remove this example line from the /etc/neutron.conf examples as it's already provided in the dist file, and may be setting a warning not to enable the service_providers already configured in the dist file to avoid duplication.

Other option would be to remove it from the dist file, and set it into /etc/neutron by default, but that would break existing installations, so this is not a good option.
Comment 10 Chris Ricker 2014-09-10 12:51:06 EDT
We're hitting this in our env also

Preferred solution would be to drop from the dist file as (a) we need to be able to configure this and (b) config should be in /etc not in /usr
Comment 11 Ryan O'Hara 2014-09-10 15:37:39 EDT
(In reply to Chris Ricker from comment #10)
> We're hitting this in our env also
> 
> Preferred solution would be to drop from the dist file as (a) we need to be
> able to configure this and (b) config should be in /etc not in /usr

I agree. I made the argument that we should drop the dist file entirely, but nothing came of it. That was a while ago and I don't recall the reason.

Note to packstack developers, if we drop the dist file (or the service_provider in the dist file), the LBaaS deployment code will need tweaked because we currently assume that the service_provider is set in the dist file so we intentionally do not set it up neutron.conf.
Comment 12 Chris Ricker 2014-09-11 08:38:38 EDT
Agreed with Comment 11 -- this is really a generic design issue and also affects the other OpenStack packages that follow the "first read /usr/share/$service/* then read /etc/$service/*" model of configuration file location

We're doing uglyish puppetry to shoot all the /usr/share/$service stuff in the head as a workaround
Comment 13 Pádraig Brady 2014-09-11 10:03:11 EDT
The /usr/share/$service dist config is a sound idea I think as it separates distribution level settings from general settings users need to care about.  We just have to be careful in the  packages to ensure that the /etc/$service/* files have been adjusted at install time so that the commented values reflect the dist values.  This is the case for most packages.  We also need to be careful of the particular config items we place in dist config so that they can be overridden by only editing the /etc/$service/* files, which is the particular problem in this case.
Comment 14 Ihar Hrachyshka 2014-09-30 10:59:45 EDT
It's not because the option is MultiStrOpt. The traceback comes from Neutron itself (the validation is applied in neutron/services/provider_configuration.py).

The proper solution for this is to remove service_providers from neutron-dist.conf and allow deployers (and deployment tools) to set it however they like. This requires puppet work though, so we need to synchronize on this with Packstack team.
Comment 15 Ihar Hrachyshka 2014-09-30 11:01:08 EDT
If we're going to remove service_providers from neutron-dist.conf in RHOSP5, we'll need to mention the need to update neutron.conf in release notes for the release that will include the fix.
Comment 17 Ihar Hrachyshka 2014-09-30 11:37:53 EDT
Livnat, are we going to fix this in RHOSP5? Or just Juno? Whichever upgrade is going to happen (RHOSP5 A-N -> RHOSP5 A-N+1 or RHOSP5 -> RHOSP6), we'll need to mention in release notes that existing users should manually update their neutron.conf with the value of service_provider for load-balancer that will be missing in neutron-dist.conf.
Comment 19 Ryan O'Hara 2014-10-03 12:46:07 EDT
Packstack must be updated such that it will set service_provider with LBaaS is configured, else this will cause a regression in packstack. I mentioned this previously in comment #11.
Comment 20 Ihar Hrachyshka 2014-10-03 14:01:08 EDT
@Ryan, for new installations it's not needed since load balancer service_provider will be uncommented in neutron.conf. The issue is for users who upgrade only. Packstack is not used to maintain configuration, but only initially deploy openstack, so it has nothing to do with upgrades.
Comment 21 Ryan O'Hara 2014-10-03 15:11:11 EDT
(In reply to Ihar Hrachyshka from comment #20)
> @Ryan, for new installations it's not needed since load balancer
> service_provider will be uncommented in neutron.conf. The issue is for users
> who upgrade only. Packstack is not used to maintain configuration, but only
> initially deploy openstack, so it has nothing to do with upgrades.

OK, perfect. I was unaware that service_provider will be uncommented in neutron.conf.
Comment 23 Roey Dekel 2014-10-26 07:33:20 EDT
Verified twice:
1. Icehouse setup
2. Upgraded Havana -> Icehouse setup

Version-Release number of selected component:
---------------------------------------------
Red Hat Enterprise Linux Server release 6.6 (Santiago)
Havana   puddle: 2014-10-15.2
Icehouse puddle: 2014-10-22.1
openstack-neutron-2014.1.3-6.el6ost.noarch

Reproduce Steps:
----------------
for Icehouse setup start at bullet 5
for Havana setup start at the beginning
1. Uncomment the next line under /etc/neutron/neutron.conf:
    [service_providers]
    service_provider = LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
2. Restart neutron-server service
3. Verify that neutron-server is active
4. Upgrade to Icehouse
5. Verify the next line under /etc/neutron/neutron.conf:
    [service_providers]
    service_provider = LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
    (the line appeared successfully as expected)
6. Restart neutron-server service
7. Verify that neutron-server is active

Result:
-------
neutron-server was active for both cases
Comment 25 errata-xmlrpc 2014-11-03 03:37:40 EST
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://rhn.redhat.com/errata/RHSA-2014-1786.html

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