Closed sazzle2611 closed 1 year ago
Hi Sarah Well it's always a good idea to fix bugs upstream, thats opensource !! Can you show me the resulting network xml with youre fix ?
Hi @trefzer Not totally sure what you mean, do you just mean the xml generated by the template after the changes I made?
<network>
<name>sr-iov-net-1</name>
<forward mode="hostdev" managed='yes'>
<pf dev='enp3s0f0' />
</forward>
</network>
Just for info I have now changed line 4 to this as we got a server that doesn't use SR-IOV VF's so needed it to work with bridge as well
<forward<%-if @forward_dev -%> dev='<%= @forward_dev -%>'<%-end-%> mode='<%= @forward_mode -%>'<%-if @forward_interfaces.empty? -%>/<%-end-%> <%-if @forward_mode == 'hostdev' -%>managed='yes'<%-end-%>>
The change in the whole line is adding
<%-if @forward_mode == 'hostdev' -%>managed='yes'<%-end-%>
Thanks
I will not fix this in the 'old' template used until now. If you switch to version 5.0.0 (currently in preview #64) you can use the new generic template, which is more flexible and lets you define:
libvirt::create_networks:
sr-iov-net-1:
template: 'generic'
forward:
managed: 'yes'
mode: 'hostdev'
pf:
dev: 'enp3s0f0'
Which generates the xml shown above (the sorting of elements/attributes is different since we do not use execs anymore which needs 'normalize' (=sort) the generated XML's).
Hi,
We installed this module a few years ago and it's been working perfectly. I have just upgraded it and realised that I had to edit a couple of things originally to make it work for us, this was v3.0.0, but as I wanted the latest module I copied the old to another place and ran the upgrade to v4.3.2 with the option --ignore-changes
I then came across the same errors I had before, sorry should have submitted a ticket then. So our setup uses SR-IOV network interfaces with hostdev
The error was
The changes that I needed to make to your module were in templates/network.xml.erb
Line 4
and Line 7
and this is the hiera config that caused the issue
It's not a big issue for us as we have fixed it but we will obviously come up against it every time we upgrade so would really appreciate it if it can be looked at at some point. Either that or tell us a better config that works ;)
We are in the process of installing a couple of new servers so if you want us to test anything in the next couple of days then we are more than happy to but after that they will probably be in production so wont be possible.
Thanks, Sarah