Commit 41ab8242 authored by Jérome Perrin's avatar Jérome Perrin

software/kvm: use nice/ionice to run import with lower priority

parent 3f26a556
......@@ -31,7 +31,7 @@ md5sum = 839fc16c112d3b87e2dbd2e382e326de
[template-kvm-import]
filename = instance-kvm-import.cfg.jinja2.in
md5sum = a463a5e3cd2287d275d6943c2a11b7e4
md5sum = 5540d058f7842466a1fc61bf94239b61
[template-kvm-import-script]
filename = template/kvm-import.sh.jinja2
......
......@@ -61,8 +61,8 @@ cronstamps = ${:etc}/cronstamps
recipe = slapos.recipe.template:jinja2
url = {{ template_kvm_import }}
output = ${directory:bin}/${slap-parameter:namebase}-importer
# Resilient stack wants a "wrapper" parameter
wrapper = ${:output}
wrapper =
nice -19 chrt --idle 0 ionice -c3 ${:output}
context =
section directory directory
raw zcat_binary {{ zcat_binary }}
......@@ -77,7 +77,7 @@ input = inline:#!/bin/sh
if [ ! -s "$QEMU_IMAGE" ]; then
exit 0
fi
{{ qemu_location }}/bin/qemu-img check $QEMU_IMAGE
nice -19 chrt --idle 0 ionice -c3 {{ qemu_location }}/bin/qemu-img check $QEMU_IMAGE
RETURN_CODE=$?
if [ $RETURN_CODE -eq 0 ] || [ $RETURN_CODE -eq 3 ]; then
exit 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment