Automatically release and power-off maas nodes at the end of a job #382
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Some maas-deployed systems use a lot of power. Rather than leaving them on between jobs, we should power them off automatically when the job is complete. The cleanup step is currently only used to ensure the agent container is removed, but can also be used for operations specific to the device connector.
Resolved issues
CERTTF-427
Documentation
There are some new log messages saying that the node was released. But there's nothing the user needs to do to activate this, it will happen automatically once the job is complete or cancelled.
Web service API changes
N/A
Tests
Tested on a maas deployed node. Attached images on jira card show the job being run, and then the maas screen showing that the device was released and powered off.