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
This commit is contained in:
Daneyon Hansen 2015-05-12 12:11:40 -07:00
parent 57990a94ae
commit fa51eb4b53
5 changed files with 24 additions and 10 deletions

View File

@ -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}"

View File

@ -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

View File

@ -82,6 +82,10 @@ all containers. This allows a simple method of ensuring every type of node
NOVA_EC2_API_SERVICE_HOST=<IP> - The IP Address where the Nova EC2 API is hosted
arn't these two the same?
NOVA_EC2_SERVICE_HOST=<IP> _ The IP Address where the Nova EC2 service is hosted
NOVA_VNCSERVER_PROXYCLIENT_ADDRESS=<IP> The IP address for the VNC Proxy Client to use
NOVA_VNCSERVER_LISTEN_ADDRESS=<IP> The IP address for the VNC Server to use
NOVA_NOVNC_BASE_ADDRESS=<IP/DNS Name> 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=<password> - The Nova keystone password
NOVA_KEYSTONE_USER=<nova> - The Nova keystone username
NEUTRON_DB_NAME=<neutron> - The name of the Neutron database

View File

@ -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

View File

@ -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