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.

> -----Original Message-----
> From: boun...@canonical.com [mailto:boun...@canonical.com] On Behalf Of
> Christian Berendt
> Sent: Tuesday, March 27, 2012 2:53 AM
> To: Sumit Naiksatam (snaiksat)
> Subject: [Bug 966079] [NEW]
> starting"plugins/linuxbridge/agent/linuxbridge_quantum_agent.py"failed:
> no such table: vlan_bindings
> 
> Public bug reported:
> 
> 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")
> 
> ** Affects: quantum
>      Importance: Undecided
>          Status: New
> 
> --
> You received this bug notification because you are a member of Netstack
> Core Developers, which is subscribed to quantum.
> https://bugs.launchpad.net/bugs/966079
> 
> Title:
>   starting "plugins/linuxbridge/agent/linuxbridge_quantum_agent.py"
>   failed: no such table: vlan_bindings
> 
> Status in OpenStack Quantum (virtual network service):
>   New
> 
> 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")
> 
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/quantum/+bug/966079/+subscriptions
-- 
Mailing list: https://launchpad.net/~netstack
Post to     : netstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~netstack
More help   : https://help.launchpad.net/ListHelp

Reply via email to