Initial integration with testcloud to spawn VM instances. Fixes T414
ClosedPublic

Authored by tflink on Jul 31 2015, 8:22 PM.

Details

Summary

This code is most of what we need to start spawning VMs for disposable clients but there are a couple of known issues which will eventually need to be remedied.

  1. There are some conceptual mismatches between this and the recent changes to --ssh flag and config-based setting of remote/local. we'll need to figure out how to make the two concepts play nice with eachother
  2. This uses mock instead of dingus - this is intentional. dingus still doesn't support py3 and I couldn't figure out how to sanely do some of these unit tests with it.
Test Plan

Run tasks on local machine, they have worked as expected, unit tests pass

Diff Detail

Repository
rLTRN libtaskotron
Branch
feature/T414-vm-management
Lint
Lint OK
Unit
Unit Tests OK
Build Status
Buildable 68
Build 68: arc lint + arc unit
tflink retitled this revision from to Initial integration with testcloud to spawn VM instances. Fixes T414.Jul 31 2015, 8:22 PM
tflink updated this object.
tflink edited the test plan for this revision. (Show Details)
tflink added reviewers: kparal, jskladan, mkrizek, lbrabec.
tflink added a comment.Aug 6 2015, 4:48 PM

To run this, you will need testcloud and its deps installed via rpm or in a virtualenv. If your user is not an administrator, you may also need to mess with polkit.

tflink updated this revision to Diff 1289.Aug 7 2015, 2:30 PM
  • fixes to get disposable client working with current state of disposable-develop
tflink updated this revision to Diff 1290.Aug 7 2015, 2:31 PM

fixing base

tflink added a comment.Aug 7 2015, 2:32 PM

OK, that should work with --libvirt and the current state of disposable-develop.

Another thing required is a password-less ssh keypair named conf/id_taskotron(.pub)

kparal accepted this revision.Aug 7 2015, 3:08 PM

It would be great to add instructions how to create the ssh keys and configure them somewhere.

In general, this seems to work, so thumbs up here. We can fix the minor issues later.

libtaskotron/runner.py
27

For brevity, I'd call this just libtaskotron.vm. But both works.

131

Is there a need to hardcode this? It should be possibly to use --ssh-privkey cmdline option and ssh_privkey config file option, unless there is a bug somewhere.

151

We might add

# FIXME: implement --no-destroy (per T408)

here.

This revision is now accepted and ready to land.Aug 7 2015, 3:08 PM
tflink added inline comments.Aug 7 2015, 3:22 PM
libtaskotron/runner.py
27

are you suggesting a rename of the module or doing a from libtaskotron import virtualmachine as vm?

131

working around the 'no sane default' part for now, i'll see if I can get something better

tflink added inline comments.Aug 7 2015, 3:23 PM
libtaskotron/runner.py
131

nvm, was thinking backwards.

tflink closed this revision.Aug 10 2015, 12:34 PM

For some reason, this wasn't autoclosed with the ticket

In D482#9263, @tflink wrote:

For some reason, this wasn't autoclosed with the ticket

I guess there must not be any extra leading spaces in the commit message before the Differential Revision field.