starting "plugins/linuxbridge/agent/linuxbridge_quantum_agent.py" failed: no such table: vlan_bindings

Bug #966079 reported by Christian Berendt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Undecided
Sumit Naiksatam

Bug Description

Not sure what's wrong, I Iconfigured the agent like described in README but the database seems to be empty after starting the agent. I can't find a hint how to setup the database for the agent correctly.

# cat /etc/quantum/plugins/linuxbridge/linuxbridge_conf.ini
[VLANS]
vlan_start=1000
vlan_end=3000

[DATABASE]
# Use the following when running the tests for the in-memory DB
connection = sqlite
# Uncomment the following for using the MySQL DB when actually running the plugin,
# also remove the earlier sqlite connection configuration
#connection = mysql
#name = quantum
#user = quantum
#pass = testing
#host = os0001.openstack.b1-systems.de
# If you use a non-default port for the DB, change the following
#port = 3306

[LINUX_BRIDGE]
#this is the interface connected to the switch on your Quantum network
physical_interface = eth0

[AGENT]
#agent's polling interval in seconds
polling_interval = 2
# Change to "sudo quantum-rootwrap" to limit commands that can be run
# as root.
root_helper = sudo

# python /usr/bin/quantum-linuxbridge-agent -v /etc/quantum/plugins/linuxbridge/linuxbridge_conf.ini
INFO:root:Connecting to sqlite DB
INFO:root:Agent initialized successfully, now running...
Traceback (most recent call last):
  File "/usr/bin/quantum-linuxbridge-agent", line 9, in <module>
    load_entry_point('quantum==2012.1', 'console_scripts', 'quantum-linuxbridge-agent')()
  File "/usr/lib64/python2.7/site-packages/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 474, in main
    plugin.daemon_loop(conn)
  File "/usr/lib64/python2.7/site-packages/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 415, in daemon_loop
    old_port_bindings)
  File "/usr/lib64/python2.7/site-packages/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 362, in manage_networks_on_host
    cursor.execute("SELECT * FROM vlan_bindings")
sqlite3.OperationalError: no such table: vlan_bindings

for MySQL it's not working, too (connection to the new MySQL database is working fine):

INFO:root:Connecting to database quantum on os0001.openstack.b1-systems.de
INFO:root:Agent initialized successfully, now running...
Traceback (most recent call last):
  File "/usr/bin/quantum-linuxbridge-agent", line 9, in <module>
    load_entry_point('quantum==2012.1', 'console_scripts', 'quantum-linuxbridge-agent')()
  File "/usr/lib64/python2.7/site-packages/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 474, in main
    plugin.daemon_loop(conn)
  File "/usr/lib64/python2.7/site-packages/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 415, in daemon_loop
    old_port_bindings)
  File "/usr/lib64/python2.7/site-packages/quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py", line 362, in manage_networks_on_host
    cursor.execute("SELECT * FROM vlan_bindings")
  File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1146, "Table 'quantum.vlan_bindings' doesn't exist")

Revision history for this message
Christian Berendt (berendt) wrote :

I'm testing with the Essex-RC1.

Revision history for this message
Sumit Naiksatam (snaiksat) wrote :

Hi Christian,

The in-memory database should be used only for running the tests.

As for the MySQL DB conf, I am guessing that you might have not created the quantum DB, or the right privileges are not being set on the tables. I am paraphrasing the following from the README file; if you follow these steps, I think this error will go away (note the database name suggested here is quantum_linux_bridge, and if you do use that name, make sure that you have the same name in the agent's conf file; both, the Quantum service and the agent have to refer to the same DB):

# -- Database config.

(Note: The plugin ships with a default SQLite in-memory database configuration,
 and can be used to run tests without performing the suggested DB config below.)

The Linux Bridge quantum plugin requires access to a mysql database in order
to store configuration and mappings that will be used by the agent. Here is
how to set up the database on the host that you will be running the quantum
service on.

MySQL should be installed on the host, and all plugins and clients
must be configured with access to the database.

To prep mysql, run:

$ mysql -u root -p -e "create database quantum_linux_bridge"

# log in to mysql service
$ mysql -u root -p
# The Linux Bridge Quantum agent running on each compute node must be able to
# make a mysql connection back to the main database server.
mysql> GRANT USAGE ON *.* to root@'yourremotehost' IDENTIFIED BY 'newpassword';
# force update of authorization changes
mysql> FLUSH PRIVILEGES;

(Note: If the remote connection fails to MySQL, you might need to add the IP address,
 and/or fully-qualified hostname, and/or unqualified hostname in the above GRANT sql
 command. Also, you might need to specify "ALL" instead of "USAGE".)

Thanks,
~Sumit.

Changed in quantum:
assignee: nobody → Sumit Naiksatam (snaiksat)
Revision history for this message
Christian Berendt (berendt) wrote :

Hi Sumit.

I created the database "quantum" and the login is possible from the quantum system and added this to the configuration. I thought the the plugins will use the same database.

connection = mysql
name = quantum
user = quantum
pass = testing
host = os0001.openstack.b1-systems.de
port = 3306

I'll try it now by creating a new database "quantum_linux_bridge" using the credentials from above.

Revision history for this message
Shweta P (shweta-ap05) wrote :

Hey Chritian,

Just a quick check, in your q-svc logs do you see the Fake plugin to have been loaded instead of the Linuxbridge Plugin?. Becuase the tables should be created within the quantum db when the Linuxbridge plugin is loaded.

I am wondering if the reason is because the correct plugins are not getting loaded because of these bugs

https://bugs.launchpad.net/quantum/+bug/965202
https://bugs.launchpad.net/devstack/+bug/965199

Revision history for this message
Christian Berendt (berendt) wrote :

Something went wrong during my setup or so. Table are now initialize without problems.

Changed in quantum:
status: New → 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.