aboutsummaryrefslogtreecommitdiff
path: root/docker/common/nova-compute/nova-libvirt/start.sh
diff options
context:
space:
mode:
authorHarm Weites <harm@weites.com>2015-07-02 19:49:11 +0200
committerHarm Weites <harm@weites.com>2015-07-03 08:39:43 +0200
commit0de08336754cbff67d320fcf5d68ad97243f96ec (patch)
tree8d1439bc07098ee823b83c8765af55c9d1415989 /docker/common/nova-compute/nova-libvirt/start.sh
parent3a4500c1220f11aa01faabf3ae4e74b6697861c0 (diff)
downloadkolla-0de08336754cbff67d320fcf5d68ad97243f96ec.tar.gz
kolla-0de08336754cbff67d320fcf5d68ad97243f96ec.zip
Add config-internal/config-external to Nova-compute containers
Partially Implements: Blueprint standard-start Change-Id: Ia219015f18d788d0c01c0bffee6b475bb07291a9
Diffstat (limited to 'docker/common/nova-compute/nova-libvirt/start.sh')
-rwxr-xr-xdocker/common/nova-compute/nova-libvirt/start.sh34
1 files changed, 8 insertions, 26 deletions
diff --git a/docker/common/nova-compute/nova-libvirt/start.sh b/docker/common/nova-compute/nova-libvirt/start.sh
index 1f2ddbed8..00d7046d1 100755
--- a/docker/common/nova-compute/nova-libvirt/start.sh
+++ b/docker/common/nova-compute/nova-libvirt/start.sh
@@ -1,31 +1,13 @@
#!/bin/bash
+set -o errexit
-if [[ $(cat /proc/cpuinfo | grep vmx) ]]; then
- modprobe kvm_intel
-elif [[ $(cat /proc/cpuinfo | grep svm) ]]; then
- modprobe kvm_amd
-else
- echo "WARNING: Your hardware does not support hardware virtualization -" \
- "using qemu software virtualization instead"
-fi
+CMD="/usr/sbin/libvirtd"
+ARGS=""
-modprobe ip6_tables ip_tables ebtable_nat
+# Loading common functions.
+source /opt/kolla/kolla-common.sh
-# If libvirt is not installed on the host permissions need to be set
-# If running in qemu, we don't need to set anything as /dev/kvm won't exist
-if [[ -c /dev/kvm ]]; then
- chmod 660 /dev/kvm
- chown root:kvm /dev/kvm
-fi
+# Config-internal script exec out of this function, it does not return here.
+set_configs
-# https://bugs.launchpad.net/kolla/+bug/1461635
-# Cinder requires mounting /dev in the cinder-volume, nova-compute,
-# and libvirt containers. If /dev/pts/ptmx does not have proper permissions
-# on the host, then libvirt will fail to boot an instance.
-# This is a bug in Docker where it is not correctly mounting /dev/pts
-# Tech Debt tracker: https://bugs.launchpad.net/kolla/+bug/1468962
-# **Temporary fix**
-chmod 666 /dev/pts/ptmx
-
-echo "Starting libvirtd."
-exec /usr/sbin/libvirtd
+exec $CMD $ARGS