From 20e88776bc9b85b2a3a0f7a86004f6b04520e9a8 Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Tue, 14 Oct 2014 11:13:46 -0400 Subject: [PATCH] do not perform database or keystone setup in nova-compute - do not perform database or keystone initialization in nova-compute image (these should happen in the controller images). - fix incorrect nova.conf path - configure keystone_authtoken correct NB: This still won't result in a working image, because it does not configure the RPC settings yet. That will be for a subsequent patch. Change-Id: Icbd66104ef817d360c46003b29fff63f66ace8d2 --- docker/nova-compute/nova-compute/start.sh | 70 +++++++++++------------ 1 file changed, 33 insertions(+), 37 deletions(-) diff --git a/docker/nova-compute/nova-compute/start.sh b/docker/nova-compute/nova-compute/start.sh index 45946332de..b1d10c4d80 100755 --- a/docker/nova-compute/nova-compute/start.sh +++ b/docker/nova-compute/nova-compute/start.sh @@ -1,48 +1,44 @@ #!/bin/sh -: ${NOVA_DB_USER:=nova} -: ${NOVA_DB_NAME:=nova} -: ${KEYSTONE_AUTH_PROTOCOL:=http} +. /opt/kolla/kolla-common.sh + : ${NOVA_KEYSTONE_USER:=nova} : ${ADMIN_TENANT_NAME:=admin} -if ! [ "$KEYSTONE_ADMIN_TOKEN" ]; then - echo "*** Missing KEYSTONE_ADMIN_TOKEN" >&2 - exit 1 -fi +check_required_vars KEYSTONE_ADMIN_TOKEN KEYSTONE_SERVICE_HOST -if ! [ "$DB_ROOT_PASSWORD" ]; then - echo "*** Missing DB_ROOT_PASSWORD" >&2 - exit 1 -fi +cfg=/etc/nova/nova.conf -if ! [ "$NOVA_DB_PASSWORD" ]; then - NOVA_DB_PASSWORD=$(openssl rand -hex 15) - export NOVA_DB_PASSWORD -fi +crudini --set $cfg DEFAULT admin_token "${KEYSTONE_ADMIN_TOKEN}" +crudini --sel $cfg DEFAULT log_file "" +crudini --del $cfg DEFAULT log_dir +crudini --set $cfg DEFAULT use_stderr True +crudini --set $cfg \ + libvirt \ + connection_uri \ + "qemu+tcp://${NOVA_PORT_16509_TCP_PORT}/system" -mysql -h ${MARIADB_PORT_3306_TCP_ADDR} -u root \ - -p${DB_ROOT_PASSWORD} mysql <