trunk_details missing sub port MAC addresses for LIST

Bug #2020552 reported by Matthew Booth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Confirmed
Low
Unassigned

Bug Description

When returning port details, trunk_details.sub_ports should contain:
* segmentation_id
* segmentation_type
* port_id
* mac_address

This is the case when GETting a single port, but when listing ports mac_address is missing.

In the following:
* Parent port: a47df912-1cba-458c-9bb9-00cd3d71b9e6
* Trunk: 70f314f8-5577-4b98-be9c-68bbe3791d7f
* Sub port: d11793a9-8862-4378-a1fe-045f04dad841

GET request:

> curl -s -H "X-Auth-Token: $OS_TOKEN" "https://rhos-d.infra.prod.upshift.rdu2.redhat.com:13696/v2.0/ports/a47df912-1cba-458c-9bb9-00cd3d71b9e6" | jq
{
  "port": {
    ...
    "trunk_details": {
      "trunk_id": "70f314f8-5577-4b98-be9c-68bbe3791d7f",
      "sub_ports": [
        {
          "segmentation_id": 100,
          "segmentation_type": "vlan",
          "port_id": "d11793a9-8862-4378-a1fe-045f04dad841",
          "mac_address": "fa:16:3e:88:29:a0"
        }
      ]
    },
    ...
  }
}

LIST request returning the same port:

> curl -s -H "X-Auth-Token: $OS_TOKEN" "https://rhos-d.infra.prod.upshift.rdu2.redhat.com:13696/v2.0/ports?id=a47df912-1cba-458c-9bb9-00cd3d71b9e6" | jq
{
  "ports": [
    {
      ...
      "trunk_details": {
        "trunk_id": "70f314f8-5577-4b98-be9c-68bbe3791d7f",
        "sub_ports": [
          {
            "segmentation_id": 100,
            "segmentation_type": "vlan",
            "port_id": "d11793a9-8862-4378-a1fe-045f04dad841"
          }
        ]
      },
      ...
    }
  }
}

Note that mac_address is missing for the LIST request.

* Version: Little bit of guesswork going on here, but Nova reports a latest microversion of 2.79, which corresponds to Train.

Tags: api
Revision history for this message
Mamatisa Nurmatov (isabek) wrote :

Checked on Train environment and confirmed

Changed in neutron:
status: New → Confirmed
importance: Undecided → Low
tags: added: api
Revision history for this message
yatin (yatinkarel) wrote :

@mbooth thanks for the bug report. So i checked and the behavior is intentionally to optimize the requests as part of [1], see the commits [2].

Can you also share more context on if this is causing some issue on nova side or it was just an observation?

[1] https://bugs.launchpad.net/neutron/+bug/1905268
[2] https://review.opendev.org/q/Ic08e4049f6156c0700ca3c7aee251b6eb0eb97da

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hi @mbooth:

As Yatin commented, that was intentionally optimized to avoid the subport query. If needed, you can propose to have an additional parameter in the list command (if that is something acceptable in the CLI project) and you can create an extension to the trunk details API request, adding this extra info. Of course, this API call will be much slower.

I would mark this bug as a RFE.

Regards.

Revision history for this message
Matthew Booth (mbooth-9) wrote :

No, this is fine. It was just unexpected as the difference is not documented. Documenting that this is deliberate would be just as good.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.