Incorrect reference to 802.1ad in network_data.json schema
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ironic |
Invalid
|
Undecided
|
Unassigned | ||
OpenStack Compute (nova) |
Fix Released
|
Low
|
Balazs Gibizer |
Bug Description
This affects multiple projects, including nova and ironic, and can (currently, at least) be seen in multiple references to "802.1ad" across multiple projects:
https:/
I'm not sure how, or if it's even appropriate for these projects, to file the bug in multiple places, so I'm filing it where I perceive the error originates, in nova's definition of the network_data.json schema.
802.1ad is a nested VLAN specification, not a bonding mode specification. When referencing VLANs in the above codesearch results, it is used correctly. However, when seen in the context of bonding interfaces, "802.1ad" is not a valid bond mode. It should instead, be "802.3ad" (s/1/3/), indicating the LACP bonding mode.
This can be confirmed a number of ways, including searching for the correct string across projects. This can also be seen by comparing the enum of valid bond modes in the schema to the actual output of the "bonding" kernel module info.
schema enum in what I believe is the corresponding version tag to wallaby:
https:/
output of `modinfo bonding | grep mode:`
parm: mode:Mode of operation; 0 for balance-rr, 1 for active-backup, 2 for balance-xor, 3 for broadcast, 4 for 802.3ad, 5 for balance-tlb, 6 for balance-alb (charp)
Note that the list of modes in the schema enum is almost exactly the same as the list of modes mentioned in the bonding kernel driver info, with the exception of the 802.1ad vs. 802.3ad difference. The list given by the kernel driver is correct.
In terms of expected vs. actual results, my expected result was that using a "bond_mode" of "802.3ad" when setting up a bond link in my network_data.json would not trigger a validation error when validating my JSON against the schema, since "802.3ad" is otherwise a valid bond mode. However, due to this error, it does trigger a validation error:
Message: Value "802.3ad" is not defined in enum.
Schema path: http://
I have not yet attempted to use this network_data.json configuration, so I don't yet know if specifying "802.1ad" results in the correct bonding mode being used anyway. This bug appears to have existed since the introduction of the schema: https:/
Changed in nova: | |
status: | New → Confirmed |
importance: | Undecided → Low |
tags: | added: metadata |
Changed in nova: | |
assignee: | nobody → Balazs Gibizer (balazs-gibizer) |
Changed in ironic: | |
status: | New → Invalid |
As far as I see nova only generates the DNS services to the network_data.json [1]. I can spin up a patch and fix the schema but would be nice to involve those into the review who actually knows about these parts of the metadata.
[1] https:/ /github. com/openstack/ nova/blob/ 50fdbc752a9ca9c 31488140ef2997e d59d861a41/ nova/virt/ netutils. py#L212