New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add machine undertaker worker #6082
Conversation
machineUndertakerName: ifNotMigrating(machineundertaker.Manifold(machineundertaker.ManifoldConfig{ | ||
APICallerName: apiCallerName, | ||
EnvironName: environTrackerName, | ||
NewWorker: machineundertaker.NewWorker, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are likely to find manifold testing a bit easier if you supply NewFacade as a dependency too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
49039b1
to
7467d55
Compare
Well, other than logging.
So I can test worker setup.
No tests yet.
... rather than waiting for the machine to be removed. Also a drive-by fix of some test code that had become nonsensical over time - getContainerInstance was using the OS to choose between identical alternatives.
Plus some small tweaks to the worker to make it easier to test.
7467d55
to
1cde5c1
Compare
1cde5c1
to
cd398d9
Compare
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
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/)