aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-02-22 16:31:24 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-02-26 13:56:47 +0000
commitcefde6d0e0a3674c2150f5014dcb90bf79c6d894 (patch)
treee2ab9079119c39a4236cc3d3ecad2ee2198d4440
parente9e92be47119b7a0f8c4f1cce3c27be3e36418f2 (diff)
[lib] Add fatal validation of old kernel on Ubuntu
As reported in [1], kernel 4.4 seems to break nested virtualization, add a fatal check against it. [1] https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1797332 Change-Id: I0aef8a7340dd82bfeb2e58c9642623b9ec13dca5 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit 5b838797e514ba3dc613017054816feb538034a5)
-rw-r--r--mcp/scripts/lib_jump_common.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/mcp/scripts/lib_jump_common.sh b/mcp/scripts/lib_jump_common.sh
index 5b09c29ab..97c25d87e 100644
--- a/mcp/scripts/lib_jump_common.sh
+++ b/mcp/scripts/lib_jump_common.sh
@@ -95,6 +95,14 @@ function jumpserver_check_requirements {
notify_n "[WARN] ${warn_br_endpoint}" 3
fi
fi
+ # https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1797332
+ if lsb_release -d | grep -q -e 'Ubuntu 16.04'; then
+ if uname -r | grep -q -e '^4\.4\.'; then
+ notify_n "[WARN] Host kernel too old; nested virtualization issues!" 3
+ notify_n "[WARN] apt install linux-generic-hwe-16.04 && reboot" 3
+ notify_e "[ERROR] Please upgrade the kernel and reboot!"
+ fi
+ fi
fi
}