From fa51eb4b5377e4725c0438fbfe85cdacdab8b3fe Mon Sep 17 00:00:00 2001 From: Daneyon Hansen Date: Tue, 12 May 2015 12:11:40 -0700 Subject: [PATCH] Fixes Nova NoVNC Previously, vnc was not completely working properly because nova.conf config flags were not properly implemented in t he correct containers. This patch moves the nova.conf config flags for vnc to the proper containers. Additionally, the patch modifies the proxy client ip param to be consistent with the param within nova.conf and adds all the novnc params to docs. Change-Id: I1944baca64ccd113bbca582784b08f90dc0eff69 --- docker/nova-compute/nova-compute/config-nova-compute.sh | 8 +++++--- docker/nova-controller/nova-novncproxy/start.sh | 9 ++++----- docs/integration-guide.md | 4 ++++ docs/minimal-environment-vars.md | 7 +++++++ tools/genenv | 6 ++++-- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/docker/nova-compute/nova-compute/config-nova-compute.sh b/docker/nova-compute/nova-compute/config-nova-compute.sh index 14e18acc85..81a2e3fe3e 100755 --- a/docker/nova-compute/nova-compute/config-nova-compute.sh +++ b/docker/nova-compute/nova-compute/config-nova-compute.sh @@ -5,15 +5,17 @@ cfg=/etc/nova/nova.conf -check_required_vars NOVA_NOVNC_PROXYCLIENT_IP +check_required_vars NOVA_VNCSERVER_PROXYCLIENT_ADDRESS NOVA_NOVNC_PROXY_PORT \ + NOVA_NOVNC_BASE_ADDRESS # Configures novnc to listen on all interfaces and instructs nova-compute to # announce PROXYCLIENT_IP to the nova-vncproxy. Clients like Horizon will # connect with this address. -# As such, PROXYCLIENT_IP is unique per compute node. +# As such, NOVA_VNCSERVER_PROXYCLIENT_ADDRESS is unique per compute node. crudini --set $cfg DEFAULT vnc_enabled "True" crudini --set $cfg DEFAULT vncserver_listen "0.0.0.0" -crudini --set $cfg DEFAULT vncserver_proxyclient_address "${NOVA_NOVNC_PROXYCLIENT_IP}" +crudini --set $cfg DEFAULT vncserver_proxyclient_address "${NOVA_VNCSERVER_PROXYCLIENT_ADDRESS}" +crudini --set $cfg DEFAULT novncproxy_base_url "http://${NOVA_NOVNC_BASE_ADDRESS}:${NOVA_NOVNC_PROXY_PORT}/vnc_auto.html" # configure logging crudini --set $cfg DEFAULT log_file "${NOVA_COMPUTE_LOG_FILE}" diff --git a/docker/nova-controller/nova-novncproxy/start.sh b/docker/nova-controller/nova-novncproxy/start.sh index e8aea8f79e..9edafbca34 100755 --- a/docker/nova-controller/nova-novncproxy/start.sh +++ b/docker/nova-controller/nova-novncproxy/start.sh @@ -5,7 +5,8 @@ set -e cfg=/etc/nova/nova.conf check_required_vars PUBLIC_IP NOVA_NOVNC_PROXY_SERVICE_HOST NOVA_NOVNC_PROXY_PORT \ - NOVA_NOVNC_BASE_ADDRESS + NOVA_NOVNC_BASE_ADDRESS NOVA_VNCSERVER_LISTEN_ADDRESS \ + NOVA_VNCSERVER_PROXYCLIENT_ADDRESS crudini --set $cfg DEFAULT log_file "${NOVA_NOVNCPROXY_LOG_FILE}" @@ -14,10 +15,8 @@ crudini --set $cfg DEFAULT log_file "${NOVA_NOVNCPROXY_LOG_FILE}" # The base_url is given to clients to connect to, like Horizon, so this could # very well be fancy DNS name. echo Configuring VNC... -crudini --set $cfg DEFAULT vnc_enabled "True" -crudini --set $cfg DEFAULT novncproxy_host "${NOVA_NOVNC_PROXY_SERVICE_HOST}" -crudini --set $cfg DEFAULT novncproxy_port "${NOVA_NOVNC_PROXY_PORT}" -crudini --set $cfg DEFAULT novncproxy_base_url "http://${NOVA_NOVNC_BASE_ADDRESS}:${NOVA_NOVNC_PROXY_PORT}/vnc_auto.html" +crudini --set $cfg DEFAULT vncserver_listen "${NOVA_VNCSERVER_LISTEN_ADDRESS}" +crudini --set $cfg DEFAULT vncserver_proxyclient_address "${NOVA_VNCSERVER_PROXYCLIENT_ADDRESS}" echo Starting nova-novncproxy exec /usr/bin/nova-novncproxy diff --git a/docs/integration-guide.md b/docs/integration-guide.md index 1db81ab7bf..b13b74cae5 100644 --- a/docs/integration-guide.md +++ b/docs/integration-guide.md @@ -82,6 +82,10 @@ all containers. This allows a simple method of ensuring every type of node NOVA_EC2_API_SERVICE_HOST= - The IP Address where the Nova EC2 API is hosted arn't these two the same? NOVA_EC2_SERVICE_HOST= _ The IP Address where the Nova EC2 service is hosted + NOVA_VNCSERVER_PROXYCLIENT_ADDRESS= The IP address for the VNC Proxy Client to use + NOVA_VNCSERVER_LISTEN_ADDRESS= The IP address for the VNC Server to use + NOVA_NOVNC_BASE_ADDRESS= The IP/DNS Name to use for the NOVNC Base URL + NOVA_NOVNC_PROXY_PORT=<6080> The TCP port used by Nova NoVNC NOVA_KEYSTONE_PASSWORD= - The Nova keystone password NOVA_KEYSTONE_USER= - The Nova keystone username NEUTRON_DB_NAME= - The name of the Neutron database diff --git a/docs/minimal-environment-vars.md b/docs/minimal-environment-vars.md index c681baa76a..d314a8abce 100644 --- a/docs/minimal-environment-vars.md +++ b/docs/minimal-environment-vars.md @@ -175,6 +175,8 @@ In order for each service to function, there is a minimum set of required variab NOVA_COMPUTE_SERVICE_HOST NOVA_EC2_COMPUTE_SERVICE_HOST NOVA_EC2_SERVICE_HOST + NOVA_NOVNC_BASE_ADDRESS + NOVA_NOVNC_PROXY_PORT PUBLIC_IP # Nova-libvirt @@ -233,6 +235,11 @@ In order for each service to function, there is a minimum set of required variab NOVA_EC2_SERVICE_HOST PUBLIC_IP +# Nova NoVNC + + NOVA_VNCSERVER_LISTEN_ADDRESS + NOVA_VNCSERVER_PROXYCLIENT_ADDRESS + # Neutron/Nova NEUTRON_SHARED_SECRET diff --git a/tools/genenv b/tools/genenv index 483c792ddc..3b0c4d2b88 100755 --- a/tools/genenv +++ b/tools/genenv @@ -86,9 +86,10 @@ NOVA_FLAT_INTERFACE=eth1 ENABLED_APIS=ec2,osapi_compute,metadata METADATA_HOST=$HOST_IP NOVA_NOVNC_PROXY_PORT=6080 +NOVA_VNCSERVER_LISTEN_ADDRESS=$HOST_IP +NOVA_VNCSERVER_PROXYCLIENT_ADDRESS=$HOST_IP NOVA_NOVNC_PROXY_SERVICE_HOST=0.0.0.0 NOVA_NOVNC_BASE_ADDRESS=${PUBLIC_IP} -NOVA_NOVNC_PROXYCLIENT_IP=${PUBLIC_IP} # Neutron NEUTRON_DB_NAME=neutron @@ -142,6 +143,8 @@ NOVA_SCHEDULER_LOG_FILE=$NOVA_SCHEDULER_LOG_FILE NOVA_COMPUTE_LOG_FILE=$NOVA_COMPUTE_LOG_FILE NOVA_CONSOLEAUTH_LOG_FILE=$NOVA_CONSOLEAUTH_LOG_FILE NOVA_NOVNCPROXY_LOG_FILE=$NOVA_NOVNCPROXY_LOG_FILE +NOVA_VNCSERVER_PROXYCLIENT_ADDRESS=$NOVA_VNCSERVER_PROXYCLIENT_ADDRESS +NOVA_VNCSERVER_LISTEN_ADDRESS=$NOVA_VNCSERVER_LISTEN_ADDRESS NEUTRON_SERVER_LOG_FILE=$NEUTRON_SERVER_LOG_FILE NEUTRON_L3_AGENT_LOG_FILE=$NEUTRON_L3_AGENT_LOG_FILE NEUTRON_LINUXBRIDGE_AGENT_LOG_FILE=$NEUTRON_LINUXBRIDGE_AGENT_LOG_FILE @@ -185,7 +188,6 @@ NOVA_KEYSTONE_USER=$NOVA_KEYSTONE_USER NOVA_NOVNC_PROXY_SERVICE_HOST=$NOVA_NOVNC_PROXY_SERVICE_HOST NOVA_NOVNC_PROXY_PORT=$NOVA_NOVNC_PROXY_PORT NOVA_NOVNC_BASE_ADDRESS=${NOVA_NOVNC_BASE_ADDRESS} -NOVA_NOVNC_PROXYCLIENT_IP=${NOVA_NOVNC_PROXYCLIENT_IP} NEUTRON_SHARED_SECRET=$NEUTRON_SHARED_SECRET NEUTRON_DB_NAME=$NEUTRON_DB_NAME NEUTRON_DB_USER=$NEUTRON_DB_USER