feat(fwcfg): add new DataSource for QEMU fw_cfg device blobs#6913
feat(fwcfg): add new DataSource for QEMU fw_cfg device blobs#6913hw-claudio wants to merge 1 commit into
Conversation
|
@hw-claudio Cloud-init already supports QEMU in several different ways. Can you please tell me why you think that the broader cloud-init community needs this feature? |
|
Hello @holmanb , in terms of the general usefulness of the feature from my perspective, it provides a data source that does not require changing the disk configuration of the VM (.iso), does not require any network capability and any external infrastructure. It is the most straightforward way to pass the parameters if qemu is used as a hypervisor as can be seen by the limited amount of code needed, since the linux guest driver already prepares the blobs in sysfs to be used. I am building a very lightweight "peer to peer" virtualization platform, so removing complexity is the advantage for the specific project I am working on. Once this is added I would propose this to cloudbase-init as well, so that in combination with the virtio fw_cfg drivers this can be used on Windows as well. |
|
This PR doesn't pass mypy typing, has no integration testing, has no documentation, has no commitment of support from anyone, and there is exactly one prospective project that might use it. This new feature re-implements an existing feature - the value proposition is a simplified deployment story. Your hope is that upstream will document it, test it, fix bugs, upgrade it across Python versions and Qemu changes, provide releases for it, and maintain it forever. Is that right? |
|
I saw this feature as already requested, and the feedback from this community was, "yes, we need this, this just needs implementation". Maybe you can explain this apparent disconnect. If you are actually willing to collaborate, on your points: 1 - mypy typing: I can look into it and fix it. https://bugs.launchpad.net/bugs/1879294 4 - On the prospective use: there is very clear precedent for this architecture because it's better than what cloud-init does now, ie changing the VM to add ISOs, passing kernel command line strings and misusing SMBIOS serial numbers. Ignition uses this very same mechanism for the same high level goals: This is being used in production at scale in Fedora CoreOS and RHCOS. The linux sysfs driver is now widely available, which means that the required code to maintain in cloud-init is minimal as you can see from the actual code in this PR. I can help with the maintenance of it if necessary. If however my efforts here are not needed, I understand, please let me know so I can look at alternatives. Thank you. |
1cd9c24 to
513a5fc
Compare
allow sourcing the data from sysfs as exposed by the linux guest fw_cfg driver in /sys/firmware/qemu_fw_cfg/ - add new cloudinit/sources/DataSourceQemuFwCfg.py - add unit test test_qemufwcfg.py and list it in test_common.py - add "cloudinit.sources.DataSourceQemuFwCfg" to pyproject.toml - add "QemuFwCfg" to the datasource_list in cloudinit/settings.py - add "QemuFwCfg" to ds-identify - add documentation in doc/rtd/reference/datasources/qemufwcfg.rst - add reference to doc file in doc/rtd/reference/datasources.rst - add integration test test_qemufwcfg.py Fixes: GH 3684 Fixes: GH 3133 Signed-off-by: Claudio Fontana <claudio.fontana@gmail.com>
|
I added documentation and an integration test, took some time to get the integration test into the green. Let me know if there are more technical issues I should fix. In terms of adoption I cannot do much more beyond what I have mentioned, including the willingness to fixup issues should they arise in the future. |
allow sourcing the data from sysfs as exposed by the linux guest fw_cfg driver in /sys/firmware/qemu_fw_cfg/
Fixes: GH 3684
Fixes: GH 3133
Proposed Commit Message
Additional Context
Test Steps
Merge type