metadata agent can't use ipv6 addresses for nova_metadata_host

Bug #1796593 reported by Antonio Ojea
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Antonio Ojea

Bug Description

It's a known issue that metadata services don't work for ipv6-only tenant networks [1]

However, it can be possible that operators want to use ipv4 and ipv6 tenant networks with an underlay ipv6 infra.

This doesn't work as you can see in the devstack failure [2] because the metadata agent, when building the request, doesn't check if the nova_metadata_host is an ipv6 address to add the corresponding square brackets [3].

[1] https://bugs.launchpad.net/neutron/+bug/1460177
[2] http://logs.openstack.org/68/608168/5/check/tempest-full-py3/d2321db/controller/logs/screen-q-meta.txt.gz#_Oct_07_18_00_37_770322
[3] https://github.com/openstack/neutron/blob/3e579256a36e66960495da2f303b5a6e37f644a6/neutron/agent/metadata/agent.py#L180

Antonio Ojea (aojea)
tags: added: ipv6
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
assignee: nobody → Antonio Ojea (itsuugo)
status: New → In Progress
Revision history for this message
Antonio Ojea (aojea) wrote :

Tests results are passing with the patch proposed https://review.openstack.org/#/c/608168/ , job tempest-full-py3 deploys a devstack environment with IPv6 as underlay and ::1 as nova_metadata_host.

Changed in neutron:
importance: Undecided → Medium
Changed in neutron:
assignee: Antonio Ojea (itsuugo) → Swaminathan Vasudevan (swaminathan-vasudevan)
Changed in neutron:
assignee: Swaminathan Vasudevan (swaminathan-vasudevan) → Antonio Ojea (itsuugo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/608468
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=85588ad38e3a08137f4f7b4be98ce271064eb2f0
Submitter: Zuul
Branch: master

commit 85588ad38e3a08137f4f7b4be98ce271064eb2f0
Author: aojeagarcia <email address hidden>
Date: Sun Oct 7 23:17:08 2018 +0200

    Allow Ipv6 addresses for nova_metadata_host

    Current logic didn't check if the nova_metadata_host is an IPv6 address
    causing the proxy request to fail with an exception because the url is
    not valid.

    This patchs check if the nova_metadata_host is an IPv6 address and
    create a valid url enclosing the IPv6 address with brackets

    Closes-Bug: #1796593

    Change-Id: Ibfebffcec2c8860237a1f151084de978a7863bd8
    Signed-off-by: aojeagarcia <email address hidden>

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/610190

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/queens)

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

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/rocky)

Reviewed: https://review.openstack.org/610190
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=198437297352aa1e9122d9315184baac443868a1
Submitter: Zuul
Branch: stable/rocky

commit 198437297352aa1e9122d9315184baac443868a1
Author: aojeagarcia <email address hidden>
Date: Sun Oct 7 23:17:08 2018 +0200

    Allow Ipv6 addresses for nova_metadata_host

    Current logic didn't check if the nova_metadata_host is an IPv6 address
    causing the proxy request to fail with an exception because the url is
    not valid.

    This patchs check if the nova_metadata_host is an IPv6 address and
    create a valid url enclosing the IPv6 address with brackets

    Closes-Bug: #1796593

    Change-Id: Ibfebffcec2c8860237a1f151084de978a7863bd8
    Signed-off-by: aojeagarcia <email address hidden>
    (cherry picked from commit 85588ad38e3a08137f4f7b4be98ce271064eb2f0)

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

Reviewed: https://review.openstack.org/610191
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=fa9685ada1d30161851b79459b1255d24f88cd64
Submitter: Zuul
Branch: stable/queens

commit fa9685ada1d30161851b79459b1255d24f88cd64
Author: aojeagarcia <email address hidden>
Date: Sun Oct 7 23:17:08 2018 +0200

    Allow Ipv6 addresses for nova_metadata_host

    Current logic didn't check if the nova_metadata_host is an IPv6 address
    causing the proxy request to fail with an exception because the url is
    not valid.

    This patchs check if the nova_metadata_host is an IPv6 address and
    create a valid url enclosing the IPv6 address with brackets

    Closes-Bug: #1796593

    Change-Id: Ibfebffcec2c8860237a1f151084de978a7863bd8
    Signed-off-by: aojeagarcia <email address hidden>
    (cherry picked from commit 85588ad38e3a08137f4f7b4be98ce271064eb2f0)

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

Reviewed: https://review.openstack.org/610192
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=2fba9f42b92bbe7ec24a5549251daa8af1049578
Submitter: Zuul
Branch: stable/pike

commit 2fba9f42b92bbe7ec24a5549251daa8af1049578
Author: aojeagarcia <email address hidden>
Date: Sun Oct 7 23:17:08 2018 +0200

    Allow Ipv6 addresses for nova_metadata_host

    Current logic didn't check if the nova_metadata_host is an IPv6 address
    causing the proxy request to fail with an exception because the url is
    not valid.

    This patchs check if the nova_metadata_host is an IPv6 address and
    create a valid url enclosing the IPv6 address with brackets

    Closes-Bug: #1796593

    Change-Id: Ibfebffcec2c8860237a1f151084de978a7863bd8
    Signed-off-by: aojeagarcia <email address hidden>
    (cherry picked from commit 85588ad38e3a08137f4f7b4be98ce271064eb2f0)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 13.0.2

This issue was fixed in the openstack/neutron 13.0.2 release.

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

This issue was fixed in the openstack/neutron 12.0.5 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 14.0.0.0b1

This issue was fixed in the openstack/neutron 14.0.0.0b1 development milestone.

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

This issue was fixed in the openstack/neutron 11.0.7 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.