createhdds: use a temp file for virt-builder image creation
ClosedPublic

Authored by adamwill on May 20 2016, 4:06 PM.

Details

Summary

Creating the virt-builder images directly with their final file
name means that if we're rebuilding them for age and the build
fails, we'll lose the existing image: it seems better to keep
it than have no image at all, when this happens. It also means
that while the rebuild is in process, the file might exist but
be useless and cause any tests that happen to be running at the
time to fail. So just like the guestfs images, create the file
with a .tmp extension initially and rename it after a successful
build.

Test Plan

Do some image builds and check they work, check that
temp file is cleaned up on failure and ctrl-c if you can...

Diff Detail

Repository
rOPENQA fedora_openqa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamwill retitled this revision from to createhdds: use a temp file for virt-builder image creation.May 20 2016, 4:06 PM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: jskladan, garretraziel.
adamwill updated this revision to Diff 2210.May 20 2016, 10:17 PM

add some timeouts for virt-builder too

garretraziel accepted this revision.May 23 2016, 11:13 AM

Looks OK.

This revision is now accepted and ready to land.May 23 2016, 11:13 AM
This revision was automatically updated to reflect the committed changes.