← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1925388] Re: Incorrect reference to 802.1ad in network_data.json schema

 

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

commit 0b05b838a47f4c05ecf8443ec48a6d6b2670f579
Author: Balazs Gibizer <balazs.gibizer@xxxxxxxx>
Date:   Thu Apr 29 17:42:59 2021 +0200

    Fix bond_mode enum 802.1ad -> 802.3ad
    
    This seems to me a clerical error made a long time ago in the spec [1].
    The 802.1ad values does not seems to be a valid bonding mode but 802.3ad
    does.
    
    This patch fixes the schema in the nova doc. No test are changed as nova
    does not generate this part of the network metadata.
    
    [1] https://specs.openstack.org/openstack/nova-specs/specs/kilo/approved/metadata-service-network-info.html#rest-api-impact
    
    Change-Id: I0055d13b055e34372a8186008ba75be68aa2edf9
    Closes-Bug: #1925388


** 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/1925388

Title:
  Incorrect reference to 802.1ad in network_data.json schema

Status in Ironic:
  New
Status in OpenStack Compute (nova):
  Fix Released

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://codesearch.opendev.org/?q=802%5C.1ad&i=nope&files=&excludeFiles=&repos=

  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://opendev.org/openstack/nova/src/tag/23.0.0/doc/api_schemas/network_data.json#L177

  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://openstack.org/nova/network_data.json#/definitions/bond/properties/bond_mode/enum

  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://specs.openstack.org/openstack
  /nova-specs/specs/liberty/implemented/metadata-service-network-
  info.html

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


References