rename dsa-puppet-stuff to puppet-crontab
[mirror/dsa-puppet.git] / modules / roles / files / static-mirroring / OVERVIEW
1
2 - static-update-component is run by the user on the source host.
3   If not run under sudo as the staticuser already, it sudos to the staticuser,
4   re-execing itself.  It them sshs to the static-master for that component to
5   run static-master-update-component.
6
7   LOCKING:
8     none, but see static-master-update-component
9
10 - static-master-update-component is run on the static-master.
11   It rsyncs the contents from the source host to the static master, and then
12   triggers static-master-run to push the content to the mirrors.
13
14   The sync happens to a new <component>-updating.incoming-XXXXXX directory.  On
15   sync success, <component> is replaced with that new tree, and the
16   static-master-run trigger happens.
17
18   LOCKING:
19     - exclusive locks are held on
20       - <component>.lock
21
22 - static-master-run triggers all the mirrors for a component to initiate syncs.
23   When all mirrors have an up-to-date tree, they are instructed to update
24   the cur-> symlink to the new tree.
25
26   To begin with, static-master-run copies <component> to <component>-current-push.
27   This is the tree all the mirrors then sync from.  If the push was successful,
28   <component>-current-push is renamed to <component>-current-live.
29
30   LOCKING:
31     - exclusive locks are held on
32       - <component>.lock
33
34 - static-mirror-run runs on a mirror and syncs components.
35   There is a symlink called 'cur' that points to either tree-a or tree-b for
36   each component.  the cur tree is the one that is live, the other one usually
37   does not exist, except when a sync is ongoing (or a previous one failed and
38   we keep a partial tree).
39
40   During a sync, we sync to the tree-<X> that is not the live one.  When instructed by
41   static-master-run, we update the symlink and remove the old tree.
42
43   static-mirror-run rsyncs either -current-push or -current-live for a component.
44
45   LOCKING:
46     during all of static-mirror-run, we keep an exclusive lock on the <component>
47     dir, i.e., the directory that holds tree-[ab] and cur.
48
49 - static-mirror-run-all
50
51   Run static-mirror-run for all components on this mirror, fetching the -live- tree.
52
53   LOCKING:
54     none, but see static-mirror-run.
55
56 - staticsync-ssh-wrap
57
58   wrapper for ssh job dispatching on source, master, and mirror.
59
60   LOCKING:
61     - on master, when syncing -live- trees:
62         a shared lock is held on <component>.lock during
63         the rsync process.