Commit fa8b6eaa authored by Hardik Juneja's avatar Hardik Juneja Committed by Rafael Monnerat

slaprunner: Export (rsync) silence rsync warning

When a file is removed while rsync is running (after build the list and before transfer the file), rsync fail with the follow message:

     rsync warning: some files vanished before they could be transferred

Long back rafael proped a solution here 387d3b7e
But it seems like adding --ignore-missing-args dont really help but just ignore the files given in args and are counldn't be found anymore.

/reviewed-on !225
parent a75824aa
...@@ -31,7 +31,7 @@ md5sum = 5cfa49bcf20612844e1c50a85740d0b3 ...@@ -31,7 +31,7 @@ md5sum = 5cfa49bcf20612844e1c50a85740d0b3
[template-runner-export-script] [template-runner-export-script]
filename = template/runner-export.sh.jinja2 filename = template/runner-export.sh.jinja2
md5sum = 94c0eddb2af3290942f64e04f95a707c md5sum = 78b2454951e6dbe124612eafebcf5690
[instance-runner-export] [instance-runner-export]
filename = instance-runner-export.cfg.in filename = instance-runner-export.cfg.in
......
...@@ -19,9 +19,21 @@ etc_directory='{{ directory["etc"] }}' ...@@ -19,9 +19,21 @@ etc_directory='{{ directory["etc"] }}'
tmp_directory='{{ directory["tmp"] }}' tmp_directory='{{ directory["tmp"] }}'
rsync () { rsync () {
# Workaround for bug https://bugzilla.samba.org/show_bug.cgi?id=3653
IGNOREEXIT=24
IGNOREOUT='^(file has vanished: |rsync warning: some files vanished before they could be transferred)'
set -o pipefail
set -x set -x
'{{ rsync_binary }}' -rlptgov --stats --safe-links --ignore-missing-args --delete --delete-excluded "$@" '{{ rsync_binary }}' -rlptgov --stats --safe-links --ignore-missing-args --delete --delete-excluded "$@" 2>1 | (egrep -v "$IGNOREOUT" || true)
set +x set +x
ret=$?
if [[ $ret == $IGNOREEXIT ]]; then
ret=0
fi
exit $ret
} }
( (
......
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