Code review comment for lp://staging/~ev/ubuntu-ci-services-itself/pythonise-integration-test-runner

Revision history for this message
Evan (ev) wrote :

Note to self: this needs a little bit of work to check the machine still exists before attempting to destroy it:

ERROR no machines were destroyed: machine 11 does not exist
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File /usr/lib/python2.7/atexit.py, line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File ./tests/run.py, line 60, in destroy_services
    _destroy_machine(machine)
  File ./tests/run.py, line 32, in _destroy_machine
    subprocess.check_output(['juju', 'destroy-machine', machine, '--force'])
  File /usr/lib/python2.7/subprocess.py, line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['juju', 'destroy-machine', '11', '--force']' returned non-zero exit status 1

We should find a way to use python-jujuclient for this instead of calling juju directly.

« Back to merge proposal