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

Proposed by Jonathan Davies on 2010-03-01
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 on 2010-03-01
Julian Edwards (community) code Approve on 2010-03-01
Francis J. Lacoste release-critical 2010-03-01 Pending
Canonical Launchpad Engineering code 2010-03-01 Pending
Review via email:

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.
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:


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

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.


review: Needs Fixing
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.

Julian Edwards (julian-edwards) wrote :

Great, thanks.

review: Approve (code)
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 @@
40TOUCHLIST=$ARCHIVEROOT/project/trace/$(hostname --fqdn)40TRACEFILE=$ARCHIVEROOT/project/trace/$(hostname --fqdn)
42# Manipulate the environment.42# Manipulate the environment.
43export GNUPGHOME43export GNUPGHOME
@@ -76,9 +76,8 @@
76 cp $OVERRIDEROOT/override.* $INDICES76 cp $OVERRIDEROOT/override.* $INDICES
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
=== 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 @@
47TOUCHLIST=$ARCHIVEROOT/project/trace/$(hostname --fqdn)47TRACEFILE=$ARCHIVEROOT/project/trace/$(hostname --fqdn)
@@ -194,11 +194,10 @@
194# fails.194# fails. || || true
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
204# Skip long-running processes when doing a quick security run.203# Skip long-running processes when doing a quick security run.