|
state: machines now have Jobs not Workers
Approach as agreed with niemeyer on IRC. Main point is to avoid encoding
assumptions about the workers in state: state knows what jobs an agent has
to do, and jujud knows what tasks to run to accomplish those jobs. Type is
int also at niemeyer's request; this is to allow us to refine job names in
future without disturbing running installations (assuming the responsibilities
do change in a sane way, at least).
Since I was making this change, I observed that it was trivial to fix one of
the machine-zero warts: we now mark the bootstrap machine agent off-limits
to units merely by omitting JobHostUnits. Local assignment still uses
explicit machine 0, and I'm not sure that's entirely sensible, but I think
the local assignment code is kinda speculative anyway so it seems foolish to
distract myself with it.
The bulk of this change is just s/MachinerWorker/JobHostUnits/; the more
interesting bits are in cmd/jujud/machine.go and state/assign_test.go
(and ofc state/machine.go).
https://code.launchpad.net/~fwereade/juju-core/machine-agent-jobs/+merge/140202
Requires: https://code.launchpad.net/~fwereade/juju-core/machine-agent-deployer/+merge/140174
(do not edit description out of merge proposal)
Total comments: 11
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+170 lines, -153 lines) |
Patch |
 |
A |
[revision details]
|
View
|
1
2
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/ssh_test.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
cmd/juju/status_test.go
|
View
|
1
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
cmd/jujud/bootstrap.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
cmd/jujud/bootstrap_test.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
cmd/jujud/machine.go
|
View
|
1
|
1 chunk |
+13 lines, -16 lines |
0 comments
|
Download
|
 |
M |
cmd/jujud/machine_test.go
|
View
|
1
|
5 chunks |
+6 lines, -10 lines |
0 comments
|
Download
|
 |
M |
state/api/api_test.go
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
state/assign_test.go
|
View
|
1
|
21 chunks |
+41 lines, -33 lines |
0 comments
|
Download
|
 |
M |
state/life_test.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
state/machine.go
|
View
|
1
|
3 chunks |
+14 lines, -4 lines |
0 comments
|
Download
|
 |
M |
state/machine_test.go
|
View
|
1
|
9 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
 |
M |
state/service_test.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
state/state.go
|
View
|
1
|
3 chunks |
+13 lines, -21 lines |
0 comments
|
Download
|
 |
M |
state/state_test.go
|
View
|
1
2
|
10 chunks |
+26 lines, -27 lines |
0 comments
|
Download
|
 |
M |
state/tools_test.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
state/unit.go
|
View
|
1
|
3 chunks |
+18 lines, -5 lines |
0 comments
|
Download
|
 |
M |
state/unit_test.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
worker/deployer/deployer_test.go
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
worker/firewaller/firewaller_test.go
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
worker/provisioner/provisioner_test.go
|
View
|
1
|
11 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
Total messages: 6
|