Reviewed:  https://review.opendev.org/c/openstack/nova/+/933636
Committed: 
https://opendev.org/openstack/nova/commit/df4cb00b719b819ab95a4b80deb598d79f34b6e8
Submitter: "Zuul (22348)"
Branch:    master

commit df4cb00b719b819ab95a4b80deb598d79f34b6e8
Author: Balazs Gibizer <g...@redhat.com>
Date:   Tue Oct 29 11:04:38 2024 +0100

    [doc]Add `socket` option to [pci]alias numa_policy
    
    The numa_policy field in the pci alias supports the same value as the
    flavor extra_spec hw:pci_numa_affinity_policy but the config doc was not
    updated when the socket value is implemented.
    
    Closes-Bug: #2085824
    Change-Id: I997d10638020fc9d60e784e64e395e6e0a9c9430


** Changed in: nova
       Status: In Progress => 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/2085824

Title:
  The documentation of [pci]alias numa_policy does not state the socket
  option

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  The doc
  https://docs.openstack.org/nova/latest/configuration/config.html#pci.alias
  states:

  numa_policy
  Required NUMA affinity of device. Valid values are: legacy, preferred and 
required.

  But the code uses a json schema[1][2] to validate the field value:

          "numa_policy": {
              "type": "string",
              "enum": list(obj_fields.PCINUMAAffinityPolicy.ALL),

  where the enum contains[3] socket as well:

  
  class PCINUMAAffinityPolicy(BaseNovaEnum):

      REQUIRED = "required"
      LEGACY = "legacy"
      PREFERRED = "preferred"
      SOCKET = "socket"

      ALL = (REQUIRED, LEGACY, PREFERRED, SOCKET)

  
  However the original spec does not mention that the change affects the 
[pci]alias as well[4]. But our PCI passthrough documentation[5] does state that 
the value of the flavor extra spec can be used for the [pci]alias config as 
well:

  
  You can also configure this for PCI passthrough devices by specifying the 
policy in the alias configuration via pci.alias. For more information, refer to 
the documentation.

  
  So I conclude that this a config doc bug.

  
[1]https://github.com/openstack/nova/blob/a8733bae3c1e27ae30de30cfc6f4c9a72d7c5ca1/nova/pci/request.py#L120-L136
  
[2]https://github.com/openstack/nova/blob/a8733bae3c1e27ae30de30cfc6f4c9a72d7c5ca1/nova/pci/request.py#L105-L107
  
[3]https://github.com/openstack/nova/blob/a8733bae3c1e27ae30de30cfc6f4c9a72d7c5ca1/nova/objects/fields.py#L813-L820
  
[4]https://specs.openstack.org/openstack/nova-specs/specs/wallaby/implemented/pci-socket-affinity.html
  
[5]https://docs.openstack.org/nova/latest/admin/pci-passthrough.html#pci-numa-affinity-policies

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


-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to