coren has uploaded a new change for review.
https://gerrit.wikimedia.org/r/155076
Change subject: Dump: make labs-rsync-cron.sh paranoid
......................................................................
Dump: make labs-rsync-cron.sh paranoid
Check that the destination mount (/mnt/dumps) is there before
trying the copy and bail out if it doesn't seem to be there.
Change-Id: I3b69bf5c87d29e94c947ccd6125592ba426f1c8c
---
M modules/dataset/files/labs/labs-rsync-cron.sh
1 file changed, 12 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/76/155076/1
diff --git a/modules/dataset/files/labs/labs-rsync-cron.sh
b/modules/dataset/files/labs/labs-rsync-cron.sh
index af93485..94a3e9e 100644
--- a/modules/dataset/files/labs/labs-rsync-cron.sh
+++ b/modules/dataset/files/labs/labs-rsync-cron.sh
@@ -3,11 +3,16 @@
if [ -z "$running" ]; then
python /usr/local/bin/wmfdumpsmirror.py --remotedir
/data/xmldatadumps/public --localdir /mnt/dumps/public --filesperjob 50
--sizeperjob 5G --workercount 1 --rsynclist
rsync-filelist-last-2-good.txt.rsync --rsyncargs -rlptq
fi
-running=`pgrep -u root -f -x '/usr/bin/rsync -rlpt
/data/xmldatadumps/public/other/incr /mnt/dumps/'`
-if [ -z "$running" ]; then
- /usr/bin/rsync -rlpt /data/xmldatadumps/public/other/incr /mnt/dumps/
-fi
-running=`pgrep -u root -f -x '/usr/bin/rsync -rlpt
/data/xmldatadumps/public/other/pagecounts-raw /mnt/dumps/'`
-if [ -z "$running" ]; then
- /usr/bin/rsync -rlpt /data/xmldatadumps/public/other/pagecounts-raw
/mnt/dumps/
+if [ -d /mnt/dumps/lost+found ]; then
+ running=`pgrep -u root -f -x '/usr/bin/rsync -rlpt
/data/xmldatadumps/public/other/incr /mnt/dumps/'`
+ if [ -z "$running" ]; then
+ /usr/bin/rsync -rlpt /data/xmldatadumps/public/other/incr /mnt/dumps/
+ fi
+ running=`pgrep -u root -f -x '/usr/bin/rsync -rlpt
/data/xmldatadumps/public/other/pagecounts-raw /mnt/dumps/'`
+ if [ -z "$running" ]; then
+ /usr/bin/rsync -rlpt /data/xmldatadumps/public/other/pagecounts-raw
/mnt/dumps/
+ fi
+else
+ echo "$0: mount doesn't appear there. Bailing out!" >&2
+ exit 1
fi
--
To view, visit https://gerrit.wikimedia.org/r/155076
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b69bf5c87d29e94c947ccd6125592ba426f1c8c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits