Ask Your Question
0

neutron agent-list command not working

asked 2015-12-09 07:49:39 -0500

Pratik Patil gravatar image

updated 2015-12-10 06:59:12 -0500

I am installing OpenStack Kilo on Ubuntu 14.04. When I fired 'neutron agent-list', it shows the below error: Request Failed: internal server error while processing your request.

openswitch-agent.log
15-12-09 18:57:01.732 13981 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent   File "/usr/lib/python2.7/dist-packages/neutron/agent/rpc.py", line 80, in report_state
2015-12-09 18:57:01.732 13981 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent     return method(context, 'report_state', **kwargs)
2015-12-09 18:57:01.732 13981 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/client.py", line 156, in call
2015-12-09 18:57:01.732 13981 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent     retry=self.retry)
2015-12-09 18:57:01.732 13981 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent   File "/usr/lib/python2.7/dist-packages/oslo_messaging/transport.py", line 90, in _send
2015-12-09 18:57:01.732 13981 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent     timeout=timeout, retry=retry)
2015-12-09 18:57:01.732 13981 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent   File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 350, in send
2015-12-09 18:57:01.732 13981 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent     retry=retry)
2015-12-09 18:57:01.732 13981 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent   File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 341, in _send
2015-12-09 18:57:01.732 13981 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent     raise result
2015-12-09 18:57:01.732 13981 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent RemoteError: Remote error: OperationalError (OperationalError) no such column: agents.load u'SELECT agents.id AS agents_id, agents.agent_type AS agents_agent_type, agents.binary AS agents_binary, agents.topic AS agents_topic, agents.host AS agents_host, agents.admin_state_up AS agents_admin_state_up, agents.created_at AS agents_created_at, agents.started_at AS agents_started_at, agents.heartbeat_timestamp AS agents_heartbeat_timestamp, agents.description AS agents_description, agents.configurations AS agents_configurations, agents.load AS agents_load \nFROM agents \nWHERE agents.agent_type = ? AND agents.host = ?' (u'Open vSwitch agent', u'network-node')
2015-12-09 18:57:01.732 13981 TRACE neutron.plugins.openvswitch.agent.ovs_neutron_agent [u'Traceback (most recent call last):\n', u'  File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply\n    executor_callback))\n', u'  File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch\n    executor_callback)\n', u'  File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch\n    result = func(ctxt, **new_args)\n', u'  File "/usr/lib/python2.7/dist-packages/neutron/db/agents_db.py", line 281, in report_state\n    self.plugin.create_or_update_agent(context, agent_state)\n', u'  File "/usr/lib/python2.7/dist-packages/neutron/db/agents_db.py", line 238, in create_or_update_agent\n    return self._create_or_update_agent(context, agent)\n', u'  File "/usr/lib/python2.7/dist-packages/neutron/db/agents_db.py", line 217, in _create_or_update_agent\n    context, agent[\'agent_type\'], agent[\'host\'])\n', u'  File "/usr/lib/python2.7/dist-packages/neutron/db/agents_db.py", line 193, in _get_agent_by_type_and_host\n    Agent.host == host).one()\n', u'  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2395, in one\n ...
(more)
edit retag flag offensive close merge delete

Comments

Br-ex doesn't have entry in /etc/network/interfaces. Why ?
What reports ovs-vsctl show ?

dbaxps gravatar imagedbaxps ( 2015-12-10 01:03:44 -0500 )edit

Run

$ lsmod | grep openvswitch

Add ml2_conf.ini && openvswitch-agent.ini to report

dbaxps gravatar imagedbaxps ( 2015-12-10 01:17:38 -0500 )edit

The command 'ovs-vstl show' display the below output on controller node: fb902971-f956-467b-a404-1b90ffd0b005 ovs_version: "2.3.2"

Pratik Patil gravatar imagePratik Patil ( 2015-12-10 04:05:23 -0500 )edit

The command 'lsmod | grep openvswitch' display the below output on controller node: openvswitch 69940 0 gre 13796 1 openvswitch vxlan 37629 1 openvswitch libcrc32c 12644 2 xfs,openvswitch

Pratik Patil gravatar imagePratik Patil ( 2015-12-10 04:07:17 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-12-11 02:56:33 -0500

Pratik Patil gravatar image

updated 2015-12-11 03:00:02 -0500

Solved the issue by adding a comment for default connection in '/etc/neutron/neutron.conf' file like this, as it was overriding the connection parameter that we specify:

[database]
connection = mysql://neutron:1713@controller-node/neutron
#connection = sqlite:////var/lib/neutron/neutron.sqlite

And then run the below command to populate the db.

/bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron

Thanks..

edit flag offensive delete link more
0

answered 2015-12-10 01:35:12 -0500

Prateek K gravatar image

What I see in the trace-back is this :-

" no such column: agents.load u'SELECT agents.id A....."

if you have access to mysql server login and see the trace-back and see which table it is using. Try to access that table and if its a single table create it and try again. If there are lot of dependencies like foregin key etc... Then you are in trouble :)

If you cannot access mysql server then the best thing is to run the neutron db sync command which will create all the tables again and bring it to normal state. (Please Note that if this is a setup which has some things running then it wont be good as the data might get removed from the database)

As you mentioned you are installing this setup then I suggest go for db sync option as it is the easy one

edit flag offensive delete link more

Comments

I have tried db sync using the below command as a root user on network-node :

'/bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron'

But it shows the Traceback error:

Pratik Patil gravatar imagePratik Patil ( 2015-12-10 04:42:33 -0500 )edit

Can you post the traceback here. Also try this command:- /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head"

Does it help ?

Prateek K gravatar imagePrateek K ( 2015-12-10 05:18:43 -0500 )edit

I have updated the question by adding the output while populating 'neutron' database.

Pratik Patil gravatar imagePratik Patil ( 2015-12-10 07:00:13 -0500 )edit

Thanks for posting it. is your mysql version correct .. In the documentation it asks us for mariaDB ... Also it can be a permission issue. Have you given grants to the neutron user properly.... I am getting to database problem due to the following error :"No support for ALTER of constraints"

Prateek K gravatar imagePrateek K ( 2015-12-10 22:56:02 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-12-09 07:49:39 -0500

Seen: 775 times

Last updated: Dec 11 '15