Commit c7b7a21c authored by Cédric de Saint Martin's avatar Cédric de Saint Martin Committed by Rafael Monnerat

[KVM SR] Fix image corruption promise to report 'ok' if there are only leaks.

parent ea046a0e
...@@ -88,7 +88,7 @@ mode = 0644 ...@@ -88,7 +88,7 @@ mode = 0644
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2 url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
mode = 644 mode = 644
md5sum = 36efccfeda60e2990fc71df6264cbe9d md5sum = 83d1991cb298c87ec7d37e1b8c466417
download-only = true download-only = true
on-update = true on-update = true
......
...@@ -108,6 +108,13 @@ port = ${kvm-instance:vnc-port} ...@@ -108,6 +108,13 @@ port = ${kvm-instance:vnc-port}
recipe = collective.recipe.template recipe = collective.recipe.template
input = inline:#!/bin/sh input = inline:#!/bin/sh
${kvm-instance:qemu-img-path} check ${kvm-instance:disk-path} ${kvm-instance:qemu-img-path} check ${kvm-instance:disk-path}
EXIT_VALUE=$?
# Exit code 3 is used to say "there are leaks but it's ok"
# See http://git.qemu.org/?p=qemu.git;a=blob;f=qemu-img.c;h=b6b5644cb6afaf7441f950c85ff1e652c79bdbff;hb=HEAD#l522
if [[ ! $EXIT_VALUE -eq 0 && ! $EXIT_VALUE -eq 3 ]]; then
exit 1
fi
exit 0
output = ${directory:promises}/kvm-disk-image-corruption output = ${directory:promises}/kvm-disk-image-corruption
mode = 700 mode = 700
......
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