← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1908507] [NEW] vif quotas not set for tap interface

 

Public bug reported:

Description
===========
Despite vif_inbound_average and vif_outbound_average being set, bandwidth settings are not propagated to an instance xml config in libvirt when using tap interface.

Steps to reproduce
==================
- nova flavor-key network_test set quota:vif_inbound_average=10240
- nova flavor-key network_test set quota:vif_outbound_average=10240
- create VM with said flavor
- verify vm libvirt xml config

Expected result
===============
- <bandwidth> tag is present in instance-id.xml config
- bandwidth via iperf test is being shaped

Actual result
===============
- <bandwidth> tag is not set
- traffic is not limited

Environment
===========
- nova-compute 2:21.1.0-0ubuntu1~cloud0
- libvirt-daemon 6.0.0-0ubuntu8.4~cloud0
- Calico neutron plugin with network_type set to flat
- Libvirt + KVM

Proposed fix
===========
Probably missing "designer.set_vif_bandwidth_config(conf, inst_type)" in method get_config_tap(..)

Logs
===========
nova-compute.log
2020-12-16 13:13:10.202 74913 DEBUG nova.virt.hardware [req-66bf23dd-7486-4e3d-9bda-1f23943f2379 2f8c89255e23468bbd2bd0ea6391a3cd c9604e4b7a0c443eb451181727e4e00a - default default] Getting desirable topologies for flavor Flavor(created_at=2020-12-16T10:20:59Z,deleted=False,deleted_at=None,description=None,disabled=False,ephemeral_gb=0,extra_specs={quota:vif_inbound_average='10240',quota:vif_inbound_peak='10240',quota:vif_outbound_average='10240',quota:vif_outbound_peak='10240'},flavorid='89c4daca-4ef3-4835-83e5-891f8e3c2664',id=204,is_public=True,memory_mb=4096,name='network_test',projects=<?>,root_gb=10,rxtx_factor=1.0,swap=0,updated_at=None,vcpu_weight=0,vcpus=4) and image_meta ImageMeta(checksum='ecf90ee0a6b453638f95c7bfba9d17e2',container_format='bare',created_at=2020-10-07T09:17:40Z,direct_url=<?>,disk_format='qcow2',id=f619fd08-3e7e-4ab8-a9b4-a8a13e575863,min_disk=0,min_ram=0,name='centos-7-chef',owner='c9604e4b7a0c443eb451181727e4e00a',properties=ImageMetaProps,protected=<?>,size=1470693376,status='active',tags=<?>,updated_at=2020-10-07T09:19:45Z,virtual_size=<?>,visibility=<?>), allow threads: True _get_desirable_cpu_topologies /usr/lib/python3/dist-packages/nova/virt/hardware.py:594
...
2020-12-16 13:13:10.235 74913 DEBUG nova.virt.libvirt.vif [req-66bf23dd-7486-4e3d-9bda-1f23943f2379 2f8c89255e23468bbd2bd0ea6391a3cd c9604e4b7a0c443eb451181727e4e00a - default default] vif_type=tap instance=Instance(access_ip_v4=None,access_ip_v6=None,architecture=None,
auto_disk_config=False,availability_zone='dc2',cell_name=None,cleaned=False,config_drive='',created_at=2020-12-16T12:13:30Z,default_ephemeral_device=None,default_swap_device=None,deleted=False,deleted_at=None,device_metadata=None,disable_terminate=False,display_descript
ion='martin-net-test-1',display_name='martin-net-test-1',ec2_ids=EC2Ids,ephemeral_gb=0,ephemeral_key_uuid=None,fault=<?>,flavor=Flavor(204),hidden=False,host='cmp08-dc2.ost.mall.local',hostname='martin-net-test-1',id=35253,image_ref='f619fd08-3e7e-4ab8-a9b4-a8a13e575863
',info_cache=InstanceInfoCache,instance_type_id=204,kernel_id='',key_data='abc123',key_name='molexa',keypairs=KeyPairList,launch_index=0,launched_at=None,launched_on='cmp08-dc2.ost.mall.local',locked=False,locked_by=None,memory_mb=4096,metadata={},migration_context=None,new_flavor=None,node='cmp08-dc2.ost.mall.local',numa_topology=None,old_fl
avor=None,os_type=None,pci_devices=<?>,pci_requests=InstancePCIRequests,power_state=0,progress=0,project_id='c9604e4b7a0c443eb451181727e4e00a',ramdisk_id='',reservation_id='r-48w9d5fs',resources=None,root_device_name='/dev/vda',root_gb=10,security_groups=SecurityGroupLi
st,services=<?>,shutdown_terminate=False,system_metadata={boot_roles='admin,member,reader,heat_stack_owner',image_base_image_ref='f619fd08-3e7e-4ab8-a9b4-a8a13e575863',image_container_format='bare',image_disk_format='qcow2',image_min_disk='10',image_min_ram='0',image_ow
ner_specified.openstack.md5='',image_owner_specified.openstack.object='images/centos-7-chef',image_owner_specified.openstack.sha256='',network_allocated='True',owner_project_name='admin',owner_user_name='admin'},tags=TagList,task_state='spawning',terminated_at=None,trus
ted_certs=None,updated_at=2020-12-16T12:13:05Z,user_data=None,user_id='2f8c89255e23468bbd2bd0ea6391a3cd',uuid=52edff94-41d3-4f9f-bec8-c9e4baaf7473,vcpu_model=VirtCPUModel,vcpus=4,vm_mode=None,vm_state='building') vif={"id": "5b4d0e48-8ed3-4dd8-8fe9-885cdd72685f", "addre
ss": "fa:16:3e:99:79:ad", "network": {"id": "6202dea7-3e5b-4e95-b27d-cef7b89d371f", "bridge": null, "label": "molexa-net", "subnets": [{"cidr": "10.253.194.0/24", "dns": [{"address": "10.223.8.9", "type": "dns", "version": 4, "meta": {}}], "gateway": {"address": "10.253
.194.1", "type": "gateway", "version": 4, "meta": {}}, "ips": [{"address": "10.253.194.241", "type": "fixed", "version": 4, "meta": {}, "floating_ips": []}], "routes": [], "version": 4, "meta": {"dhcp_server": "10.253.194.1"}}], "meta": {"injected": false, "tenant_id": 
"35273428f8f9408381cb5e30a5bb9e4d", "mtu": 1500, "physical_network": "molexa-phys", "tunneled": false}}, "type": "tap", "details": {"connectivity": "legacy", "port_filter": true, "mac_address": "00:61:fe:ed:ca:fe"}, "devname": "tap5b4d0e48-8e", "ovs_interfaceid": null, 
"qbh_params": null, "qbg_params": null, "active": false, "vnic_type": "normal", "profile": {}, "preserve_on_delete": false, "meta": {}} virt_type=kvm get_config /usr/lib/python3/dist-packages/nova/virt/libvirt/vif.py:583
...
    <interface type="ethernet">
      <mac address="fa:16:3e:99:79:ad"/>
      <model type="virtio"/>
      <mtu size="1500"/>
      <target dev="tap5b4d0e48-8e"/>
    </interface>

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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/1908507

