From 88ba777bab769fe5f6390c44ab3540a357418663 Mon Sep 17 00:00:00 2001 From: Harm Weites Date: Sat, 6 Jun 2015 21:21:54 +0200 Subject: [PATCH] Autogenerated value for DESIGNATE_POOLMAN_POOLID Change-Id: I14eec402d4e9afbfc58b74938df01c858314e6f3 Closes-bug: #1462798 --- .../binary/designate/designate-base/config-designate.sh | 6 +++++- .../centos/binary/designate/designate-poolmanager/start.sh | 7 ++++++- tools/genenv | 3 +-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docker/centos/binary/designate/designate-base/config-designate.sh b/docker/centos/binary/designate/designate-base/config-designate.sh index 883d094b45..5a31401eec 100755 --- a/docker/centos/binary/designate/designate-base/config-designate.sh +++ b/docker/centos/binary/designate/designate-base/config-designate.sh @@ -11,7 +11,7 @@ check_required_vars DESIGNATE_DB_PASSWORD DESIGNATE_KEYSTONE_PASSWORD \ RABBIT_USERID RABBIT_PASSWORD DESIGNATE_DB_USER \ DESIGNATE_DB_NAME KEYSTONE_AUTH_PROTOCOL \ KEYSTONE_ADMIN_SERVICE_HOST KEYSTONE_ADMIN_SERVICE_PORT \ - DEBUG_LOGGING + DEBUG_LOGGING DESIGNATE_POOLMAN_POOLID fail_unless_db dump_vars @@ -40,6 +40,10 @@ crudini --set $conf storage:sqlalchemy connection "mysql://${DESIGNATE_DB_USER}: crudini --set $conf service:api auth_strategy "keystone" crudini --set $conf service:api api_host "${PUBLIC_IP}" +# Eventhough this is a central-scoped item, it's used in other Designate +# components as well. Thus it should be configured here, from designate-base. +crudini --set $conf service:central default_pool_id "${DESIGNATE_POOLMAN_POOLID}" + crudini --set $conf keystone_authtoken identity_uri "${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}" crudini --set $conf keystone_authtoken auth_uri "${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_PUBLIC_SERVICE_HOST}:${KEYSTONE_PUBLIC_SERVICE_PORT}/v2.0" crudini --set $conf keystone_authtoken admin_tenant_name "${ADMIN_TENANT_NAME}" diff --git a/docker/centos/binary/designate/designate-poolmanager/start.sh b/docker/centos/binary/designate/designate-poolmanager/start.sh index 34e6e33eee..f5222b3f46 100755 --- a/docker/centos/binary/designate/designate-poolmanager/start.sh +++ b/docker/centos/binary/designate/designate-poolmanager/start.sh @@ -6,7 +6,8 @@ set -e check_required_vars DESIGNATE_MASTERNS DESIGNATE_BACKEND DESIGNATE_SLAVENS \ DESIGNATE_MDNS_PORT DESIGNATE_DNS_PORT DESIGNATE_POOLMAN_POOLID \ - DESIGNATE_POOLMAN_TARGETS DESIGNATE_POOLMAN_NSS + DESIGNATE_POOLMAN_TARGETS DESIGNATE_POOLMAN_NSS \ + DESIGNATE_POOLMAN_POOLID CONF=/etc/designate/designate.conf @@ -33,6 +34,10 @@ crudini --set $CONF service:pool_manager cache_driver "noop" #crudini --set $CONF service:pool_manager cache_driver memcache #crudini --set $CONF service:pool_manager memcached_servers ${MEMCACHED_HOST} +# Specify the id of the pool managed through pool_manager. Central gets +# configured with this pool_id as well. +crudini --set $CONF service:pool_manager pool_id "${DESIGNATE_POOLMAN_POOLID}" + crudini --set $CONF pool:${DESIGNATE_POOLMAN_POOLID} nameservers "${DESIGNATE_POOLMAN_NSS}" crudini --set $CONF pool:${DESIGNATE_POOLMAN_POOLID} targets "${DESIGNATE_POOLMAN_TARGETS}" diff --git a/tools/genenv b/tools/genenv index 69a3b13fca..28b4ef8a41 100755 --- a/tools/genenv +++ b/tools/genenv @@ -139,8 +139,7 @@ DESIGNATE_API_SERVICE_HOST=$HOST_IP DESIGNATE_API_SERVICE_PORT=9001 DESIGNATE_MDNS_PORT=5354 DESIGNATE_DNS_PORT=53 -# The POOLID is hardcoded, upstream ships pre-configured with this uuid: -DESIGNATE_POOLMAN_POOLID=794ccc2c-d751-44fe-b57f-8894c9f5c842 +DESIGNATE_POOLMAN_POOLID=$(uuidgen) DESIGNATE_POOLMAN_TARGETS=$(uuidgen) DESIGNATE_POOLMAN_NSS=$(uuidgen) DESIGNATE_INITDB=true