Some configurations on the compute node is not right in a multinode devstack setup

Bug #1167668 reported by Senhua Huang
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Low
Tal Kain

Bug Description

I setup a two node devstack environment. On the controller node, the localrc is as below:
RECLONE=yes
disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service quantum
enable_service tempest
FLOATING_RANGE=192.168.3.0/23
FIXED_RANGE=10.4.128.0/24
FIXED_NETWORK_SIZE=256
FLAT_INTERFACE=eth0
ADMIN_PASSWORD=secret
MYSQL_PASSWORD=secret
RABBIT_PASSWORD=secret
SERVICE_PASSWORD=secret
SERVICE_TOKEN=secret
HOST_IP=192.168.3.2
MULTI_HOST=True
LOGFILE=/opt/stack/logs

The localrc at another compute node is as below:
RECLONE=yes
HOST_IP=192.168.3.8
FLAT_INTERFACE=eth0
FIXED_RANGE=10.4.128.0/24
FIXED_NETWORK_SIZE=256
FLOATING_RANGE=192.168.3.0/23
MULTI_HOST=1
ADMIN_PASSWORD=secret
MYSQL_PASSWORD=secret
RABBIT_PASSWORD=secret
SERVICE_PASSWORD=secret
SERVICE_TOKEN=secret
MYSQL_HOST=192.168.3.2
RABBIT_HOST=192.168.3.2
Q_HOST=192.168.3.2
GLANCE_HOSTPORT=192.168.3.2:9292
ENABLED_SERVICES=n-cpu,rabbit,quantum,q-agt,c-sch,c-api,c-vol

After I ran $./stack.sh on both the controller node and the compute node. The compute node has the following errors on Cinder.
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/url.py", line 219, in _parse_rfc1738_args "Could not parse rfc1738 URL from string '%s'" % name) ArgumentError: Could not parse rfc1738 URL from string '' 2013-04-10 18:10:19 INFO [cinder.service] Child 20312 exited with status 2

Then I checked the /etc/cinder/cinder.conf on the compute node and found that sql_connection is not set. I manually filled in the sql_connection as mysql://cinder:openstack@192.168.3.2/cinder. the problem went away.

When I tried to boot a server using $nova boot --image ** --flavor 1 --availability-zone nova:comp test1, the compute node has the following error on Nova:
TRACE nova.network.quantumv2 Unauthorized: [Errno > 111] ECONNREFUSED

Then I checked the /etc/nova/nova.conf on the compute node and found that quantum_admin_auth_url was set to use the ip of the compute node 192.168.3.8, rather than the controller node 192.168.3.2. I corrected this error and the problem went away.

It seems to me that the script might not correctly update these two configuration files on the compute nodes.

Revision history for this message
Tal Kain (talkain) wrote :

Hey,

I had the same issue and I just found out how to fix it.

First:
afc29fe5f210a8e78bafaafe7e8b3b5de733971c "Deprecate DATABASE_TYPE and use_database" - changed the way devstack configures the database you use. If you look at the current "ENABLED_SERVICES" you will see "mysql" is configured in it. When you re-configured it as http://devstack.org/guides/multinode-lab.html suggest, you will disable the compute node's database.
So just add mysql to the end of your ENABLED_SERVICES line.

Second:
As far as I can see 7e79d9139f931e45f732de9a39cc54bedd95bd6f's changes created a bug.

This patch fixes it:

From 4a9eb2582d704f5f4ebb6532eb0436285d3de0fe Mon Sep 17 00:00:00 2001
From: Tal Kain <email address hidden>
Date: Mon, 22 Apr 2013 17:50:27 +0300
Subject: [PATCH] lib/database: Fixed a bug in database_connection_url that
 was created by d95bd6f's changes

7e79d9139f931e45f732de9a39cc54bedd95bd6f's changes simplified the usage of database_connection_url_mysql and database_connection_url_postgresql without making the proper changes to database_connection_url.

Signed-off-by: Tal Kain <email address hidden>
---
 lib/database | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/lib/database b/lib/database
index e63d5e2..08e360f 100644
--- a/lib/database
+++ b/lib/database
@@ -110,13 +110,11 @@ function configure_database {
     configure_database_$DATABASE_TYPE
 }

-# Generate an SQLAlchemy connection URL and store it in a variable
-# $1 The variable name in which to store the connection URL
-# $2 The name of the database
+# Generate an SQLAlchemy connection URL and output it using echo
+# $1 The name of the database
 function database_connection_url {
- local var=$1
- local db=$2
- database_connection_url_$DATABASE_TYPE $var $db
+ local db=$1
+ database_connection_url_$DATABASE_TYPE $db
 }

--
1.7.9.5

Good luck!
Tal Kain.

Dean Troyer (dtroyer)
Changed in devstack:
importance: Undecided → Low
Changed in devstack:
assignee: nobody → Tal Kain (talkain)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/27703
Committed: http://github.com/openstack-dev/devstack/commit/0729d06fae1ee005d553350b729b233256032590
Submitter: Jenkins
Branch: master

commit 0729d06fae1ee005d553350b729b233256032590
Author: Tal Kain <email address hidden>
Date: Mon Apr 22 17:50:27 2013 +0300

    lib/database: Fixed a bug in database_connection_url

    The changes from https://review.openstack.org/#/c/23364/ simplified
    the usage of database_connection_url_mysql and
    database_connection_url_postgresql without making the proper changes
    to database_connection_url.

    Fixes: bug #1167668
    Signed-off-by: Tal Kain <email address hidden>
    Change-Id: I5115d123ad794f2eb2e144b76932031af5248f26

Changed in devstack:
status: In Progress → Fix Released
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.