summaryrefslogtreecommitdiff
path: root/openstack/usr/share/openstack
diff options
context:
space:
mode:
authorFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2015-03-10 16:08:03 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2015-03-23 22:58:55 +0000
commit8b54102756b45c9a90928b56a685241573fdad68 (patch)
treee1be07e047e3ffcb2fdec9e5acab5a78f7ddd27d /openstack/usr/share/openstack
parent7b91d9a40f855beda227e3ae88287e903b373584 (diff)
downloaddefinitions-8b54102756b45c9a90928b56a685241573fdad68.tar.gz
Set novncproxy server ip in nova.conf
The ip of the compute node is gotten from the bridge device and this value is set in the novncproxy configuration in nova.conf. This is required for horizon to access to the compute node so have access to the VMs created on it. Also: - remove /usr/share/vnc which is now created in the vnc chunk. - add explicity where to find novnc client to nova-novncproxy systemd unit.
Diffstat (limited to 'openstack/usr/share/openstack')
-rw-r--r--openstack/usr/share/openstack/openstack-nova-setup9
1 files changed, 4 insertions, 5 deletions
diff --git a/openstack/usr/share/openstack/openstack-nova-setup b/openstack/usr/share/openstack/openstack-nova-setup
index 7168e7c2..1a93a1b0 100644
--- a/openstack/usr/share/openstack/openstack-nova-setup
+++ b/openstack/usr/share/openstack/openstack-nova-setup
@@ -76,11 +76,10 @@ if ! sudo -u postgres psql -lqt | grep -q nova; then
sudo -u nova nova-manage db sync
fi
-# Nova novncproxy needs /usr/share/novnc folder available
-if [ ! -d /usr/share/novnc ]; then
- mkdir /usr/share/novnc
- chown -R nova:nova /usr/share/novnc
-fi
+# Nova novncproxy needs to know the ip of the novnc host
+# this is a workaround to make nova known which is the novnc host
+eth_ip="$(ip addr | perl -pe 'if (/^\d+: ([^:]+)/) { $iface=$1; } if (m@^\s*inet ([^/]+)/@) { print "$iface $1\n"; } $_=undef;' | grep "^br-eth0" | head -1 | awk '{ print $2 } ')"
+sed -i "s/\#\#NOVNC_HOST\#\#/$eth_ip/g" /etc/nova/nova.conf
chown -R nova:nova /var/lib/nova