Commit 637e5d33 authored by Alain Takoudjou's avatar Alain Takoudjou

slaprunner: fix resiliency exporter script

/reviewed-on !418
parents 253c6d4e 746d98d9
......@@ -22,7 +22,7 @@ md5sum = e12255a8c946b3eb8c6373fff481339f
[template-runner-import-script]
filename = template/runner-import.sh.jinja2
md5sum = 92ac3f6982dec97e3b2df90f97111bd3
md5sum = bdfcf6edc20cc9f390b3e34e2531377b
[instance-runner-import]
filename = instance-runner-import.cfg.in
......@@ -30,7 +30,7 @@ md5sum = 7a879739afe55320ee96409bcc8a52ab
[template-runner-export-script]
filename = template/runner-export.sh.jinja2
md5sum = d9b110db2a35c88c9eb8f87c2d2cad21
md5sum = 231f9b74862f8991f54326511e76f5ec
[instance-runner-export]
filename = instance-runner-export.cfg.in
......
......@@ -56,7 +56,12 @@ if 1:
print("*.pid")
print(".installed*.cfg")
for partition in glob.glob(path + "/instance/slappart*"):
try:
os.chdir(partition)
except OSError as e:
if e.errno != errno.ENOTDIR:
raise
continue
try:
with open("srv/exporter.exclude") as f:
exclude = f.readlines()
......@@ -117,7 +122,7 @@ sleep 5
# Getting files from runner backup directory, as instance backup files may be
# 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"
# If no backup found, it's over
......
......@@ -69,7 +69,12 @@ if 1:
print("*.pid")
print(".installed*.cfg")
for partition in glob.glob(path + "/instance/slappart*"):
try:
os.chdir(partition)
except OSError as e:
if e.errno != errno.ENOTDIR:
raise
continue
try:
with open("srv/exporter.exclude") as f:
exclude = f.readlines()
......
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