Project

General

Profile

Bug #11482

Bug #7161: Support more than 24 HTTP mirrors

Add a random sleep time to the rsync cronjob we suggest mirror operators use

Added by intrigeri about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Infrastructure
Target version:
Start date:
05/24/2016
Due date:
% Done:

100%

Feature Branch:
doc/11482-random-mirrors-sync-time
Type of work:
Contributors documentation
Blueprint:
Starter:
Affected tool:

Description

Now that we have lots of mirrors, having them all sync' at the same time is just a recipe to give them slow transfers, and cause scaling issues on the rsync server's side. Let's try to insert a 0-30 minutes random delay. This has at least 3 aspects:

  • contribute/how/mirror
  • the corresponding Puppet class
  • the release process doc: in order to avoid blocking on all mirrors to have sync'ed, we'll want to point (internal) testers to a specific one that has synced already; if it's not trivial to document how to do that, I'll add an option to check-mirrors to simply return the first up-to-date mirror it sees while trying them in random order, or something.

Associated revisions

Revision 2377bae8 (diff)
Added by intrigeri about 3 years ago

Mirrors doc: add a random sleep time to the rsync cronjob.

The idea here is to avoid 1. slow transfers and 2. scaling issues on the
rsync server's side, caused by all mirrors downloading the new ISO at
the same time during the release process.

refs: #11482

Revision 1f6d28c2 (diff)
Added by intrigeri about 3 years ago

Release process: take into account that not all mirrors sync' at the same time.

refs: #11482

Revision 0bea6b23 (diff)
Added by intrigeri about 3 years ago

Mirroring doc: use higher-level Perl instead of overly complicated arithmetic.

refs: #11482

Revision 7c58c2b5
Added by anonym about 3 years ago

Merge remote-tracking branch 'origin/doc/11482-random-mirrors-sync-time'

Fix-committed: #11482

History

#1 Updated by intrigeri about 3 years ago

  • Status changed from Confirmed to In Progress
  • % Done changed from 0 to 20
  • Feature Branch set to doc/11482-random-mirrors-sync-time

intrigeri wrote:

  • contribute/how/mirror

Done in the topic branch.

  • the corresponding Puppet class

TBD

  • the release process doc [...]

Done in the topic branch.

#2 Updated by intrigeri about 3 years ago

intrigeri wrote:

  • the corresponding Puppet class

Done, pushed straight to the puppet-tails module.

#3 Updated by intrigeri about 3 years ago

  • Assignee changed from intrigeri to anonym
  • Target version changed from Tails_2.5 to Tails_2.4
  • % Done changed from 20 to 50
  • QA Check set to Ready for QA

#4 Updated by anonym about 3 years ago

  • Assignee changed from anonym to intrigeri
  • % Done changed from 50 to 80

It looks good, except the sleep ... stuff involving a bit shift part, so I pushed 91cb966. What do you think?

#5 Updated by anonym about 3 years ago

anonym wrote:

It looks good, except the sleep ... stuff involving a bit shift part, so I pushed 91cb966. What do you think?

Actually, I'd rather avoid the od + /dev/urandom stuff as well, for readability. We don't need cryptographically strong random values so perhaps we should do something a bit simpler:

sleep $(echo "$(date +%N) % (40*60 + 1)" | bc)

(Note: %N is for nanoseconds)

I'm just trying to make it easier for our mirror operators here. All that crazy stuff in that cron line did throw me off.

Alternatively: I guess we always can rely on perl being available, and I'm sure you can come up with a neater and more readable perl one-liner.

#6 Updated by intrigeri about 3 years ago

It looks good, except the sleep ... stuff involving a bit shift part, so I pushed 91cb966. What do you think?

ACK.

#7 Updated by intrigeri about 3 years ago

  • Assignee changed from intrigeri to anonym

Alternatively: I guess we always can rely on perl being available, and I'm sure you can come up with a neater and more readable perl one-liner.

Sure! Done on the branch + in the Puppet module.

#8 Updated by anonym about 3 years ago

  • Status changed from In Progress to Resolved
  • Assignee deleted (anonym)
  • % Done changed from 80 to 100
  • QA Check changed from Ready for QA to Pass

print int(rand(2400))

Technically I think that should be 2400 + 1 but whatever. :) Merged!

Also available in: Atom PDF