Publisher should set modification times on Releases et al
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Launchpad itself |
Low
|
Colin Watson | ||
| | ubuntu-archive-publishing |
Low
|
Colin Watson | ||
Bug Description
Due to caching and such, the slew between Packages/
Below is the hack that syncproxy does to implement the fix, with the side effect that all of those files were never current. The diff is the current fix to make it stop hacking files a day after the pocket is published the final time (release). It continues to hack on the files for 1 day after their final publishing, then they magically snap back to the as-published times.
The correct fix is to have the publisher emit the files with the same modification timestamp.
lamont
=== modified file 'mirrorsupporte
--- mirrorsupported.sh 2012-05-29 22:09:58 +0000
+++ mirrorsupported.sh 2012-08-06 16:35:55 +0000
@@ -123,9 +123,10 @@
echo "$(date -R): Cleaning up day-old filelists to expire stay-of-execution."
find filelists/ -mtime +1 | xargs rm -fv
+# See RT52121: only touch things that are less than a day old
CURRENTTIME=$(date +%Y%m%d%H%M)
find ${DISTDIR} \( -name 'Packages*' -o -name 'Sources*' -o -name 'Release*' \) -print0 | xargs -0 ls -ld > ${ROOTDIR}
-find ${DISTDIR} \( -name 'Packages*' -o -name 'Sources*' -o -name 'Release*' \) -print0 | xargs -0 touch -t ${CURRENTTIME}
+find ${DISTDIR} ! -mtime +1 \( -name 'Packages*' -o -name 'Sources*' -o -name 'Release*' \) -print0 | xargs -0 touch -t ${CURRENTTIME}
echo "$(date -R): Critical mirror operations completed."
savelog -c 750 $LOGFILE
Related branches
- Benji York (community): Approve (code) on 2012-08-20
-
Diff: 466 lines (+65/-82)11 files modifiedlib/lp/archivepublisher/deathrow.py (+4/-10)
lib/lp/archivepublisher/domination.py (+5/-36)
lib/lp/archivepublisher/model/ftparchive.py (+6/-11)
lib/lp/archivepublisher/publishing.py (+24/-17)
lib/lp/archivepublisher/scripts/generate_ppa_htaccess.py (+1/-2)
lib/lp/archivepublisher/tests/archive-signing.txt (+0/-1)
lib/lp/archivepublisher/tests/test_debversion.py (+0/-1)
lib/lp/archivepublisher/tests/test_generate_contents_files.py (+1/-1)
lib/lp/archivepublisher/tests/test_generate_extra_overrides.py (+1/-1)
lib/lp/archivepublisher/tests/test_publisher.py (+22/-0)
lib/lp/archivepublisher/utils.py (+1/-2)
- William Grant: Approve (code) on 2015-09-28
-
Diff: 98 lines (+45/-10)2 files modifiedlib/lp/archivepublisher/publishing.py (+7/-9)
lib/lp/archivepublisher/tests/test_publisher.py (+38/-1)
| Changed in launchpad: | |
| status: | New → Triaged |
| importance: | Undecided → Low |
| tags: | added: soyuz-publish |
| Adam Conrad (adconrad) wrote : | #1 |
| Colin Watson (cjwatson) wrote : | #2 |
I think it'd be better to do that post-processing directly in the publisher. I have a patch in the works.
| Changed in launchpad: | |
| status: | Triaged → In Progress |
| assignee: | nobody → Colin Watson (cjwatson) |
| Launchpad QA Bot (lpqabot) wrote : | #3 |
Fixed in stable r15836 <http://
| tags: | added: qa-needstesting |
| Changed in launchpad: | |
| status: | In Progress → Fix Committed |
| Colin Watson (cjwatson) wrote : | #4 |
While this doesn't break (and thus is deployable), it also doesn't appear to actually fix the bug.
| tags: |
added: qa-ok removed: qa-needstesting |
| Changed in launchpad: | |
| status: | Fix Committed → In Progress |
| Colin Watson (cjwatson) wrote : | #5 |
Actually, the only reason this didn't appear to fix the bug on dogfood was that the call to _syncTimestamps is incorrectly behind a check for whether there's a signing key, so this will work on production. I'll land a follow-up branch to make the fix visible on dogfood too.
| Changed in launchpad: | |
| status: | In Progress → Triaged |
| Colin Watson (cjwatson) wrote : | #6 |
revno: 71
fixes bug: https:/
committer: Colin Watson <email address hidden>
branch nick: ubuntu-
timestamp: Sat 2015-09-26 02:01:27 +0100
message:
Make signatures have the same timestamp as the unsigned files, to aid cache configuration.
| Changed in ubuntu-archive-publishing: | |
| status: | New → In Progress |
| importance: | Undecided → Low |
| assignee: | nobody → Colin Watson (cjwatson) |
| status: | In Progress → Fix Released |
| Changed in launchpad: | |
| status: | Triaged → In Progress |
| Launchpad QA Bot (lpqabot) wrote : | #7 |
Fixed in stable r17766 <http://
| tags: |
added: qa-needstesting removed: qa-ok |
| Changed in launchpad: | |
| status: | In Progress → Fix Committed |
| tags: |
added: qa-ok removed: qa-needstesting |
| Changed in launchpad: | |
| status: | Fix Committed → Fix Released |

And by "emit the files with the same modification timestamp" (which is impossible to do), what lamont means is that we need to post-process in finalize.d to touch Release* /Packages* /Sources* for all the dirty pockets we just published. Should be a pretty trivial patch.