← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1533876] Re: plug_vhostuser may fail due to device not found error when setting mtu

 

** Changed in: nova/mitaka
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1533876

Title:
  plug_vhostuser may fail due to device not found error when setting mtu

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) liberty series:
  Fix Released
Status in OpenStack Compute (nova) mitaka series:
  Fix Released

Bug description:
  Setting the mtu of a vhost-user port with the ip command will cause vms to fail
  to boot with a device not found error as vhost-user prots are not represented as
  kernel netdevs.

  this bug is present in stable/kilo, stable/liberty and master and i would like to ask that it be back ported if accepted
  and fixed in master.

  when using vhost-user with ovs-dpdk the vhost-user port is plugged
  into ovs by nova using a non atomic call to
  linux_net.create_ovs_vif_port to add an ovs port followed by a second
  call to linux_net.ovs_set_vhostuser_port_type to update the port type.

  https://github.com/openstack/nova/blob/1bf6a8760f0ef226dba927b62d4354e248b984de/nova/virt/libvirt/vif.py#L652-L655

  the reuse of the create_ovs_vif_port has an untended concequece of introducing an error where
  the ip tool is invoked to try and set the mtu on the userspace vhost-user interface which dose not exist
  as a kernel netdev.
  https://github.com/openstack/nova/blob/1bf6a8760f0ef226dba927b62d4354e248b984de/nova/network/linux_net.py#L1379

  this results in the in the call to set_device_mtu throwing an exception as the ip comand exits with code 1
  https://github.com/openstack/nova/blob/1bf6a8760f0ef226dba927b62d4354e248b984de/nova/network/linux_net.py#L1340-L1342

  as a result the second function call to ovs_set_vhostuser_port_type
  is never maid and the vm fails to boot.

  to resolve this issue i would like to introduce a new function to inux_net.py
  create_ovs_vhostuser_port  which will create the vhostuser port as an atomic action
  and will not set the mtu similar to the impentation in the os-vif vhost-user driver

  https://github.com/jaypipes/vif_plug_vhostuser/blob/8ac30ce32b3e0bae5d2d8f1edc9d64ac2871608e/vif_plug_vhostuser/linux_net.py#L34-L46

  an alternitive solution would be to add "1" to the retrun code check here https://github.com/openstack/nova/blob/master/nova/network/linux_net.py#L1339  or catch the exception here https://github.com/openstack/nova/blob/1bf6a8760f0ef226dba927b62d4354e248b984de/nova/virt/libvirt/vif.py#L652
   however neither solve the underlying cause.

  this was observed with kilo openstack  on ubuntu 14.04 with ovs-dpdk
  deployed with puppet/fule.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1533876/+subscriptions


References