From fe6f26b776418caa585f77f117a3a38628bce139 Mon Sep 17 00:00:00 2001 From: Mark Burnett Date: Thu, 26 Oct 2017 11:43:57 -0500 Subject: [PATCH] Fix: incorrect handling of virt-host-validate This avoids handling a warning as an error and fixes an incorrect call to `virt-host-health`. Change-Id: I3bb1dda6025966c393b82780ee8d9e914973756b --- tools/g2/lib/log.sh | 2 +- tools/setup_gate.sh | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/g2/lib/log.sh b/tools/g2/lib/log.sh index 45613387..5577eb37 100644 --- a/tools/g2/lib/log.sh +++ b/tools/g2/lib/log.sh @@ -34,7 +34,7 @@ log_huge_success() { } log_note() { - echo -e {$C_HILIGHT}NOTE:${C_CLEAR} ${@} + echo -e ${C_HILIGHT}NOTE:${C_CLEAR} ${@} } log_stage_error() { diff --git a/tools/setup_gate.sh b/tools/setup_gate.sh index 250a1700..084b934c 100755 --- a/tools/setup_gate.sh +++ b/tools/setup_gate.sh @@ -41,16 +41,18 @@ if [ "xY" != "x$(cat /sys/module/kvm_intel/parameters/nested)" ]; then fi if ! sudo virt-host-validate qemu &> /dev/null; then + log_note Host did not validate virtualization check: + sudo virt-host-validate qemu || true + if ! grep intel_iommu /etc/defaults/grub &> /dev/null; then log_note Enabling Intel IOMMU REQUIRE_REBOOT=1 sudo mkdir -p /etc/defaults sudo touch /etc/defaults/grub echo 'GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} intel_iommu=on"' | sudo tee -a /etc/defaults/grub + sudo update-grub else - echo -e ${C_ERROR}Failed to configure virtualization:${C_CLEAR} - sudo virt-host-health qemu - exit 1 + log Intel IOMMU appears enabled in grub configuration already fi fi