← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1832452] Re: NumaTopolgyFilter dosen't work as we expected when pci_numa_policy set as 'legacy'

 

>From https://review.opendev.org/#/c/664838/1/nova/pci/stats.py@a272 it
sounds like the "preferred" policy is what the user wanted.

** Changed in: nova
       Status: In Progress => Invalid

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

Title:
  NumaTopolgyFilter dosen't work as we expected when pci_numa_policy set
  as 'legacy'

Status in OpenStack Compute (nova):
  Invalid

Bug description:
  Description
  ===========
  In NumaTopologyFilter, we set 'pci_numa_policy=legacy' and 'hw:numa_nodes=1' in flavor, it will causes vm build failed when cpu located in numa1 and pci located in numa0 in compute node. In pci numa affinity policies, 'required' means allocated pci devices must be distributed at same numa node, 'legacy' means allocated pci devices should be distributed at same numa nodes if available, and 'preferred' is do not provider anything with stricter affinity to allocate pci devices. But it dosen't work as definition in practice.
  I found a logic error in filter pools for numa cells, 'legacy' will use filter pools but dosen't care numa has available pci devices which is same numa with cpu.
  So I change the condition 'or' to 'and', it has worked as we expected. 

  
  Steps to reproduce
  ==================
  1. Configuration
  controller node 
  --- nova.conf ---
  [filter_scheduler]
  enabled_filters=...,NUMATopologyFilter
  [pci]
  alias = {"name": "QuickAssist","product_id": "10ed","vendor_id": "8086","device_type": "type-VF","numa_policy": "legacy"}

  compute node 
  lspci -vv | grep sriov_nic_bus_info # get the numa cell of sriov nic, suppose as numa0
  ---- nova.conf -----
  [DEFAULT]
  vpcu_pin_set = 25,26,27,28 # numa1
   
  2. create a sriov instance
  # create a sriov port
  $ neutron port-create --vnic-type direct network_id
  # create a flavor like this
  +----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | Property                   | Value                                                                                                                                                                                       |
  +----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | OS-FLV-DISABLED:disabled   | False                                                                                                                                                                                       |
  | OS-FLV-EXT-DATA:ephemeral  | 0                                                                                                                                                                                           |
  | disk                       | 20                                                                                                                                                                                          |
  | extra_specs                | {"hw:pci_numa_policy": "legacy", "hw:vif_multiqueue_enabled": "true", "hw:numa_nodes": "1", "hw:cpu_cores": "4", "pci_passthrough:alias": "QuickAssist:1"} |
  | id                         | 430e1afd-a72b-41c6-b9b2-ea9b6aa9f037                                                                                                                                                        |
  | name                       | multiqueue                                                                                                                                                                                  |
  | os-flavor-access:is_public | True                                                                                                                                                                                        |
  | ram                        | 2048                                                                                                                                                                                        |
  | rxtx_factor                | 1.0                                                                                                                                                                                         |
  | swap                       |                                                                                                                                                                                             |
  | vcpus                      | 4                                                                                                                                                                                           |
  +----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  # create a sriov instance
  $ nova boot sriov_numa_policy_test --image 762c8dbe-8ce7-4311-bb93-1b99c7a49f2a --flavor 430e1afd-a72b-41c6-b9b2-ea9b6aa9f037 --nic port-id=e74210c9-67be-45cb-9874-587ea19c5317 --availability-zone sriov_zone:node1

  
  Expected result
  ===============
  create a instance

  
  Actual result
  =============
  create failed, nova-scheduler.log:"'NUMATopologyFilter: (start: 1, end: 0)']"

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


References