Added code to not install low latency kernel to Virtualbox VM 68/568/1
authorwrider <lji@research.att.com>
Fri, 26 Jul 2019 04:23:53 +0000 (00:23 -0400)
committerwrider <lji@research.att.com>
Fri, 26 Jul 2019 04:24:02 +0000 (00:24 -0400)
Low latency kernel causing VirtualBox Ubuntu VMs to hang.  This
fix avoids installing the low latency kernel if the VM is identified
as a VirtualBox VM.

Change-Id: Iccf688ff0c0448ee60c0ae58d5565b8881bcc338
Signed-off-by: wrider <lji@research.att.com>
ric-infra/00-Kubernetes/heat/scripts/k8s_vm_install.sh

index e1e9615..25550a1 100644 (file)
@@ -127,7 +127,13 @@ echo 'deb http://apt.kubernetes.io/ kubernetes-xenial main' > /etc/apt/sources.l
 
 # install low latency kernel, docker.io, and kubernetes
 apt-get update
-apt-get install -y linux-image-4.15.0-45-lowlatency curl jq netcat docker.io=${DOCKERVERSION}
+apt-get install -y virt-what
+if ! echo $(virt-what) | grep "virtualbox"; then
+  # this version of low latency kernel causes virtualbox VM to hand.  
+  # install if identifying the VM not being a virtualbox VM.
+  apt-get install -y linux-image-4.15.0-45-lowlatency
+fi
+apt-get install -y curl jq netcat docker.io=${DOCKERVERSION}
 apt-get install -y kubernetes-cni=${CNIVERSION}
 apt-get install -y --allow-unauthenticated kubeadm=${KUBEVERSION} kubelet=${KUBEVERSION} kubectl=${KUBEVERSION}
 apt-mark hold docker.io kubernetes-cni kubelet kubeadm kubectl