[poudriere] graceful handling of temporary connectivity loss?

zirias@

Developer
My current ISP enforces a reconnect every 24 hours. Yes, that's really stupid nowadays, and I had quite some fight with their "support", debunking any explanation they tried to give me why this would be "necessary", but to no avail. I was offered the right to immediately terminate the contract. I decided to keep it anyways for a while... well, whatever, that's the situation, and AFAIK, there are still lots of ISPs employing that practice.

The problem is, this results in several seconds each night without internet connectivity.

Now, it sometimes happens to exactly hit the "fetch" phase of a port during a poudriere bulk run. That's annoying cause it immediately fails this build.

My question is: Is there an option, either in poudriere or in the ports framework, that would allow to add some retries to fetching?
 
covacat might be a suitable idea to "solve" this myself. It won't cover everything (custom fetch target?), but would be a start ;)

edit: after reading bsd.port.mk, it probably makes more sense to override FETCH_BINARY ;)
 
edit: after reading bsd.port.mk, it probably makes more sense to override FETCH_BINARY ;)
probably yes
you catch some extra fetch flags
Code:
#!/bin/sh
H=$(date +%H)
RETR=1
SLEEP=10
FETCH=/usr/bin/fetch
# change this to only try retries  at night ?
# [ $H -gt 24 ] && exec $FETCH $@

while [  $RETR  -ge 0 ]
 do
 $FETCH $@
 FETCH_EXIT=$?
 [ $FETCH_EXIT -eq 0 ] && exit 0
 [ $RETR -eq 0 ] && exit $FETCH_EXIT
 echo $RETR retries left
 echo SLEEPING $SLEEP && sleep $SLEEP
 RETR=$(($RETR - 1))
 done
something like this seem to work for basic stuff
 
I was about to hack together something similar, but am still in a meeting (day job) ... well, thanks, will give it a try ;)
 
Back
Top