Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 670458 - nightheron's /release/bin/copy_buildsync.sh breaks in-progress uploads
Summary: nightheron's /release/bin/copy_buildsync.sh breaks in-progress uploads
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Infrastructure
Classification: Unclassified
Component: Dev box issues (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Infrastructure
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-06 06:37 UTC by Matt Turner
Modified: 2018-11-21 19:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Turner gentoo-dev 2018-11-06 06:37:00 UTC
nightheron's /release/bin/copy_buildsync.sh script is run every 15 minutes to sweep uploaded stages and isos to the mirrors.

If an upload is in progress when this script runs, the upload fails:

rsync: stat "/release/weekly/builds/ppc/.stage3-ppc64-20181106T003020Z.tar.xz.Va0TuV" failed: No such file or directory (2)
rsync: rename "/release/weekly/builds/ppc/.stage3-ppc64-20181106T003020Z.tar.xz.Va0TuV" -> "stage3-ppc64-20181106T003020Z.tar.xz": No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]

I have only heard of this happening on ppc.

How should we handle this? Upload a lock file and delete it after the uploads are complete?

Restricting to devs, since I'm not sure if any of this should be kept private.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2018-11-08 22:32:01 UTC
unlocking, no private details here.
per #gentoo-infra discussion, i pointed where you can debug it more and fix it by ignoring rsync tempfiles.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2018-11-21 07:14:02 UTC
Please review the fixes on this branch, including your proposed fix:
https://gitweb.gentoo.org/proj/releng.git/log/?h=bug-670458
Comment 3 Larry the Git Cow gentoo-dev 2018-11-21 19:13:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/releng.git/commit/?id=c9ad265f80178b8786974e0d1e250daa42e6a742

commit c9ad265f80178b8786974e0d1e250daa42e6a742
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2018-11-21 06:43:38 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2018-11-21 19:07:26 +0000

    scripts/copy_buildsync: try to exclude rsync tempfile
    
    In-progress uploads are named .<filename>.<rsynctemp> and were
    mistakenly recognized by copy_buildsync.sh as targets to sweep to the
    mirrors. When it did, it deleted the file causing the in-progress upload
    to fail.
    
    Since the script is run by cron every 15 minutes, this would lead to a
    large portion of the generated installation media to fail to upload, and
    worse there is no pattern to it -- it just happens whenever an upload
    spans the 15 minute boundary.
    
    The fix is to ignore hidden files and to tell rsync (via the filter
    rules) to exclude them from its sweep to the mirrors.
    
    Closes: https://bugs.gentoo.org/670458
    Signed-off-by: Matt Turner <mattst88@gentoo.org>
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

 scripts/copy_buildsync.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)