Find base image for disposable client in a directory
ClosedPublic

Authored by jskladan on Feb 16 2016, 12:52 PM.

Details

Summary

Instead of just using an image from a pre-defined url, the base image is
looked for in imagesdir, and the latest image of the right type is
selected.
imageurl can be used to override the image discovery, if force_imageurl
is set to True (False by default).
Before we actually can specify the required image's release/flavor/arch
in formula, temporary config options were added.

.

Test Plan

unittests work, yet to be tested locally

Diff Detail

Repository
rLTRN libtaskotron
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jskladan retitled this revision from to Find base image for disposable client in a directory.Feb 16 2016, 12:52 PM
jskladan updated this object.
jskladan edited the test plan for this revision. (Show Details)
jskladan added a reviewer: libtaskotron.
kparal requested changes to this revision.Feb 16 2016, 2:41 PM
kparal added a reviewer: kparal.
kparal added a subscriber: kparal.
kparal added inline comments.
conf/taskotron.yaml.example
121–131

The config file and config_defaults should be kept in sync, can you please put the default URL here as well?

134–136

I'd probably call this minion_* to keep it consistent with minion_repos and other parts. Or we could rename minion_repos to disposable_repos. I just don't want this to be confusingly different.

libtaskotron/ext/disposable/vm.py
73

There seems to be a typo. Is it covered by unit tests? :-)

74–75

It seems a bit off to raise TaskotronRemoteError in this case (we still have no remote machine we would talk to, this code is about images), what about raising the original TaskotronImageNotFoundError? A few lines below, we could also raise TaskotronImageError instead TaskotronRemoteError, and document TaskotronImageError in the method docstring. Then it starts to make more sense.

251

It seems that the usual suffix for raw images is .img, not .raw.

This revision now requires changes to proceed.Feb 16 2016, 2:41 PM
jskladan updated this revision to Diff 1926.Feb 19 2016, 11:25 AM
  • fixed by review comments
conf/taskotron.yaml.example
134–136

Discussed in person - there is a difference in what these do - minion_repos are used on all minions, disposable_* is for disposable minions in particular.

We probably should go through the config file as a whole, and decide on renaming some of the options, before too many people start caring.

jskladan updated this revision to Diff 1927.Feb 19 2016, 11:27 AM
  • fixed by review comments
  • typo
  • typo
kparal accepted this revision.Feb 19 2016, 12:26 PM
This revision is now accepted and ready to land.Feb 19 2016, 12:26 PM
tflink accepted this revision.Feb 19 2016, 2:33 PM
tflink added a reviewer: tflink.
Closed by commit rLTRN3ba67bd98cec: Find base image for disposable client in a directory (authored by Josef Skladanka <jskladan@redhat.com>). · Explain WhyFeb 22 2016, 11:04 AM
This revision was automatically updated to reflect the committed changes.