Public bug reported: 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 ** Affects: nova Importance: Medium Assignee: Balazs Gibizer (balazs-gibizer) Status: In Progress ** Tags: doc ** Tags added: doc -- 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): In Progress 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