diff mbox

[PATH,buildbot] Use --delay-updates on rsync upload to minimize time of inconsistency in the repo

Message ID 1462526044-48322-1-git-send-email-nbd@nbd.name
State Accepted
Headers show

Commit Message

Felix Fietkau May 6, 2016, 9:14 a.m. UTC
During the rsync operation, package lists could go out of sync with the
.ipk files, or a mirror might be pulling an incomplete list of files.
To reduce the chance of this happening, let rsync put all updated files
into place at the end of the transfer

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 master/phase1/master.cfg | 6 +++---
 master/phase2/master.cfg | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

Alexander 'lynxis' Couzens May 6, 2016, 1:34 p.m. UTC | #1
On Fri,  6 May 2016 10:14:04 +0100
Felix Fietkau <nbd@nbd.name> wrote:

> During the rsync operation, package lists could go out of sync with
> the .ipk files, or a mirror might be pulling an incomplete list of
> files. To reduce the chance of this happening, let rsync put all
> updated files into place at the end of the transfer
> 
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
LGTM.
diff mbox

Patch

diff --git a/master/phase1/master.cfg b/master/phase1/master.cfg
index 165c554..b798877 100644
--- a/master/phase1/master.cfg
+++ b/master/phase1/master.cfg
@@ -411,7 +411,7 @@  EOT''' %(ts[0], ts[0], ts[1]) ))
 	factory.addStep(ShellCommand(
 		name = "targetupload",
 		description = "Uploading target files",
-		command=["rsync", "--delete", "-avz", "bin/targets/%s/%s/" %(ts[0], ts[1]), "%s/targets/%s/%s/" %(rsync_url, ts[0], ts[1])],
+		command=["rsync", "--delete", "--delay-updates", "-avz", "bin/targets/%s/%s/" %(ts[0], ts[1]), "%s/targets/%s/%s/" %(rsync_url, ts[0], ts[1])],
 		env={'RSYNC_PASSWORD': rsync_key},
 		haltOnFailure = True,
 		logEnviron = False
@@ -421,7 +421,7 @@  EOT''' %(ts[0], ts[0], ts[1]) ))
 		factory.addStep(ShellCommand(
 			name = "packageupload",
 			description = "Uploading package files",
-			command=["rsync", "--delete", "-avz", "bin/packages/", "%s/packages/" %(rsync_url)],
+			command=["rsync", "--delete", "--delay-updates", "-avz", "bin/packages/", "%s/packages/" %(rsync_url)],
 			env={'RSYNC_PASSWORD': rsync_key},
 			haltOnFailure = False,
 			logEnviron = False
@@ -432,7 +432,7 @@  EOT''' %(ts[0], ts[0], ts[1]) ))
 		factory.addStep(ShellCommand(
 			name = "upload",
 			description = "Uploading logs",
-			command=["rsync", "--delete", "-avz", "logs/", "%s/logs/%s/%s/" %(rsync_url, ts[0], ts[1])],
+			command=["rsync", "--delete", "--delay-updates", "-avz", "logs/", "%s/logs/%s/%s/" %(rsync_url, ts[0], ts[1])],
 			env={'RSYNC_PASSWORD': rsync_key},
 			haltOnFailure = False,
 			alwaysRun = True,
diff --git a/master/phase2/master.cfg b/master/phase2/master.cfg
index 246ef92..e894008 100644
--- a/master/phase2/master.cfg
+++ b/master/phase2/master.cfg
@@ -203,7 +203,7 @@  for arch in arches:
 		name = "packageupload",
 		description = "Uploading package files",
 		workdir = "build/sdk",
-		command = ["rsync", "--delete", "-avz", "bin/packages/%s/" %(arch[0]), "%s/packages/%s/" %(rsync_url, arch[0])],
+		command = ["rsync", "--delete", "--delay-updates", "-avz", "bin/packages/%s/" %(arch[0]), "%s/packages/%s/" %(rsync_url, arch[0])],
 		env={'RSYNC_PASSWORD': rsync_key},
 		haltOnFailure = True,
 		logEnviron = False
@@ -239,7 +239,7 @@  for arch in arches:
 		name = "logupload",
 		description = "Uploading failure logs",
 		workdir = "build/sdk",
-		command = ["rsync", "--delete", "-avz", "faillogs/", "%s/faillogs/%s/" %(rsync_url, arch[0])],
+		command = ["rsync", "--delete", "--delay-updates", "-avz", "faillogs/", "%s/faillogs/%s/" %(rsync_url, arch[0])],
 		env={'RSYNC_PASSWORD': rsync_key},
 		haltOnFailure = False,
 		logEnviron = False