Title:
  vif quotas not set for tap interface

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===========
  Despite vif_inbound_average and vif_outbound_average being set, bandwidth settings are not propagated to an instance xml config in libvirt when using tap interface.

  Steps to reproduce
  ==================
  - nova flavor-key network_test set quota:vif_inbound_average=10240
  - nova flavor-key network_test set quota:vif_outbound_average=10240
  - create VM with said flavor
  - verify vm libvirt xml config

  Expected result
  ===============
  - <bandwidth> tag is present in instance-id.xml config
  - bandwidth via iperf test is being shaped

  Actual result
  ===============
  - <bandwidth> tag is not set
  - traffic is not limited

  Environment
  ===========
  - nova-compute 2:21.1.0-0ubuntu1~cloud0
  - libvirt-daemon 6.0.0-0ubuntu8.4~cloud0
  - Calico neutron plugin with network_type set to flat
  - Libvirt + KVM

  Proposed fix
  ===========
  Probably missing "designer.set_vif_bandwidth_config(conf, inst_type)" in method get_config_tap(..)

  Logs
  ===========
  nova-compute.log
  2020-12-16 13:13:10.202 74913 DEBUG nova.virt.hardware [req-66bf23dd-7486-4e3d-9bda-1f23943f2379 2f8c89255e23468bbd2bd0ea6391a3cd c9604e4b7a0c443eb451181727e4e00a - default default] Getting desirable topologies for flavor Flavor(created_at=2020-12-16T10:20:59Z,deleted=False,deleted_at=None,description=None,disabled=False,ephemeral_gb=0,extra_specs={quota:vif_inbound_average='10240',quota:vif_inbound_peak='10240',quota:vif_outbound_average='10240',quota:vif_outbound_peak='10240'},flavorid='89c4daca-4ef3-4835-83e5-891f8e3c2664',id=204,is_public=True,memory_mb=4096,name='network_test',projects=<?>,root_gb=10,rxtx_factor=1.0,swap=0,updated_at=None,vcpu_weight=0,vcpus=4) and image_meta ImageMeta(checksum='ecf90ee0a6b453638f95c7bfba9d17e2',container_format='bare',created_at=2020-10-07T09:17:40Z,direct_url=<?>,disk_format='qcow2',id=f619fd08-3e7e-4ab8-a9b4-a8a13e575863,min_disk=0,min_ram=0,name='centos-7-chef',owner='c9604e4b7a0c443eb451181727e4e00a',properties=ImageMetaProps,protected=<?>,size=1470693376,status='active',tags=<?>,updated_at=2020-10-07T09:19:45Z,virtual_size=<?>,visibility=<?>), allow threads: True _get_desirable_cpu_topologies /usr/lib/python3/dist-packages/nova/virt/hardware.py:594
  ...
  2020-12-16 13:13:10.235 74913 DEBUG nova.virt.libvirt.vif [req-66bf23dd-7486-4e3d-9bda-1f23943f2379 2f8c89255e23468bbd2bd0ea6391a3cd c9604e4b7a0c443eb451181727e4e00a - default default] vif_type=tap instance=Instance(access_ip_v4=None,access_ip_v6=None,architecture=None,
  auto_disk_config=False,availability_zone='dc2',cell_name=None,cleaned=False,config_drive='',created_at=2020-12-16T12:13:30Z,default_ephemeral_device=None,default_swap_device=None,deleted=False,deleted_at=None,device_metadata=None,disable_terminate=False,display_descript
  ion='martin-net-test-1',display_name='martin-net-test-1',ec2_ids=EC2Ids,ephemeral_gb=0,ephemeral_key_uuid=None,fault=<?>,flavor=Flavor(204),hidden=False,host='cmp08-dc2.ost.mall.local',hostname='martin-net-test-1',id=35253,image_ref='f619fd08-3e7e-4ab8-a9b4-a8a13e575863
  ',info_cache=InstanceInfoCache,instance_type_id=204,kernel_id='',key_data='abc123',key_name='molexa',keypairs=KeyPairList,launch_index=0,launched_at=None,launched_on='cmp08-dc2.ost.mall.local',locked=False,locked_by=None,memory_mb=4096,metadata={},migration_context=None,new_flavor=None,node='cmp08-dc2.ost.mall.local',numa_topology=None,old_fl
  avor=None,os_type=None,pci_devices=<?>,pci_requests=InstancePCIRequests,power_state=0,progress=0,project_id='c9604e4b7a0c443eb451181727e4e00a',ramdisk_id='',reservation_id='r-48w9d5fs',resources=None,root_device_name='/dev/vda',root_gb=10,security_groups=SecurityGroupLi
  st,services=<?>,shutdown_terminate=False,system_metadata={boot_roles='admin,member,reader,heat_stack_owner',image_base_image_ref='f619fd08-3e7e-4ab8-a9b4-a8a13e575863',image_container_format='bare',image_disk_format='qcow2',image_min_disk='10',image_min_ram='0',image_ow
  ner_specified.openstack.md5='',image_owner_specified.openstack.object='images/centos-7-chef',image_owner_specified.openstack.sha256='',network_allocated='True',owner_project_name='admin',owner_user_name='admin'},tags=TagList,task_state='spawning',terminated_at=None,trus
  ted_certs=None,updated_at=2020-12-16T12:13:05Z,user_data=None,user_id='2f8c89255e23468bbd2bd0ea6391a3cd',uuid=52edff94-41d3-4f9f-bec8-c9e4baaf7473,vcpu_model=VirtCPUModel,vcpus=4,vm_mode=None,vm_state='building') vif={"id": "5b4d0e48-8ed3-4dd8-8fe9-885cdd72685f", "addre
  ss": "fa:16:3e:99:79:ad", "network": {"id": "6202dea7-3e5b-4e95-b27d-cef7b89d371f", "bridge": null, "label": "molexa-net", "subnets": [{"cidr": "10.253.194.0/24", "dns": [{"address": "10.223.8.9", "type": "dns", "version": 4, "meta": {}}], "gateway": {"address": "10.253
  .194.1", "type": "gateway", "version": 4, "meta": {}}, "ips": [{"address": "10.253.194.241", "type": "fixed", "version": 4, "meta": {}, "floating_ips": []}], "routes": [], "version": 4, "meta": {"dhcp_server": "10.253.194.1"}}], "meta": {"injected": false, "tenant_id": 
  "35273428f8f9408381cb5e30a5bb9e4d", "mtu": 1500, "physical_network": "molexa-phys", "tunneled": false}}, "type": "tap", "details": {"connectivity": "legacy", "port_filter": true, "mac_address": "00:61:fe:ed:ca:fe"}, "devname": "tap5b4d0e48-8e", "ovs_interfaceid": null, 
  "qbh_params": null, "qbg_params": null, "active": false, "vnic_type": "normal", "profile": {}, "preserve_on_delete": false, "meta": {}} virt_type=kvm get_config /usr/lib/python3/dist-packages/nova/virt/libvirt/vif.py:583
  ...
      <interface type="ethernet">
        <mac address="fa:16:3e:99:79:ad"/>
        <model type="virtio"/>
        <mtu size="1500"/>
        <target dev="tap5b4d0e48-8e"/>
      </interface>

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


Follow ups