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
=== modified file 'cronscripts/publishing/cron.publish-copy-archives'
--- cronscripts/publishing/cron.publish-copy-archives 2010-02-25 11:48:33 +0000
+++ cronscripts/publishing/cron.publish-copy-archives 2010-03-01 12:58:16 +0000
@@ -37,7 +37,7 @@
37LAUNCHPADROOT=/srv/launchpad.net/codelines/current37LAUNCHPADROOT=/srv/launchpad.net/codelines/current
38LOCKFILE=/srv/launchpad.net/ubuntu-archive/cron.daily.lock38LOCKFILE=/srv/launchpad.net/ubuntu-archive/cron.daily.lock
39DISTRONAME=ubuntu39DISTRONAME=ubuntu
40TOUCHLIST=$ARCHIVEROOT/project/trace/$(hostname --fqdn)40TRACEFILE=$ARCHIVEROOT/project/trace/$(hostname --fqdn)
4141
42# Manipulate the environment.42# Manipulate the environment.
43export GNUPGHOME43export GNUPGHOME
@@ -76,9 +76,8 @@
76 cp $OVERRIDEROOT/override.* $INDICES76 cp $OVERRIDEROOT/override.* $INDICES
77fi77fi
7878
79# Touch everything you asked us to do.79# Timestamp our trace file to track when the last archive publisher run took
80# place.
80if [ "$LPCONFIG" = "$PRODUCTION_CONFIG" ]; then81if [ "$LPCONFIG" = "$PRODUCTION_CONFIG" ]; then
81 for FILE in $TOUCHLIST; do82 date -u > "$TRACEFILE"
82 touch "$FILE"
83 done
84fi83fi
8584
=== modified file 'cronscripts/publishing/cron.publish-ftpmaster'
--- cronscripts/publishing/cron.publish-ftpmaster 2009-06-24 20:52:01 +0000
+++ cronscripts/publishing/cron.publish-ftpmaster 2010-03-01 12:58:16 +0000
@@ -44,7 +44,7 @@
44LAUNCHPADROOT=/srv/launchpad.net/codelines/current44LAUNCHPADROOT=/srv/launchpad.net/codelines/current
45LOCKFILE=/srv/launchpad.net/ubuntu-archive/cron.daily.lock45LOCKFILE=/srv/launchpad.net/ubuntu-archive/cron.daily.lock
46DISTRONAME=ubuntu46DISTRONAME=ubuntu
47TOUCHLIST=$ARCHIVEROOT/project/trace/$(hostname --fqdn)47TRACEFILE=$ARCHIVEROOT/project/trace/$(hostname --fqdn)
48DSYNCLIST=$CACHEROOT/dsync.list48DSYNCLIST=$CACHEROOT/dsync.list
49MD5LIST=$INDICES/md5sums.gz49MD5LIST=$INDICES/md5sums.gz
5050
@@ -194,11 +194,10 @@
194# fails.194# fails.
195commercial-compat.sh || true195commercial-compat.sh || true
196196
197# Touch everything you asked us to do.197# Timestamp our trace file to track when the last archive publisher run took
198# place.
198if [ "$LPCONFIG" = "$PRODUCTION_CONFIG" ]; then199if [ "$LPCONFIG" = "$PRODUCTION_CONFIG" ]; then
199 for FILE in $TOUCHLIST; do200 date -u > "$TRACEFILE"
200 touch "$FILE"
201 done
202fi201fi
203202
204# Skip long-running processes when doing a quick security run.203# Skip long-running processes when doing a quick security run.