Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Add machine undertaker worker #6082
Conversation
fwereade
reviewed
Aug 24, 2016
| + machineUndertakerName: ifNotMigrating(machineundertaker.Manifold(machineundertaker.ManifoldConfig{ | ||
| + APICallerName: apiCallerName, | ||
| + EnvironName: environTrackerName, | ||
| + NewWorker: machineundertaker.NewWorker, |
fwereade
Aug 24, 2016
Contributor
you are likely to find manifold testing a bit easier if you supply NewFacade as a dependency too
babbageclunk
Aug 25, 2016
Member
I haven't done this, since I'd already written the tests for the manifold, and in this case it wasn't too hard to contrive to get an error out of the real API client.
fwereade
reviewed
Aug 24, 2016
| +func (u *Undertaker) Handle(<-chan struct{}) error { | ||
| + removals, err := u.api.AllMachineRemovals() | ||
| + if err != nil { | ||
| + // Should this be a fatal error instead? |
babbageclunk
added some commits
Aug 19, 2016
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit 5de605c
into
juju:master
Aug 30, 2016
babbageclunk
deleted the
babbageclunk:machine-undertaker
branch
Aug 30, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
babbageclunk commentedAug 24, 2016
•
Edited 1 time
-
babbageclunk
Aug 25, 2016
This ensures any necessary provider-level cleanup is done before the machine is fully removed.
In particular, for containers in MAAS we need to release allocated addresses - the container provisioner can't do this because it has no way to talk to the provider directly. So now the provisioner task will mark the machine as ready for removal when its work is completed. This worker watches for the removal request, releases addresses for containers (where the provider supports it), and then removes the machine and associated records. It's expected that other provider-level cleanup like IP address management will be added here.
Fixes http://pad.lv/1585878.
QA steps:
(Review request: http://reviews.vapour.ws/r/5540/)