I added some debug logs to '/etc/puppet/modules/l23network/lib/puppet/provider/l2_port/sriov.rb' and got this:
root@node-2:~# grep -E 'Setting numvfs for|Value of numvfs for' /tmp/puppet.log
Debug: L2_port[enp1s0f0](provider=sriov): Value of numvfs for 'enp1s0f0' is different '63' != '0'
Debug: L2_port[enp1s0f0](provider=sriov): Setting numvfs for 'enp1s0f0' to '0'
Debug: L2_port[enp1s0f0](provider=sriov): Setting numvfs for 'enp1s0f0' to '0'
Debug: L2_port[enp1s0f1](provider=sriov): Value of numvfs for 'enp1s0f1' is different '63' != '0'
Debug: L2_port[enp1s0f1](provider=sriov): Setting numvfs for 'enp1s0f1' to '0'
Debug: L2_port[enp1s0f1](provider=sriov): Setting numvfs for 'enp1s0f1' to '0'
If I set 'sriov_numvfs' to 0 for all SR-IOV NICs and run netconfig.pp again then VFs are configured properly, because the following code isn't executed:
1. Create cluster with VLAN segmentation
2. Add 1 controller node and 1 compute node with NICs which support SR-IOV
3. Enable SR-IOV on some compute's NICs, set VFs number to max value (sriov_numvfs == sriov_totalvfs)
4. Deploy environment
5. SSH to compute and run 'puppet apply /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig.pp'
Expected result: sriov_numvfs value for SR-IOV enabled NICs isn't changed
Actual result: sriov_numvfs is set to 0 for all SR-IOV enabled NICs
Fuel version info (9.0 liberty): http:// paste.openstack .org/show/ 490838/
Re-deployment fails on 'sriov_iommu_check' task, because 'netconfig' doesn't configure NICs with enabled SR-IOV properly:
root@node-2:~# echo 63 > /sys/class/ net/enp1s0f0/ device/ sriov_numvfs net/enp1s0f1/ device/ sriov_numvfs modules/ osnailyfacter/ modular/ netconfig/ sriov_iommu_ check.rb modules/ osnailyfacter/ modular/ netconfig/ netconfig. pp &> /tmp/puppet.log net/enp1s0f0/ device/ sriov_numvfs /sys/class/ net/enp1s0f1/ device/ sriov_numvfs net/enp1s0f1/ device/ sriov_numvfs
root@node-2:~# echo 63 > /sys/class/
root@node-2:~# ruby /etc/puppet/
OK: SR-IOV and IOMMU are properly configured for enp1s0f0 interface
OK: SR-IOV and IOMMU are properly configured for enp1s0f1 interface
root@node-2:~#
root@node-2:~# puppet apply -d /etc/puppet/
root@node-2:~# echo $?
0
root@node-2:~# cat /sys/class/
0
0
root@node-2:~# ifdown enp1s0f1
root@node-2:~# ifup enp1s0f1
root@node-2:~# cat /sys/class/
63
I added some debug logs to '/etc/puppet/ modules/ l23network/ lib/puppet/ provider/ l2_port/ sriov.rb' and got this:
root@node-2:~# grep -E 'Setting numvfs for|Value of numvfs for' /tmp/puppet.log enp1s0f0] (provider= sriov): Value of numvfs for 'enp1s0f0' is different '63' != '0' enp1s0f0] (provider= sriov): Setting numvfs for 'enp1s0f0' to '0' enp1s0f0] (provider= sriov): Setting numvfs for 'enp1s0f0' to '0' enp1s0f1] (provider= sriov): Value of numvfs for 'enp1s0f1' is different '63' != '0' enp1s0f1] (provider= sriov): Setting numvfs for 'enp1s0f1' to '0' enp1s0f1] (provider= sriov): Setting numvfs for 'enp1s0f1' to '0'
Debug: L2_port[
Debug: L2_port[
Debug: L2_port[
Debug: L2_port[
Debug: L2_port[
Debug: L2_port[
If I set 'sriov_numvfs' to 0 for all SR-IOV NICs and run netconfig.pp again then VFs are configured properly, because the following code isn't executed:
https:/ /github. com/openstack/ fuel-library/ blob/master/ deployment/ puppet/ l23network/ lib/puppet/ provider/ l2_port/ sriov.rb# L23-L24 /github. com/openstack/ fuel-library/ blob/master/ deployment/ puppet/ l23network/ lib/puppet/ provider/ l2_port/ sriov.rb# L28-L30
https:/
Steps to reproduce:
1. Create cluster with VLAN segmentation modules/ osnailyfacter/ modular/ netconfig/ netconfig. pp'
2. Add 1 controller node and 1 compute node with NICs which support SR-IOV
3. Enable SR-IOV on some compute's NICs, set VFs number to max value (sriov_numvfs == sriov_totalvfs)
4. Deploy environment
5. SSH to compute and run 'puppet apply /etc/puppet/
Expected result: sriov_numvfs value for SR-IOV enabled NICs isn't changed
Actual result: sriov_numvfs is set to 0 for all SR-IOV enabled NICs