forked from ytoolshed/pogo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtxt
95 lines (71 loc) · 1.81 KB
/
txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
$self->set_host_state( $self->{_hosts}->{$hostname}, "waiting" )
Andy:
callback takes continuation and error continuation
Engine:
- fetch from zookeeper
-
xxx:
/pogo
/ns/<blah>
env (current executing environment)
<slots> = <app,envkey, envalue>
(hosts occupying slot)
host
...
/conf/
app/
<env_k>: N or % (constraint)
/pogo
/job
/p0000..../
hosts/
(hosts of this job)
host: state (i.e. indicates of done)
lock/
....
log/
meta/
submitter: user_id
envkey: "colo"
envval: "sp1", "ac4" ...
* goes through job/ list of hosts not complete already
* goes to namespace /conf/
* zookeeper get children in slot
* grabs the env role, does its own intersection.
* culpa: metadata associated role names
- mail.set = farm13, colo, mud
* Namespace core algorithm
Plugin API
* new
(rolesdb, culpa,
* batched rolesdb calls:
- xset.role =>
host1
host2 => app roles, env roles, cm3, crap
=> tagged in namespace
hostN
namespace: first part of dotted name.
culpa: 60k
- mail.base = app role
- mail.env
role1:
k1: v1
k2: v2
role2:
k1: v1
k2: v2
- or ignore
* e.g. env role: mail.farm.set.sp1-prod-500
colo: sp1
farm: 500
* Appgroups
- in namespace configuration
- mapping roles shortcuts to roles
- lives yaml (uploaded to zookeeper?)
* OS: Zookeeper stores config?
* Job.pm: job_start:
-y: fetches roles
-
* fetch_roles: also does culpa
pogo/server/lib/Pogo/Server/Job.pm line 430
pogo/server/lib/Pogo/Server.pm:447