Quantum connect error message when running devstack script

Asked by Matt McClean

I am getting this error message when running the devstack installation script with the Quantum service activated. I am running the script on a virtual machine running host OS Ubuntu 11.10 (Oneric) 64-bit.

My localrc parameters are the following:

ADMIN_PASSWORD=password
MYSQL_PASSWORD=password
RABBIT_PASSWORD=password
SERVICE_TOKEN=tokentoken
FLAT_INTERFACE=br100
ENABLED_SERVICES=g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,horizon,mysql,rabbit,openstackx,q-svc,q-agt,quantum

The tail log messages from the console output when running the stack.sh script are the following:

DKMS: install Completed.
Setting up openvswitch-switch (1.2.0-1ubuntu3) ...
 * Inserting openvswitch module
 * /etc/openvswitch/conf.db does not exist
 * Creating empty database /etc/openvswitch/conf.db
 * Starting ovsdb-server
 * Configuring Open vSwitch system IDs
 * Starting ovs-vswitchd
 * Enabling gre with iptables
+ [[ openvswitch = \o\p\e\n\v\s\w\i\t\c\h ]]
+ [[ g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,horizon,mysql,rabbit,openstackx,q-svc,q-agt,quantum =~ mysql ]]
+ mysql -uroot -ppassword -e 'CREATE DATABASE IF NOT EXISTS ovs_quantum;'
+ QUANTUM_PLUGIN_INI_FILE=/opt/stack/quantum/quantum/plugins.ini
+ sed -i -e 's/^provider =.*$/provider = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPlugin/g' /opt/stack/quantum/quantum/plugins.ini
+ screen_it q-svc 'cd /opt/stack/quantum && export PYTHONPATH=.:; python /opt/stack/quantum/bin/quantum /opt/stack/quantum/etc/quantum.conf'
++ echo -ne '\015'
+ NL=$'\r'
+ [[ g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,horizon,mysql,rabbit,openstackx,q-svc,q-agt,quantum =~ q-svc ]]
+ [[ '' =~ yes ]]
+ screen -S stack -X screen -t q-svc
+ sleep 1
+ screen -S stack -p q-svc -X stuff 'cd /opt/stack/quantum && export PYTHONPATH=':; python /opt/stack/quantum/bin/quantum /opt/stack/quantum/etc/quantum.conf
+ [[ g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,horizon,mysql,rabbit,openstackx,q-svc,q-agt,quantum =~ q-agt ]]
+ [[ openvswitch = \o\p\e\n\v\s\w\i\t\c\h ]]
+ OVS_BRIDGE=br-int
+ sudo ovs-vsctl --no-wait -- --if-exists del-br br-int
+ sudo ovs-vsctl --no-wait add-br br-int
+ sudo ovs-vsctl --no-wait br-set-external-id br-int bridge-id br-int
+ screen_it q-agt 'sleep 4; sudo python /opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py /opt/stack/quantum/quantum/plugins/openvswitch/ovs_quantum_plugin.ini -v'
++ echo -ne '\015'
+ NL=$'\r'
+ [[ g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,horizon,mysql,rabbit,openstackx,q-svc,q-agt,quantum =~ q-agt ]]
+ [[ '' =~ yes ]]
+ screen -S stack -X screen -t q-agt
+ sleep 1
+ screen -S stack -p q-agt -X stuff 'sleep 4; sudo python /opt/stack/quantum/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py /opt/stack/quantum/quantum/p'ugins/openvswitch/ovs_quantum_plugin.ini -v
+ [[ g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,horizon,mysql,rabbit,openstackx,q-svc,q-agt,quantum =~ mysql ]]
+ /opt/stack/nova/bin/nova-manage network create private 10.0.0.0/24 1 256
2011-11-22 12:35:14,955 DEBUG nova.network.quantum.quantum_connection [78f52481-901a-48d3-be1f-f00ca57eb3f8 None None] Quantum Client Request:
POST /v1.0/tenants/default/networks.json
 from (pid=21086) do_request /opt/stack/nova/nova/network/quantum/client.py:176
