Skip to content

Commit 6ea35ab

Browse files
committed
The buildbot and database update script's idea of lock directory was out of sync. Fixed.
- Legacy-Id: 765
1 parent ad1e086 commit 6ea35ab

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

test/test-setup

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ cat $settings_local test/settings_local_test.py > test/settings_local.py
5353

5454
# Acquire lock, to prevent running test and database update at the same time
5555

56-
LOCKDIR=/var/lock/ietfdb
56+
for dir in $DBLOCK /var/lock /var/state /var/run /var/tmp; do
57+
[ -d $dir -a -w $dir ] && lock=$dir/ietfdb && break
58+
done
59+
[ "$lock" ] || die "Couldn't find a directory to keep lock in."
60+
61+
LOCKDIR=$lock
5762
PIDFILE=$LOCKDIR/pid
5863

5964
while true; do

test/update-db

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ done
2121

2222

2323
for dir in $DBLOCK /var/lock /var/state /var/run /var/tmp; do
24-
[ -d $dir -a -w $dir ] && lock=$dir/$program && break
24+
[ -d $dir -a -w $dir ] && lock=$dir/ietfdb && break
2525
done
2626
[ "$lock" ] || die "Couldn't find a directory to keep lock in."
2727

28-
28+
set -x
2929
[ "$DBDUMP" ] || DBDUMP="$1"
3030
[ "$DBDUMP" ] || DBDUMP=/www/tools.ietf.org/events/raw/sqldump/sqldump.raw
3131
[ "$DBFIX" ] || DBFIX=$build/test/sql_fixup.sql
3232
[ "$DBTIME" ] || DBTIME=$state/update-db.time
3333
[ "$DBDONE" ] || DBDONE=$state/update-db.done
3434
[ "$DBLOCK" ] || DBLOCK=$lock
35-
35+
set +x
3636

3737
PIDFILE=$DBLOCK/pid
3838

0 commit comments

Comments
 (0)