From 5d2a0d5c65b6d553680804e31780987cff0d6a39 Mon Sep 17 00:00:00 2001 From: Guillaume Hervier Date: Tue, 11 Dec 2018 15:10:52 +0000 Subject: [PATCH] software/kvm: Fix log path in kvm-started-promise --- software/kvm/instance-kvm.cfg.jinja2 | 3 ++- software/kvm/software.cfg | 4 ++-- software/kvm/template/qemu-is-ready.in | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/software/kvm/instance-kvm.cfg.jinja2 b/software/kvm/instance-kvm.cfg.jinja2 index 9a7ebcc71b..441205a8fe 100644 --- a/software/kvm/instance-kvm.cfg.jinja2 +++ b/software/kvm/instance-kvm.cfg.jinja2 @@ -259,7 +259,8 @@ mode = 700 context = raw dash {{ dash_executable_location }} raw qemu_ready_path ${kvm-controller-parameter-dict:kvm-status-path} - raw qemu_service_log_file ${buildout:directory}/.${slap-connection:partition-id}_kvm.log + raw qemu_log_prefix ${buildout:directory}/.${slap-connection:partition-id}_ + raw qemu_service_path ${kvm-instance:wrapper-path} [novnc-instance] recipe = slapos.cookbook:novnc diff --git a/software/kvm/software.cfg b/software/kvm/software.cfg index 152a5a6f85..c490dc9913 100644 --- a/software/kvm/software.cfg +++ b/software/kvm/software.cfg @@ -99,7 +99,7 @@ recipe = hexagonit.recipe.download ignore-existing = true url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2 mode = 644 -md5sum = b4a95f8398dac8de58254899b4545439 +md5sum = 09f7ac097cc61bed7c07a5cbf23a0962 download-only = true on-update = true @@ -226,7 +226,7 @@ ignore-existing = true url = ${:_profile_base_location_}/template/qemu-is-ready.in mode = 644 filename = qemu-is-ready.in -md5sum = b304eec8e2cb71f10ea83cac22f6db12 +md5sum = e7d58bd2eb848e9e9540929be866bde0 download-only = true on-update = true diff --git a/software/kvm/template/qemu-is-ready.in b/software/kvm/template/qemu-is-ready.in index 6c44f12f04..bfec7710a6 100644 --- a/software/kvm/template/qemu-is-ready.in +++ b/software/kvm/template/qemu-is-ready.in @@ -1,6 +1,8 @@ #!{{ dash }} FILE="{{ qemu_ready_path }}" +QEMU_SERVICE_PATH="{{ qemu_service_path }}" + # don't start checks too fast sleep 2 if [ -f "$FILE" ]; then @@ -12,7 +14,7 @@ if [ -f "$FILE" ]; then exit 1 fi else - log_file="{{ qemu_service_log_file }}" + log_file="{{ qemu_log_prefix }}$(basename ${QEMU_SERVICE_PATH}-*).log" >&2 echo "Qemu process is not correctly started." if [ -f "$log_file" ]; then >&2 echo "** Latest ouput logs **" @@ -20,4 +22,4 @@ else >&2 echo "$(tail $log_file)" exit 1 fi -fi \ No newline at end of file +fi -- 2.30.9