Conversation
Aletibazo
commented
Feb 23, 2026
- Add support for OVS and OVS + DPDK interfaces for infra VMs
- Add qemu-guest-agent to infra VM template
- Add SEARCH_DOMAIN as supported context parameter
- Install opennebula-node-kvm and configure libvirt as part of infra tasks
- Add support for OVS and OVS + DPDK interfaces for infra VMs - Add qemu-guest-agent to infra VM template - Add SEARCH_DOMAIN as supported context parameter - Install opennebula-node-kvm and configure libvirt as part of infra tasks Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
| {% if use_dpdk %} | ||
| <hugepages/> | ||
| {% endif %} | ||
| {% if use_virtiofs and not use_dpdk %} |
There was a problem hiding this comment.
This logic looks incomplete, what happens if both use_virtiofs and use_dpdk are true, virtiofs stops working? If those 2 things are indeed in conflict I think it should be clearly resolved which one takes precedence. 🤔
There was a problem hiding this comment.
When both are true the hugepages configuration will take place. This is enough for virtiofs, since it requires shared memory but does not require that it's type=memfd. In case only virtiofs is enabled we use memfd since we cannot asume the host has hugepages configured
There was a problem hiding this comment.
Please take a look here https://libvirt.org/kbase/virtiofs.html#sharing-a-host-directory-with-a-guest
<memoryBacking>
<source type='memfd'/>
<access mode='shared'/>
</memoryBacking>In the template
{% set use_dpdk = (infra_bridge_type is defined and infra_bridge_type == 'openvswitch_dpdk') %}
{% set use_virtiofs = ('virtiofs' in (passthrough_fs | map(attribute='driver_type') | map('default', None) | select | map('lower'))) %}
{% if use_dpdk or use_virtiofs %}
<memoryBacking>
{% if use_dpdk %}
<hugepages/>
{% endif %}
{% if use_virtiofs and not use_dpdk %}
<source type='memfd'/>
{% endif %}
<access mode='shared'/>
</memoryBacking>
{% endif %}So if you set infra_bridge_type: 'openvswitch_dpdk' then this line <source type='memfd'/> will simply vanish. So what I mean is if dpdk requires that option removed, then fine, ansible should throw an error if both are enabled, no? 🤔
Unless you've tested that original docs are incorrectly suggesting memory config. If so then fine. 👍 😇
There was a problem hiding this comment.
Docs are correct when they suggest the use of memfd type. But in the case you enable hugepages, you already have shared memory configured, which is enough to meet virtiofs requirement. As far as I know, hugepages and memfd are mutually exclusive.
Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
|
@Aletibazo This is really optional, but since this is called "Improve infra role" maybe we could rename *.j2 templates to *.jinja as it is the new recommended naming. For example my neovim no longer recognizes *.j2 files.. 🥹 |
Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>