KVM SR: add promise to look for disk image non-corruption.

parent 7f8981c3
...@@ -87,7 +87,7 @@ mode = 0644 ...@@ -87,7 +87,7 @@ mode = 0644
[template-kvm] [template-kvm]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvm.cfg.in url = ${:_profile_base_location_}/instance-kvm.cfg.in
md5sum = 9d1764289f2e705dc8209b99cfcaab46 md5sum = c06bb498593aabc9c76eb7dc892da15a
output = ${buildout:directory}/template-kvm.cfg output = ${buildout:directory}/template-kvm.cfg
mode = 0644 mode = 0644
...@@ -125,7 +125,7 @@ mode = 0755 ...@@ -125,7 +125,7 @@ mode = 0755
[template-kvm-export] [template-kvm-export]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvm-export.cfg.in url = ${:_profile_base_location_}/instance-kvm-export.cfg.in
md5sum = 64a1a505aff9fde52afac46240811047 md5sum = 2f5fdf1e88e6e3454f877b80074bed05
output = ${buildout:directory}/template-kvm-export.cfg output = ${buildout:directory}/template-kvm-export.cfg
mode = 0644 mode = 0644
......
...@@ -7,7 +7,8 @@ parts += ...@@ -7,7 +7,8 @@ parts +=
certificate-authority certificate-authority
publish-connection-information publish-connection-information
kvm-promise kvm-vnc-promise
kvm-disk-image-corruption-promise
websockify-sighandler websockify-sighandler
novnc-promise novnc-promise
cron cron
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
parts = parts =
certificate-authority certificate-authority
publish-connection-information publish-connection-information
kvm-promise kvm-vnc-promise
kvm-disk-image-corruption-promise
websockify-sighandler websockify-sighandler
novnc-promise novnc-promise
# kvm-monitor # kvm-monitor
...@@ -96,12 +97,20 @@ qemu-img-path = ${kvm:location}/bin/qemu-img ...@@ -96,12 +97,20 @@ qemu-img-path = ${kvm:location}/bin/qemu-img
6tunnel-path = ${6tunnel:location}/bin/6tunnel 6tunnel-path = ${6tunnel:location}/bin/6tunnel
[kvm-promise] [kvm-vnc-promise]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
path = $${directory:promises}/vnc_promise path = $${directory:promises}/vnc_promise
hostname = $${kvm-instance:vnc-ip} hostname = $${kvm-instance:vnc-ip}
port = $${kvm-instance:vnc-port} port = $${kvm-instance:vnc-port}
[kvm-disk-image-corruption-promise]
# Check that disk image is not corrupted
recipe = collective.recipe.template
input = inline:#!/bin/sh
$${kvm-instance:qemu-img-path} check $${kvm-instance:disk-path}
output = $${directory:promises}/kvm-disk-image-corruption
mode = 700
[novnc-instance] [novnc-instance]
recipe = slapos.cookbook:novnc recipe = slapos.cookbook:novnc
......
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