2011-11-22 12:35:14,956 DEBUG nova.network.quantum.quantum_connection [78f52481-901a-48d3-be1f-f00ca57eb3f8 None None] {"network": {"name": "private"}} from (pid=21086) do_request /opt/stack/nova/nova/network/quantum/client.py:178
2011-11-22 12:35:14,958 CRITICAL nova [78f52481-901a-48d3-be1f-f00ca57eb3f8 None None] Unable to connect to server. Got error: [Errno 111] ECONNREFUSED
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/opt/stack/nova/bin/nova-manage", line 2141, in <module>
(nova): TRACE: main()
(nova): TRACE: File "/opt/stack/nova/bin/nova-manage", line 2129, in main
(nova): TRACE: fn(*fn_args, **fn_kwargs)
(nova): TRACE: File "/opt/stack/nova/bin/nova-manage", line 821, in create
(nova): TRACE: uuid=uuid)
(nova): TRACE: File "/opt/stack/nova/nova/network/quantum/manager.py", line 96, in create_networks
(nova): TRACE: quantum_net_id = self.q_conn.create_network(q_tenant_id, label)
(nova): TRACE: File "/opt/stack/nova/nova/network/quantum/quantum_connection.py", line 60, in create_network
(nova): TRACE: resdict = self.client.create_network(data, tenant=tenant_id)
(nova): TRACE: File "/opt/stack/nova/nova/network/quantum/client.py", line 81, in with_params
(nova): TRACE: ret = self.func(instance, *args)
(nova): TRACE: File "/opt/stack/nova/nova/network/quantum/client.py", line 250, in create_network
(nova): TRACE: return self.do_request("POST", self.networks_path, body=body)
(nova): TRACE: File "/opt/stack/nova/nova/network/quantum/client.py", line 206, in do_request
(nova): TRACE: "server. Got error: %s" % e))
(nova): TRACE: QuantumIOException: Unable to connect to server. Got error: [Errno 111] ECONNREFUSED
(nova): TRACE:
Command failed, please check log for more info
++ failed
++ local r=1
++ set +o xtrace
stack.sh failed: full log in /home/vagrant/devstack/stack.sh.11076.log
+ for ret in '"${PIPESTATUS[@]}"'
+ '[' 1 -eq 0 ']'
+ exit 1

Question information

Language:
English Edit question
Status:
Solved
For:
neutron Edit question
Assignee:
Brad Hall Edit question
Solved by:
Matt McClean
Solved:
Last query:
Last reply:
Revision history for this message
dan wendlandt (danwent) said :
#1

This could just be a race in that we're trying to create a client connection to the quantum server.

Maybe try adding a "sleep 3" line after the following line:

screen_it q-svc "cd $QUANTUM_DIR && export PYTHONPATH=.:$PYTHONPATH; python $QUANTUM_DIR/bin/quantum $QUANTUM_DIR/etc/quantum.conf"

This will give a little more time for quantum to start up before the client tries to start talking to it.

Revision history for this message
Brad Hall (bgh) said :
#2

Also, Matt, do you have any logs from Quantum? Might be some useful information there.

Revision history for this message
Matt McClean (matt-mcclean) said :
#3

The sleep line did not work unfortunately but I believe I found the error.

The command that is failing is below and the problems seems to be that there is no quantum service running

opt/stack/nova/bin/nova-manage network create private 10.0.0.0/24 1 256

I tried to startup the Quantum service and got a MySQL error message saying that it could not connect to the database as the password was incorrect. I then looked at the ovs plugin conf file and saw that the database password is hard-coded to "nova" where I had set a different password in my stack.sh script to "password"

I will fork the devstack project in Github and make the necessary modifications

Another thing that also happens is that the openvswitch depends on the linux-headers package existing when it installs which is not there by default.

Another strange behaviour is that there is always an error when installing the python package prettytable the first time. When I run the script ./stack.sh a second time it runs fine

Revision history for this message
Matt McClean (matt-mcclean) said :
#4

I have forked the devstack project and the github repository can be found here <email address hidden>:mattmcclean/devstack.git.

 Just tested and it seems to work fine apart from the prettytable error I keep getting on first install.

Revision history for this message
dan wendlandt (danwent) said :
#5

thanks for finding and fixing that.

Adding debo to the thread, as he ran into this issue yesterday as well.

Revision history for this message
Brad Hall (bgh) said :
#6

Thanks for fixing this -- I looked at the code change and it looks good but the pull request looks confused (it wants to merge 91 commits into devstack/master): https://github.com/cloudbuilders/devstack/pull/227. Maybe you need to rebase first?

Revision history for this message
Matt McClean (matt-mcclean) said :
#7

Really strange as I have only 3 commits submitted being numbers c6d8969, 9ea7d6a, ef90d69
 at the bottom of the pull request. Can others add other commits as I certainly did not put all of them in when I submitted it?

Any ideas how to rebase?

FYI- I am fairly new to GitHub so could have made some sort of mistake

Revision history for this message
Brad Hall (bgh) said :
#8

You might be able to just abandon this pull request and re-issue one and then explicitly select the commits that you want

Revision history for this message
Matt McClean (matt-mcclean) said :
#9

OK, will look into it. If you want to try it out now you can clone the
forked github repository here:
https://github.com/mattmcclean/devstack.git

On Wed, Nov 23, 2011 at 9:55 PM, Brad Hall
<email address hidden> wrote:
> Your question #179620 on quantum changed:
> https://answers.launchpad.net/quantum/+question/179620
>
> Brad Hall posted a new comment:
> You might be able to just abandon this pull request and re-issue one and
> then explicitly select the commits that you want
>
> --
> You received this question notification because you asked the question.
>