Move Ignition conversion into qemu API#1284
Conversation
Since the lifetime of the temporary file we generate needs to be bound to the qemu process, teach the qemu API to take an Ignition config directly and do a conversion as necessary. This drops all the now unnecessary conversion stuff from `cmd-run`.
| } | ||
|
|
||
| if kola.Options.IgnitionVersion == "" { | ||
| if kola.Options.IgnitionVersion == "" && kola.QEMUOptions.DiskImage == "" { |
There was a problem hiding this comment.
It took me a while to debug why:
cosa run -d /path/to/rhcos-4.2.0.qcow2
was still getting spec3, it was because I was running from my /srv/walters/fcos builds directory...
I think in the future what we should do is basically synthesize a Build object if provided a --qemu-image and internally always reference that.
| } | ||
|
|
||
| func (inst *QemuInstance) Destroy() { | ||
| if inst.tmpConfig != "" { |
There was a problem hiding this comment.
Also this should be using a memfd_create() or so in the future, need to research Go bindings for that.
|
/approve |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, jlebon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Since the lifetime of the temporary file we generate needs
to be bound to the qemu process, teach the qemu API to
take an Ignition config directly and do a conversion as necessary.
This drops all the now unnecessary conversion stuff from
cmd-run.