From 4e07fdcba76a58fc2b21ce6670144312ddb73869 Mon Sep 17 00:00:00 2001 From: "Robbie Harwood (frozencemetery)" Date: Mon, 14 Jul 2014 18:11:39 -0400 Subject: [PATCH] Add and document $NOVA_VNC_ENABLED for forcing VNC on This allows multinode setups to function correctly without enabling the unneeded n-novnc and n-xvnc services on pure compute nodes. Change-Id: Ie02734bb598d27560cf5d674c9e1d9b8dca3801f Closes-Bug: 1342155 --- docs/source/guides/multinode-lab.html | 8 +++++++- lib/nova | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/source/guides/multinode-lab.html b/docs/source/guides/multinode-lab.html index 2e52379204..a286954e7d 100644 --- a/docs/source/guides/multinode-lab.html +++ b/docs/source/guides/multinode-lab.html @@ -184,7 +184,13 @@ SERVICE_HOST=192.168.42.11 MYSQL_HOST=192.168.42.11 RABBIT_HOST=192.168.42.11 GLANCE_HOSTPORT=192.168.42.11:9292 -ENABLED_SERVICES=n-cpu,n-net,n-api,c-sch,c-api,c-vol +ENABLED_SERVICES=n-cpu,n-net,n-api,c-sch,c-api,c-vol +NOVA_VNC_ENABLED=True +NOVNCPROXY_URL="http://192.168.42.11:6080/vnc_auto.html" +VNCSERVER_LISTEN=$HOST_IP +VNCSERVER_PROXYCLIENT_ADDRESS=$VNCSERVER_LISTEN + + diff --git a/lib/nova b/lib/nova index 6b1afd939f..be4e0f9611 100644 --- a/lib/nova +++ b/lib/nova @@ -88,6 +88,10 @@ GUEST_INTERFACE_DEFAULT=$(ip link \ | grep ^[ep] \ | head -1) +# $NOVA_VNC_ENABLED can be used to forcibly enable vnc configuration. +# In multi-node setups allows compute hosts to not run n-novnc. +NOVA_VNC_ENABLED=$(trueorfalse False $NOVA_VNC_ENABLED) + # Get hypervisor configuration # ---------------------------- @@ -492,7 +496,7 @@ function create_nova_conf { iniset $NOVA_CONF spice html5proxy_base_url "$SPICEHTML5PROXY_URL" fi - if is_service_enabled n-novnc || is_service_enabled n-xvnc; then + if is_service_enabled n-novnc || is_service_enabled n-xvnc || [ "$NOVA_VNC_ENABLED" != False ]; then # Address on which instance vncservers will listen on compute hosts. # For multi-host, this should be the management ip of the compute host. VNCSERVER_LISTEN=${VNCSERVER_LISTEN=127.0.0.1}