bracketed IPv6 redfish_address - Failed to resolve the hostname ([2001:DB8::2:3d82]) for node <node_uuid>

Bug #2036455 reported by Harald Jensås
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
High
Harald Jensås
Ironic Inspector
Fix Released
High
Harald Jensås

Bug Description

When 'redfish_address' is an IPv6 address with brackets - i.e [2001:DB8::2:3d82] - introspection fails with the following error.

2023-09-15 20:29:07.217 2 ERROR ironic_inspector.utils [-] [node: 5cd1abfd-72b8-49a1-83f9-9800dce45b7d] Failed to resolve the hostname ([2001:DB8::2:3d82]) for node 5cd1abfd-72b8-49a1-83f9-9800dce45b7d: socket.gaierror: [Errno -2] Name or service not known
2023-09-15 20:29:07.219 2 DEBUG ironic_inspector.main [req-ed6ce3c6-8fe1-49af-a1a8-9d0ce8374669 c5a74279c56842eb8b68422d4aac349b b01731f9054c46f29bb1f6056284ffab - default default] Returning error to client: Failed to resolve the hostname ([2001:DB8::2:3d82]) for node 5cd1abfd-72b8-49a1-83f9-9800dce45b7d error_response /usr/lib/python3.9/site-packages/ironic_inspector/main.py:136

Revision history for this message
Dmitry Tantsur (divius) wrote :

Yep, we probably don't handle this case, neither in Inspector nor in the migrated code in Ironic (adding it too).

Changed in ironic-inspector:
status: New → Triaged
importance: Undecided → High
Changed in ironic:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Harald Jensås (harald-jensas) wrote :
Changed in ironic-inspector:
status: Triaged → In Progress
Changed in ironic-inspector:
assignee: nobody → Harald Jensås (harald-jensas)
Changed in ironic:
assignee: nobody → Harald Jensås (harald-jensas)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/ironic/+/895807

Changed in ironic:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.opendev.org/c/openstack/ironic/+/895807
Committed: https://opendev.org/openstack/ironic/commit/21e3e71ea39dc8a9fee1f1cb432586ed45d181f9
Submitter: "Zuul (22348)"
Branch: master

commit 21e3e71ea39dc8a9fee1f1cb432586ed45d181f9
Author: Harald Jensås <email address hidden>
Date: Tue Sep 19 13:19:49 2023 +0200

    inspect_utils, handle bracketed IPv6 redfish addr

    If redfish_address is in brackets, unwrap it and check
    that it is a valid IPv6 address. If that is the case use
    the unwrapped address to avoid "Name or service not known".

    Also add a unit test for normal_ipv6_as_url.

    Closes-Bug: #2036455
    Change-Id: I8df20e85e40d8321bd5f88c09fae33b6015bcf51

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

Reviewed: https://review.opendev.org/c/openstack/ironic-inspector/+/895734
Committed: https://opendev.org/openstack/ironic-inspector/commit/278ba52bf99a0f0c60224e518c6d952c2ac93698
Submitter: "Zuul (22348)"
Branch: master

commit 278ba52bf99a0f0c60224e518c6d952c2ac93698
Author: Harald Jensås <email address hidden>
Date: Mon Sep 18 20:19:03 2023 +0200

    Handle bracketed IPv6 redfish_address

    If redfish_address is in brackets, unwrap it
    and check that it is a valid IPv6 address.
    If that is the case use the unwrapped address
    to avoid "Name or service not known".

    Closes-Bug: #2036455
    Change-Id: I0d194091be22e8401d379b7ffa720f8004cca3d0

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

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/ironic-inspector/+/895906

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

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

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

This issue was fixed in the openstack/ironic 23.0.0 release.

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

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/ironic-inspector/+/896324

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

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/ironic-inspector/+/896325

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

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/ironic-inspector/+/896326

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

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/ironic-inspector/+/896327

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/2023.1)

Reviewed: https://review.opendev.org/c/openstack/ironic-inspector/+/895906
Committed: https://opendev.org/openstack/ironic-inspector/commit/fbe087fa4f2f9539a4ecb77781fb19e63ba16586
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit fbe087fa4f2f9539a4ecb77781fb19e63ba16586
Author: Harald Jensås <email address hidden>
Date: Mon Sep 18 20:19:03 2023 +0200

    Handle bracketed IPv6 redfish_address

    If redfish_address is in brackets, unwrap it
    and check that it is a valid IPv6 address.
    If that is the case use the unwrapped address
    to avoid "Name or service not known".

    Closes-Bug: #2036455
    Change-Id: I0d194091be22e8401d379b7ffa720f8004cca3d0
    (cherry picked from commit 278ba52bf99a0f0c60224e518c6d952c2ac93698)

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

Reviewed: https://review.opendev.org/c/openstack/ironic-inspector/+/896324
Committed: https://opendev.org/openstack/ironic-inspector/commit/9ea9f611c1f7ef57f62dc08c2fa23e10f7b919bd
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 9ea9f611c1f7ef57f62dc08c2fa23e10f7b919bd
Author: Harald Jensås <email address hidden>
Date: Mon Sep 18 20:19:03 2023 +0200

    Handle bracketed IPv6 redfish_address

    If redfish_address is in brackets, unwrap it
    and check that it is a valid IPv6 address.
    If that is the case use the unwrapped address
    to avoid "Name or service not known".

    Closes-Bug: #2036455
    Change-Id: I0d194091be22e8401d379b7ffa720f8004cca3d0
    (cherry picked from commit 278ba52bf99a0f0c60224e518c6d952c2ac93698)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic-inspector (stable/yoga)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/yoga
Review: https://review.opendev.org/c/openstack/ironic-inspector/+/896325
Reason: stable/yoga branch of openstack/ironic-inspector is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/yoga if you want to further work on this patch.

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic-inspector (stable/wallaby)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/ironic-inspector/+/896327
Reason: stable/wallaby branch of openstack/ironic-inspector is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/wallaby if you want to further work on this patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic-inspector (stable/xena)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/xena
Review: https://review.opendev.org/c/openstack/ironic-inspector/+/896326
Reason: stable/xena branch of openstack/ironic-inspector is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/xena if you want to further work on this patch.

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

This issue was fixed in the openstack/ironic-inspector 11.4.1 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.