slaprunner: fix resiliency exporter script
- slaprunner: skip non valid partition folder while backuping instance
If instance/slappartXX is not a folder but file, skip chdir else import/export fail with a message like:
/srv/slapgrid/slappart18/bin/runner-exporter run at : Thu Oct 4 04:30:03 CEST 2018
Traceback (most recent call last):
File "<stdin>", line 17, in <module>
OSError: [Errno 20] Not a directory: '/srv/slapgrid/slappart18/srv//runner/instance/slappart5-mariadb.dump.sql.gz'
-
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
.