Introspection fails when LLDP Chassis ID is not a MAC address

Bug #1748022 reported by Bob Fournier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic Inspector
Fix Released
High
Dmitry Tantsur

Bug Description

We've had a report of introspection failing with the following error:
Introspection of node 3d68b5f6-0077-43eb-9991-bf5ceb4f1ccd completed. Status:FAILED. Errors:Unexpected exception BadRequest during processing: Expected a MAC address or OpenFlow datapath ID but received 128.0.128.34. (HTTP 400)

The exception is being raised here: https://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/types.py#L323

as the local_link_connection requires a MAC or datapath ID.

This was from a POC and we were not able to get any introspection data or other logs. However it appears that the local_link_collection plugin may be setting the local_link_connection switch_id to a non mac address when using processed lldp data. It should be ignoring any chassis ids which are not macs.

https://github.com/openstack/ironic-inspector/blob/master/ironic_inspector/plugins/local_link_connection.py#L97

I believe this was introduced in Pike with this change - https://review.openstack.org/#/c/431141/

Bob Fournier (bfournie)
Changed in ironic-inspector:
assignee: nobody → Bob Fournier (bfournie)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic-inspector (master)

Fix proposed to branch: master
Review: https://review.openstack.org/542214

Changed in ironic-inspector:
status: New → In Progress
Dmitry Tantsur (divius)
Changed in ironic-inspector:
importance: Undecided → High
Changed in ironic-inspector:
assignee: Bob Fournier (bfournie) → Dmitry Tantsur (divius)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic-inspector (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/543961

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic-inspector (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/543964

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic-inspector (master)

Reviewed: https://review.openstack.org/542214
Committed: https://git.openstack.org/cgit/openstack/ironic-inspector/commit/?id=97282c64e97485fb40d7c64413745c74e6ead942
Submitter: Zuul
Branch: master

commit 97282c64e97485fb40d7c64413745c74e6ead942
Author: Bob Fournier <email address hidden>
Date: Thu Feb 8 09:13:21 2018 -0500

    Only set switch_id in local_link_connection if it is a mac address

    When the processed lldp data is used for setting the local_link_connection
    switch_id, it will set it even if the Chassis ID is not a mac. Need to
    only set it when the ChassisId is a mac address, as is done when using
    non-processed lldp data. Ironic validates that switch_id is either a
    mac address or OpenFlow datapath ID.

    This fixes a regresssion introduced in Pike.

    Change-Id: I566acb5b19852b541df7554870ab2666f7df9614
    Closes-Bug: 1748022

Changed in ironic-inspector:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic-inspector (stable/queens)

Reviewed: https://review.openstack.org/543961
Committed: https://git.openstack.org/cgit/openstack/ironic-inspector/commit/?id=9a88ac5e29847e0f38e1ed26789b31eb0c0b0f0a
Submitter: Zuul
Branch: stable/queens

commit 9a88ac5e29847e0f38e1ed26789b31eb0c0b0f0a
Author: Bob Fournier <email address hidden>
Date: Thu Feb 8 09:13:21 2018 -0500

    Only set switch_id in local_link_connection if it is a mac address

    When the processed lldp data is used for setting the local_link_connection
    switch_id, it will set it even if the Chassis ID is not a mac. Need to
    only set it when the ChassisId is a mac address, as is done when using
    non-processed lldp data. Ironic validates that switch_id is either a
    mac address or OpenFlow datapath ID.

    This fixes a regresssion introduced in Pike.

    Change-Id: I566acb5b19852b541df7554870ab2666f7df9614
    Closes-Bug: 1748022
    (cherry picked from commit 97282c64e97485fb40d7c64413745c74e6ead942)

tags: added: in-stable-queens
tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic-inspector (stable/pike)

Reviewed: https://review.openstack.org/543964
Committed: https://git.openstack.org/cgit/openstack/ironic-inspector/commit/?id=35828784d5124dfc66842a790282f9f7d03251fe
Submitter: Zuul
Branch: stable/pike

commit 35828784d5124dfc66842a790282f9f7d03251fe
Author: Bob Fournier <email address hidden>
Date: Thu Feb 8 09:13:21 2018 -0500

    Only set switch_id in local_link_connection if it is a mac address

    When the processed lldp data is used for setting the local_link_connection
    switch_id, it will set it even if the Chassis ID is not a mac. Need to
    only set it when the ChassisId is a mac address, as is done when using
    non-processed lldp data. Ironic validates that switch_id is either a
    mac address or OpenFlow datapath ID.

    This fixes a regresssion introduced in Pike.

    Change-Id: I566acb5b19852b541df7554870ab2666f7df9614
    Closes-Bug: 1748022
    (cherry picked from commit 97282c64e97485fb40d7c64413745c74e6ead942)
    (cherry picked from commit 9a88ac5e29847e0f38e1ed26789b31eb0c0b0f0a)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic-inspector 7.2.0

This issue was fixed in the openstack/ironic-inspector 7.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic-inspector 6.0.2

This issue was fixed in the openstack/ironic-inspector 6.0.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic-inspector 7.3.0

This issue was fixed in the openstack/ironic-inspector 7.3.0 release.

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.