Commit 53a52b28 authored by Rafael Monnerat's avatar Rafael Monnerat

slaprunner: Define backup wait time for resilience

  In order to make an resilient backup, resilience stack wait for the internal backup finishes,
  before proceed to notify the pbs. This commit keeps the default behaviour (wait for 10 min w/o changes),
  however allows test software release adopt a much shorter waiting time (1min).

  With this commit we can accelerate resilience tests in several minutes.
parent e34c7254
......@@ -8,3 +8,7 @@ parts += template-erp5testnode
[template-resilient-test]
filename = instance-resilient-test.cfg.jinja2
md5sum = dadf1e8599ba7d96c5af827ec389a9cf
[exporter-default-configuration]
# Define shorter interaction to speed up tests
backup_wait_time = 1
......@@ -15,7 +15,7 @@
# not need these here).
[template]
filename = instance.cfg
md5sum = 43b3f80bc368a5b246e0f0e80e7e3c01
md5sum = e89d25c1bb7bf507bd96973d444934a6
[template-runner]
filename = instance-runner.cfg
......@@ -31,11 +31,11 @@ md5sum = 0701cf6282efa28086990f73ec2a319f
[template-runner-export-script]
filename = template/runner-export.sh.jinja2
md5sum = 5fab5c6867a57adf6dcf7b8dc758358a
md5sum = c0c32fc9c1bc9980745eeb638b48a691
[instance-runner-export]
filename = instance-runner-export.cfg.in
md5sum = 2a29bcf1c857721eb2462d9cb9d20386
md5sum = 546b368baaed84bd2d3be7d6b68a5030
[template-resilient]
filename = instance-resilient.cfg.jinja2
......
......@@ -65,6 +65,7 @@ port = ${supervisord-free-port:port}
[exporter-configuration]
coreutils-location = {{ dumps(parameter_dict['coreutils-location']) }}
gawk-location = {{ dumps(parameter_dict['gawk-location']) }}
backup_wait_time = {{ dumps(parameter_dict['backup_wait_time']) }}
[exporter]
recipe = slapos.recipe.template:jinja2
......
......@@ -50,6 +50,7 @@ mode = 0644
[template-runner-export-configuration]
coreutils-location = ${coreutils:location}
gawk-location = ${gawk:location}
backup_wait_time = ${exporter-default-configuration:backup_wait_time}
[template-runner-export]
recipe = slapos.recipe.template:jinja2
......
......@@ -116,6 +116,6 @@ if diff "$tmp_backup_sum" "$tmp_filtered_signature"; then
exit 0
fi
echo "ERROR: Some backups are not consistent, exporter should be re-run."
echo "Let's sleep 10 minutes, to let the backup end..."
sleep 10m
echo "Let's sleep {{ parameter_dict['backup_wait_time'] }} minutes, to let the backup end..."
sleep {{ parameter_dict["backup_wait_time"] }}m
exit 1
......@@ -121,6 +121,10 @@ download-only = true
filename = monitor-check-resilient-feed.in
mode = 0644
[exporter-default-configuration]
# Time in minutes to wait for the backup to finish
backup_wait_time = 10
[rdiff-backup-build]
# use our own version
find-links = http://www.nexedi.org/static/packages/source/rdiff-backup-1.3.4nxd2.tar.gz
......
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