Merge lp:~jpds/launchpad/timestamp-archivepublisher-run into lp:launchpad

Proposed by Jonathan Davies
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jpds/launchpad/timestamp-archivepublisher-run
Merge into: lp:launchpad
Diff against target: 53 lines (+8/-10)
2 files modified
cronscripts/publishing/cron.publish-copy-archives (+4/-5)
cronscripts/publishing/cron.publish-ftpmaster (+4/-5)
To merge this branch: bzr merge lp:~jpds/launchpad/timestamp-archivepublisher-run
Reviewer Review Type Date Requested Status
Tim Penhey (community) release-critical Approve
Julian Edwards (community) code Approve
Francis J. Lacoste release-critical Pending
Canonical Launchpad Engineering code Pending
Review via email: mp+20360@code.launchpad.net

Commit message

Changed cron.publish-ftpmaster and cron.publish-copy-archives to timestamp their trace files instead of just touching them.

To post a comment you must log in.
Revision history for this message
Jonathan Davies (jpds) wrote :

= Summary =

The archivepublisher does not timestamp its trace files, it just touch'es the file. Mean while most of our mirrors timestamp when they synced with 'date -u' in their trace files:

- http://gb.archive.ubuntu.com/ubuntu/project/trace/?C=M;O=D

This branch changes this behaviour to mimic that of the mirrors.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Hi Jonathan

Thanks for doing the change. It would be great if you could add some explanatory text in comments as to why the trace file is needed, it's not obvious to most LP hackers.

The diff looks ok though. How are you going to test it? We could mkdir $ARCHIVEROOT/project/trace/ on dogfood and remove the "if [ "$LPCONFIG" = "$PRODUCTION_CONFIG" ]" check actually.

J

review: Needs Fixing
Revision history for this message
Jonathan Davies (jpds) wrote :

Mostly, trace files are very useful for debugging when a mirror was last updated or in this case the exact time the archivepublisher last ran.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Great, thanks.

review: Approve (code)
Revision history for this message
Tim Penhey (thumper) :
review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cronscripts/publishing/cron.publish-copy-archives'
2--- cronscripts/publishing/cron.publish-copy-archives 2010-02-25 11:48:33 +0000
3+++ cronscripts/publishing/cron.publish-copy-archives 2010-03-01 12:58:16 +0000
4@@ -37,7 +37,7 @@
5 LAUNCHPADROOT=/srv/launchpad.net/codelines/current
6 LOCKFILE=/srv/launchpad.net/ubuntu-archive/cron.daily.lock
7 DISTRONAME=ubuntu
8-TOUCHLIST=$ARCHIVEROOT/project/trace/$(hostname --fqdn)
9+TRACEFILE=$ARCHIVEROOT/project/trace/$(hostname --fqdn)
10
11 # Manipulate the environment.
12 export GNUPGHOME
13@@ -76,9 +76,8 @@
14 cp $OVERRIDEROOT/override.* $INDICES
15 fi
16
17-# Touch everything you asked us to do.
18+# Timestamp our trace file to track when the last archive publisher run took
19+# place.
20 if [ "$LPCONFIG" = "$PRODUCTION_CONFIG" ]; then
21- for FILE in $TOUCHLIST; do
22- touch "$FILE"
23- done
24+ date -u > "$TRACEFILE"
25 fi
26
27=== modified file 'cronscripts/publishing/cron.publish-ftpmaster'
28--- cronscripts/publishing/cron.publish-ftpmaster 2009-06-24 20:52:01 +0000
29+++ cronscripts/publishing/cron.publish-ftpmaster 2010-03-01 12:58:16 +0000
30@@ -44,7 +44,7 @@
31 LAUNCHPADROOT=/srv/launchpad.net/codelines/current
32 LOCKFILE=/srv/launchpad.net/ubuntu-archive/cron.daily.lock
33 DISTRONAME=ubuntu
34-TOUCHLIST=$ARCHIVEROOT/project/trace/$(hostname --fqdn)
35+TRACEFILE=$ARCHIVEROOT/project/trace/$(hostname --fqdn)
36 DSYNCLIST=$CACHEROOT/dsync.list
37 MD5LIST=$INDICES/md5sums.gz
38
39@@ -194,11 +194,10 @@
40 # fails.
41 commercial-compat.sh || true
42
43-# Touch everything you asked us to do.
44+# Timestamp our trace file to track when the last archive publisher run took
45+# place.
46 if [ "$LPCONFIG" = "$PRODUCTION_CONFIG" ]; then
47- for FILE in $TOUCHLIST; do
48- touch "$FILE"
49- done
50+ date -u > "$TRACEFILE"
51 fi
52
53 # Skip long-running processes when doing a quick security run.