From e21028d6d1e8e2cb63711e42251edb4af6e0bad0 Mon Sep 17 00:00:00 2001 From: Jens Harbott Date: Tue, 11 Aug 2020 10:19:21 +0200 Subject: [PATCH] Update devstack plugin There is no reason to create internal and admin endpoints in DevStack, most other services have stopped doing so a long time ago. Also use the global SERVICE_PROTOCOL variable as default for OCTAVIA_PROTOCOL instead of "http", this will make us automatically use the secure API access when the tls-proxy service is enabled. Fix the instructions for using the devstack plugin, too. Change-Id: I0154b83cb64952844a28895721694d3e2ff82be2 (cherry picked from commit dac24cd7ec9d9d6d6a89a9ab3e099e93854807ff) (cherry picked from commit 5613958a5011a07878c548ccd33b24cdb511e914) --- devstack/README.md | 2 +- devstack/plugin.sh | 6 ------ devstack/settings | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/devstack/README.md b/devstack/README.md index 340bad7dcb..fd1e34bfef 100644 --- a/devstack/README.md +++ b/devstack/README.md @@ -23,7 +23,7 @@ For example For example - ENABLED_SERVICES+=octavia,o-api,o-cw,o-hk,o-hm,o-da + ENABLED_SERVICES+=,octavia,o-api,o-cw,o-hk,o-hm,o-da For more information, see the "Externally Hosted Plugins" section of https://docs.openstack.org/devstack/latest/plugins.html diff --git a/devstack/plugin.sh b/devstack/plugin.sh index c14199ff12..332d047c8f 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -198,20 +198,14 @@ function create_octavia_accounts { if [[ "$WSGI_MODE" == "uwsgi" ]] && [[ "$OCTAVIA_NODE" == "main" ]] ; then get_or_create_endpoint $octavia_service \ "$REGION_NAME" \ - "$OCTAVIA_PROTOCOL://$SERVICE_HOST:$OCTAVIA_PORT/$OCTAVIA_SERVICE_TYPE" \ - "$OCTAVIA_PROTOCOL://$SERVICE_HOST:$OCTAVIA_PORT/$OCTAVIA_SERVICE_TYPE" \ "$OCTAVIA_PROTOCOL://$SERVICE_HOST:$OCTAVIA_PORT/$OCTAVIA_SERVICE_TYPE" elif [[ "$WSGI_MODE" == "uwsgi" ]]; then get_or_create_endpoint $octavia_service \ "$REGION_NAME" \ - "$OCTAVIA_PROTOCOL://$SERVICE_HOST/$OCTAVIA_SERVICE_TYPE" \ - "$OCTAVIA_PROTOCOL://$SERVICE_HOST/$OCTAVIA_SERVICE_TYPE" \ "$OCTAVIA_PROTOCOL://$SERVICE_HOST/$OCTAVIA_SERVICE_TYPE" else get_or_create_endpoint $octavia_service \ "$REGION_NAME" \ - "$OCTAVIA_PROTOCOL://$SERVICE_HOST:$OCTAVIA_PORT/" \ - "$OCTAVIA_PROTOCOL://$SERVICE_HOST:$OCTAVIA_PORT/" \ "$OCTAVIA_PROTOCOL://$SERVICE_HOST:$OCTAVIA_PORT/" fi } diff --git a/devstack/settings b/devstack/settings index 1ab0f5dc85..44b1f8954c 100644 --- a/devstack/settings +++ b/devstack/settings @@ -25,7 +25,7 @@ OCTAVIA_PROJECT_NAME=${OCTAVIA_PROJECT_NAME:-$OCTAVIA_USERNAME} OCTAVIA_USER_DOMAIN_NAME=${OCTAVIA_USER_DOMAIN_NAME:-"Default"} OCTAVIA_PROJECT_DOMAIN_NAME=${OCTAVIA_PROJECT_DOMAIN_NAME:-"Default"} -OCTAVIA_PROTOCOL=${OCTAVIA_PROTOCOL:-"http"} +OCTAVIA_PROTOCOL=${OCTAVIA_PROTOCOL:-$SERVICE_PROTOCOL} OCTAVIA_PORT=${OCTAVIA_PORT:-"9876"} OCTAVIA_HA_PORT=${OCTAVIA_HA_PORT:-"9875"} OCTAVIA_HM_LISTEN_PORT=${OCTAVIA_HM_LISTEN_PORT:-"5555"}