Commit 96565808 authored by Rafael Monnerat's avatar Rafael Monnerat

kvm: Wipe out device data once KVM is removed.

This requires the "prerm" plugin be enabled to be used in addition to devperm. 

I tested on production and it works fine.

/cc @tomo

/reviewed-on !687
parent 70f33f45
Pipeline #7689 failed with stage
in 0 seconds
......@@ -19,7 +19,7 @@ md5sum = a236b719aaac61ac342ada0ce569151a
[template-kvm]
filename = instance-kvm.cfg.jinja2
md5sum = 891d98667feb8daaa9f61b5bf09d5de0
md5sum = d604d8696815716ac51af770164e86d5
[template-kvm-cluster]
filename = instance-kvm-cluster.cfg.jinja2.in
......
......@@ -823,6 +823,14 @@ template = inline:
rendered = ${buildout:directory}/.slapos-disk-permission
context =
raw disk_device_path {{disk_device_path}}
{% do part_list.append('wipe-disk-device-wrapper') -%}
[wipe-disk-device-wrapper]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:prerm}/slapos_wipe_device_disk
command-line =
dd if=/dev/zero of={{disk_device_path}} bs=4096 count=500k
{% endif -%}
[buildout]
......
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