Commit 746d98d9 authored by Alain Takoudjou's avatar Alain Takoudjou

slaprunner: exclude backup.signature while checking if file changed during export

Runner exporter failed with this message while checking if file changed during backup of instances files:

    < 3226bab4cd318d30cfbde18e6530435dcae3205f94103384ce266c3c73d1afeb  ./runner/instance/slappart2/srv/backup/pbs/slaprunner-slappart1-runner-1/backup.signature
    < 3226bab4cd318d30cfbde18e6530435dcae3205f94103384ce266c3c73d1afeb  ./runner/instance/slappart3/srv/backup/runner/backup.signature
    < 3226bab4cd318d30cfbde18e6530435dcae3205f94103384ce266c3c73d1afeb  ./runner/instance/slappart5/srv/backup/runner/backup.signature
    5248d5244
    < bb3d96876d1d6cecee9878d835e7515215fc5d2a6ae6b647d0e7915c36700b54  ./runner/instance/slappart4/srv/backup/runner/backup.signature
    ERROR: Some backups are not consistent, exporter should be re-run.

This is because instance in webrunner has also backup.signature the file is excluded while doing sha256sum on backup file:

    find -type f ! -name backup.signature -print0 | xargs -0 sha256sum | sort -k 66 > backup.signature

A fix is to exclude backup.signature in `find`.
parent 220411a0
...@@ -30,7 +30,7 @@ md5sum = 7a879739afe55320ee96409bcc8a52ab ...@@ -30,7 +30,7 @@ md5sum = 7a879739afe55320ee96409bcc8a52ab
[template-runner-export-script] [template-runner-export-script]
filename = template/runner-export.sh.jinja2 filename = template/runner-export.sh.jinja2
md5sum = be47acbe610305982168cff6a9eeb9ec md5sum = 231f9b74862f8991f54326511e76f5ec
[instance-runner-export] [instance-runner-export]
filename = instance-runner-export.cfg.in filename = instance-runner-export.cfg.in
......
...@@ -122,7 +122,7 @@ sleep 5 ...@@ -122,7 +122,7 @@ sleep 5
# Getting files from runner backup directory, as instance backup files may be # Getting files from runner backup directory, as instance backup files may be
# explicitely excluded from the backup, using the srv/exporter.exclude # explicitely excluded from the backup, using the srv/exporter.exclude
find -path "./runner/instance/slappart*/srv/backup/*" -type f -print0 | find -path "./runner/instance/slappart*/srv/backup/*" -type f ! -name backup.signature -print0 |
xargs -r0 sha256sum | sort -k 66 > "$tmp_backup_sum" xargs -r0 sha256sum | sort -k 66 > "$tmp_backup_sum"
# If no backup found, it's over # If no backup found, it's over
......
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