← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1254664] Re: Network quotas are ignored by libvirt when Open vSwitch is used

 

** Changed in: nova
       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/1254664

Title:
  Network quotas are ignored by libvirt when Open vSwitch is used

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  I created a flavor with quotas on the network bandwidth and created a
  VM with this flavor: upload limited 1 MB/sec, download limited to 500
  kB/sec. The limits are ignored: copy from DevStack to the VM is faster
  than 13 MB/sec.

  I'm using Neutron with Open vSwitch (OVS) for the network.

  It looks like a regression in nova/virt/libvirt/vif.py. According to a
  colleague, it was maybe introduced when the OVS, LinuxBridge and
  HyperV classes were merged into one LibvirtGenericVIFDriver class.
  designer.set_vif_bandwidth_config() is only called for bridge types:

  - get_config_ovs_hybrid()
  - get_config_ivs_hybrid()
  - network_model.VIF_TYPE_BRIDGE

  Command to create the flavor and create a VM with this flavor:
  ---
  nova flavor-create --ephemeral=1 victor_test_vif 50 256 1 1
  nova flavor-key victor_test_vif set quota:vif_inbound_average=1000
  nova flavor-key victor_test_vif set quota:vif_inbound_peak=1000
  nova flavor-key victor_test_vif set quota:vif_outbound_peak=500
  nova flavor-key victor_test_vif set quota:vif_outbound_average=500
  nova boot --flavor=victor_test_vif --image=cirros-0.3.1-x86_64-uec victor_test
  ---

  Command to start a small and fast TCP server on DevStack, uploading a file of 10 MB:
  ---
  ip netns
  # copy the qrouter-xxx name
  sudo ip netns exec qrouter-128db593-a0db-40c3-84c7-e6383d40c75f bash

  # following commands are executed in the qrouter namespace to reach the VM network
  dd if=/dev/urandom of=random10MB bs=1024 count=10240
  nc -l 0.0.0.0 12345 < random
  ---

  Command to download the file on the VM:
  ---
  time nc 10.0.0.1 12345 > /dev/null
  ---

  Current result: timing smaller than 1 second (faster than 10 MB/sec)

  Expected result: timing higher than 10 second (1 MB/sec or slower)

  
  The problem is that the <bandwidth> tag is not generated in the libvirt.xml file of the VM.

  I will provide a patch.

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