Need an option to tell testflinger to either power down or release systems from MAAS when done

Bug #1889484 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Testflinger
New
Undecided
Unassigned

Bug Description

I understand the idea behind leaving ssytems powered on and accessible after testflinger completes its run, but it would be helpful to also have a means to release the node from MAAS after a run is complete, if one desires.

Perhaps an option in the yaml provision_data section like so:

provision_data:
    distro: bionic
    release_afterwards: true

with false as the default so that nodes are only released and/or shut down if one explicitly requests it in the yaml

Partly this is because it becomes easier for other people to know if testflinger is actually doing something when they want to manually grab a machine and may not know how to ask testflinger if it's currently testing a node, and partly because servers consume a lot of power so leaving them up and idling 24/7 is just a waste of money.

OR perhaps a better (though arguably more complex) option woudl be the above but like so:

provision_data:
    distro: bionic
    release_on_success: true

where if the exit code for whatever you run in test_data is 0, e.g.:
echo "Starting actual test run now"
        PYTHONUNBUFFERED=1 checkbox-cli master $DEVICE_IP launcher
        EXITCODE=$?

then testflinger assumes all is good and the node can be released, or if EXITCODE is anything else, testflinger leaves the node running assuming someone will want to investigate.

And of course, that would all be optional if release_on_success is true.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.