Quantum Essex milestone-3 server fails to start (config file not found for OVS plugin)

Asked by Max Tkach

Hi Everyone,
We installed Quantum, and after solving the issue we had (which Alejandro mentioned here https://answers.launchpad.net/quantum/+question/186325), we found another problem while executing "quantum-server" with OVSQuantumPlugin:

root@ism16vms:~# quantum-server
2012-01-31 17:35:53 DEBUG [quantum.service] ********************************************************************************
2012-01-31 17:35:53 DEBUG [quantum.service] Configuration options gathered from config file:
2012-01-31 17:35:53 DEBUG [quantum.service] /etc/quantum/quantum.conf
2012-01-31 17:35:53 DEBUG [quantum.service] ================================================
2012-01-31 17:35:53 DEBUG [quantum.service] / quantumversions
2012-01-31 17:35:53 DEBUG [quantum.service] /v1.0 quantumapi_v1_0
2012-01-31 17:35:53 DEBUG [quantum.service] /v1.1 quantumapi_v1_1
2012-01-31 17:35:53 DEBUG [quantum.service] api_extensions_path /
2012-01-31 17:35:53 DEBUG [quantum.service] bind_host 0.0.0.0
2012-01-31 17:35:53 DEBUG [quantum.service] bind_port 9696
2012-01-31 17:35:53 DEBUG [quantum.service] debug True
2012-01-31 17:35:53 DEBUG [quantum.service] verbose True
2012-01-31 17:35:53 DEBUG [quantum.service] ********************************************************************************
2012-01-31 17:35:53 INFO [quantum.service] Using paste.deploy config at: /etc/quantum/quantum.conf
2012-01-31 17:35:53 DEBUG [quantum.manager] Plugin location:quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPlugin
2012-01-31 17:35:53 DEBUG [quantum.manager] Successfully imported Quantum plug-in.All compatibility tests passed
2012-01-31 17:35:53 DEBUG [root] ==> CONFIG_FILE None
Traceback (most recent call last):
  File "/usr/local/bin/quantum-server", line 9, in <module>
    load_entry_point('quantum==2012.1', 'console_scripts', 'quantum-server')()
  File "/usr/local/lib/python2.6/dist-packages/quantum-2012.1-py2.6.egg/quantum/server/__init__.py", line 58, in main
    args=args)
  File "/usr/local/lib/python2.6/dist-packages/quantum-2012.1-py2.6.egg/quantum/service.py", line 98, in serve_wsgi
    service.start()
  File "/usr/local/lib/python2.6/dist-packages/quantum-2012.1-py2.6.egg/quantum/service.py", line 43, in start
    self.wsgi_app = _run_wsgi(self.app_name, self.conf, self.conf_file)
  File "/usr/local/lib/python2.6/dist-packages/quantum-2012.1-py2.6.egg/quantum/service.py", line 107, in _run_wsgi
    None)
  File "/usr/local/lib/python2.6/dist-packages/quantum-2012.1-py2.6.egg/quantum/common/config.py", line 301, in load_paste_app
    app = deploy.loadapp("config:%s" % conf_file, name=app_name)
  File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
    return context.create()
  File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 144, in invoke
    **context.local_conf)
  File "/usr/local/lib/python2.6/dist-packages/paste/deploy/util.py", line 59, in fix_call
    reraise(*exc_info)
  File "/usr/local/lib/python2.6/dist-packages/paste/deploy/compat.py", line 22, in reraise
    exec('raise t, e, tb', dict(t=t, e=e, tb=tb))
  File "/usr/local/lib/python2.6/dist-packages/paste/deploy/util.py", line 56, in fix_call
    val = callable(*args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/paste/urlmap.py", line 25, in urlmap_factory
    app = loader.get_app(app_name, global_conf=global_conf)
  File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 350, in get_app
    name=name, global_conf=global_conf).create()
  File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 203, in invoke
    app = context.app_context.create()
  File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/local/lib/python2.6/dist-packages/paste/deploy/loadwsgi.py", line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/local/lib/python2.6/dist-packages/paste/deploy/util.py", line 59, in fix_call
    reraise(*exc_info)
  File "/usr/local/lib/python2.6/dist-packages/paste/deploy/compat.py", line 22, in reraise
    exec('raise t, e, tb', dict(t=t, e=e, tb=tb))
  File "/usr/local/lib/python2.6/dist-packages/paste/deploy/util.py", line 56, in fix_call
    val = callable(*args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/quantum-2012.1-py2.6.egg/quantum/wsgi.py", line 638, in factory
    return cls()
  File "/usr/local/lib/python2.6/dist-packages/quantum-2012.1-py2.6.egg/quantum/api/__init__.py", line 46, in __init__
    self._setup_routes(mapper, options)
  File "/usr/local/lib/python2.6/dist-packages/quantum-2012.1-py2.6.egg/quantum/api/__init__.py", line 53, in _setup_routes
    self._setup_base_routes(mapper, options, self._version)
  File "/usr/local/lib/python2.6/dist-packages/quantum-2012.1-py2.6.egg/quantum/api/__init__.py", line 60, in _setup_base_routes
    plugin = manager.QuantumManager.get_plugin(options)
  File "/usr/local/lib/python2.6/dist-packages/quantum-2012.1-py2.6.egg/quantum/manager.py", line 87, in get_plugin
    cls._instance = cls(options, config_file)
  File "/usr/local/lib/python2.6/dist-packages/quantum-2012.1-py2.6.egg/quantum/manager.py", line 82, in __init__
    self.plugin = plugin_klass()
  File "/usr/local/lib/python2.6/dist-packages/quantum-2012.1-py2.6.egg/quantum/plugins/openvswitch/ovs_quantum_plugin.py", line 85, in __init__
    if os.path.exists(CONF_FILE):
  File "/usr/lib/python2.6/genericpath.py", line 18, in exists
    st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found

It seems quantum-server isn't able to locate the file "ovs_quantum_plugin.ini".

We put this configuration inside /etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini, and we found out (by chance), that when we executed quantum-server from "/", the daemon started correctly.

This suggest that quantum-server runs only when (from the current working directory) we have the path "etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini", which might not always be the case, and depends on where are we standing.

Is this a bug, or are we missing a flag in a config file?

Question information

Language:
English Edit question
Status:
Solved
For:
neutron Edit question
Assignee:
No assignee Edit question
Solved by:
dan wendlandt
Solved:
Last query:
Last reply:
Revision history for this message
Best dan wendlandt (danwent) said :
#1

Hi Max. This is a bug. We switched up our packaging fairly late (apparently too late) in E-3 and have had a couple snafus on this from with people installing using setup.py .

The following patch to the E-3 tarball should work:

--- a/quantum/plugins/openvswitch/ovs_quantum_plugin.py
+++ b/quantum/plugins/openvswitch/ovs_quantum_plugin.py
@@ -1,5 +1,4 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-# Copyright 2011 Nicira Networks, Inc.
+
 # All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License"); you may
@@ -32,8 +31,7 @@ import quantum.db.api as db
 import ovs_db

 CONF_FILE = find_config_file(
- {"config_file": "etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini"},
- None, "ovs_quantum_plugin.ini")
+ {"plugin": "openvswitch"}, None, "ovs_quantum_plugin.ini")

This works in my testing, but I will wait to get a confirmation from you before submitting this fix to git. Thanks.

Revision history for this message
Max Tkach (maxtkach) said :
#2

Thanks dan wendlandt, that solved my question.

Revision history for this message
Max Tkach (maxtkach) said :
#3

Worked flawlessly! Thanks Dan.
max