Comment 3 for bug 1817079

Revision history for this message
Alvaro Uria (aluria) wrote :

Hi, I copy here the review added in Gerrit:

I find Gerrit change 639121 dangerous. configure_sriov will set sriov_numvfs to 0, then N on every config-changed or neutron-plugin-relation-changed hook. This means that instances using VFs will lose connectivity in case any change is done via Juju.
https://github.com/openstack/charm-neutron-openvswitch/blob/bd1cc362f139f4854872a7eb87a62c4fc8273dbf/hooks/neutron_ovs_hooks.py#L99:L124

Number of VFs should only be changed when an interface goes from "down" operstate to "up" (after a reboot, or manual ip link set). Alternatively, an action could be run to force the setting.

In xenial, we currently use the following shell script (/etc/network/if-up.d/99vnf_sriov):
"""
if [ "$IFACE" = "eno2" ]; then
    cat /sys/class/net/eno2/device/sriov_totalvfs > /sys/class/net/eno2/device/sriov_numvfs
fi
"""

So, change is only applied on ifup. I think a possible approach could be to add a config param "action-managed-sriov-numvfs", which will allow changing the "ifup" script but won't apply the change live until an action is run. If the config param is disabled, then change would also be applied as in the proposed change.