Update port with given IPv6 address on SLAAC/stateless_dhpc subnets fails always when IP address is given

Bug #1991398 reported by Slawek Kaplonski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Slawek Kaplonski

Bug Description

There is simple test in the pluggable_ipam_module https://github.com/openstack/neutron/blob/1f1e45da6af4879725fb2d766f1989c8a10af474/neutron/db/ipam_pluggable_backend.py#L306 which will check if there is given fixed IPv6 address for port and will raise exception AllocationOnAutoAddressSubnet in such case if subnet is SLAAC or DHCP_stateless as in such cases IP addresses for ports are generated automatically based on the port's MAC address and subnet's prefix.
That is generally correct but it will also fail if given IP address is actually correct (the same one as would be generated one). In such specific case this exception shouldn't be raised as nothing wrong would happen.

For some reason this is causing some tobiko test failure sometimes during the cleanup phase when heat is trying to delete first IPv4 and then IPv6 subnet.

Changed in neutron:
importance: Undecided → Low
assignee: nobody → Slawek Kaplonski (slaweq)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/860054
Committed: https://opendev.org/openstack/neutron/commit/d7b44f7218ff665045adb923b1aa92c35b371af9
Submitter: "Zuul (22348)"
Branch: master

commit d7b44f7218ff665045adb923b1aa92c35b371af9
Author: Slawek Kaplonski <email address hidden>
Date: Sat Oct 1 22:06:11 2022 +0200

    Allow to pass EUI64 IP address as fixed ip for the port

    When port with IP address from the auto allocation subnet (SLAAC or
    dhcp_stateless) is created or updated and fixed IP address is specified,
    Neutron will fail as in case of such subnets IP address is assigned
    automatically based on the subnet's prefix and port's MAC address.
    But in case when given IP address is actually correct EUI64 generated IP
    address (the same as Neutron would generate for that port) there is no
    need to raise an exception and fail request.

    Additionally this patch fixes imports sections in the
    ipam_pluggable_backend module.

    Closes-bug: #1991398
    Change-Id: Iaee5608c9581228a83f7ad75dbf2cc31dafaa9ea

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

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/neutron/+/860317

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

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/neutron/+/860319

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

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/neutron/+/860321

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

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/neutron/+/860323

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

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/neutron/+/860325

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

Fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/neutron/+/860327

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

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/neutron/+/860329

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/860317
Committed: https://opendev.org/openstack/neutron/commit/d612cbca043a792b97e0ac508dec1dc9860b3b3c
Submitter: "Zuul (22348)"
Branch: stable/zed

commit d612cbca043a792b97e0ac508dec1dc9860b3b3c
Author: Slawek Kaplonski <email address hidden>
Date: Sat Oct 1 22:06:11 2022 +0200

    Allow to pass EUI64 IP address as fixed ip for the port

    When port with IP address from the auto allocation subnet (SLAAC or
    dhcp_stateless) is created or updated and fixed IP address is specified,
    Neutron will fail as in case of such subnets IP address is assigned
    automatically based on the subnet's prefix and port's MAC address.
    But in case when given IP address is actually correct EUI64 generated IP
    address (the same as Neutron would generate for that port) there is no
    need to raise an exception and fail request.

    Additionally this patch fixes imports sections in the
    ipam_pluggable_backend module.

    Closes-bug: #1991398
    Change-Id: Iaee5608c9581228a83f7ad75dbf2cc31dafaa9ea
    (cherry picked from commit d7b44f7218ff665045adb923b1aa92c35b371af9)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/860325
Committed: https://opendev.org/openstack/neutron/commit/edd92ce6b9b36da5a7bc4e2569429646adf696d8
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit edd92ce6b9b36da5a7bc4e2569429646adf696d8
Author: Slawek Kaplonski <email address hidden>
Date: Sat Oct 1 22:06:11 2022 +0200

    Allow to pass EUI64 IP address as fixed ip for the port

    When port with IP address from the auto allocation subnet (SLAAC or
    dhcp_stateless) is created or updated and fixed IP address is specified,
    Neutron will fail as in case of such subnets IP address is assigned
    automatically based on the subnet's prefix and port's MAC address.
    But in case when given IP address is actually correct EUI64 generated IP
    address (the same as Neutron would generate for that port) there is no
    need to raise an exception and fail request.

    Additionally this patch fixes imports sections in the
    ipam_pluggable_backend module.

    Closes-bug: #1991398
    Change-Id: Iaee5608c9581228a83f7ad75dbf2cc31dafaa9ea
    (cherry picked from commit d7b44f7218ff665045adb923b1aa92c35b371af9)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/860319
Committed: https://opendev.org/openstack/neutron/commit/bf1e9e417c43e597db0857160953888fa44a34c8
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit bf1e9e417c43e597db0857160953888fa44a34c8
Author: Slawek Kaplonski <email address hidden>
Date: Sat Oct 1 22:06:11 2022 +0200

    Allow to pass EUI64 IP address as fixed ip for the port

    When port with IP address from the auto allocation subnet (SLAAC or
    dhcp_stateless) is created or updated and fixed IP address is specified,
    Neutron will fail as in case of such subnets IP address is assigned
    automatically based on the subnet's prefix and port's MAC address.
    But in case when given IP address is actually correct EUI64 generated IP
    address (the same as Neutron would generate for that port) there is no
    need to raise an exception and fail request.

    Additionally this patch fixes imports sections in the
    ipam_pluggable_backend module.

    Closes-bug: #1991398
    Change-Id: Iaee5608c9581228a83f7ad75dbf2cc31dafaa9ea
    (cherry picked from commit d7b44f7218ff665045adb923b1aa92c35b371af9)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/860321
Committed: https://opendev.org/openstack/neutron/commit/6c94585b8caffd3cc096d2c17c1cfb21fa5eb459
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 6c94585b8caffd3cc096d2c17c1cfb21fa5eb459
Author: Slawek Kaplonski <email address hidden>
Date: Sat Oct 1 22:06:11 2022 +0200

    Allow to pass EUI64 IP address as fixed ip for the port

    When port with IP address from the auto allocation subnet (SLAAC or
    dhcp_stateless) is created or updated and fixed IP address is specified,
    Neutron will fail as in case of such subnets IP address is assigned
    automatically based on the subnet's prefix and port's MAC address.
    But in case when given IP address is actually correct EUI64 generated IP
    address (the same as Neutron would generate for that port) there is no
    need to raise an exception and fail request.

    Additionally this patch fixes imports sections in the
    ipam_pluggable_backend module.

    Closes-bug: #1991398
    Change-Id: Iaee5608c9581228a83f7ad75dbf2cc31dafaa9ea
    (cherry picked from commit d7b44f7218ff665045adb923b1aa92c35b371af9)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/860327
Committed: https://opendev.org/openstack/neutron/commit/4196cfe2b822c80a0ef32e93e805e8e2aafd125a
Submitter: "Zuul (22348)"
Branch: stable/train

commit 4196cfe2b822c80a0ef32e93e805e8e2aafd125a
Author: Slawek Kaplonski <email address hidden>
Date: Sat Oct 1 22:06:11 2022 +0200

    Allow to pass EUI64 IP address as fixed ip for the port

    When port with IP address from the auto allocation subnet (SLAAC or
    dhcp_stateless) is created or updated and fixed IP address is specified,
    Neutron will fail as in case of such subnets IP address is assigned
    automatically based on the subnet's prefix and port's MAC address.
    But in case when given IP address is actually correct EUI64 generated IP
    address (the same as Neutron would generate for that port) there is no
    need to raise an exception and fail request.

    Additionally this patch fixes imports sections in the
    ipam_pluggable_backend module.

    Closes-bug: #1991398
    Change-Id: Iaee5608c9581228a83f7ad75dbf2cc31dafaa9ea
    (cherry picked from commit d7b44f7218ff665045adb923b1aa92c35b371af9)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/860323
Committed: https://opendev.org/openstack/neutron/commit/f80d18a02c5e3a3292e2dfb56d410152a883b849
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit f80d18a02c5e3a3292e2dfb56d410152a883b849
Author: Slawek Kaplonski <email address hidden>
Date: Sat Oct 1 22:06:11 2022 +0200

    Allow to pass EUI64 IP address as fixed ip for the port

    When port with IP address from the auto allocation subnet (SLAAC or
    dhcp_stateless) is created or updated and fixed IP address is specified,
    Neutron will fail as in case of such subnets IP address is assigned
    automatically based on the subnet's prefix and port's MAC address.
    But in case when given IP address is actually correct EUI64 generated IP
    address (the same as Neutron would generate for that port) there is no
    need to raise an exception and fail request.

    Additionally this patch fixes imports sections in the
    ipam_pluggable_backend module.

    Closes-bug: #1991398
    Change-Id: Iaee5608c9581228a83f7ad75dbf2cc31dafaa9ea
    (cherry picked from commit d7b44f7218ff665045adb923b1aa92c35b371af9)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/860329
Committed: https://opendev.org/openstack/neutron/commit/1197d8e73504277e4087fca3efe6f9cbbc96c447
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 1197d8e73504277e4087fca3efe6f9cbbc96c447
Author: Slawek Kaplonski <email address hidden>
Date: Sat Oct 1 22:06:11 2022 +0200

    Allow to pass EUI64 IP address as fixed ip for the port

    When port with IP address from the auto allocation subnet (SLAAC or
    dhcp_stateless) is created or updated and fixed IP address is specified,
    Neutron will fail as in case of such subnets IP address is assigned
    automatically based on the subnet's prefix and port's MAC address.
    But in case when given IP address is actually correct EUI64 generated IP
    address (the same as Neutron would generate for that port) there is no
    need to raise an exception and fail request.

    Additionally this patch fixes imports sections in the
    ipam_pluggable_backend module.

    Closes-bug: #1991398
    Change-Id: Iaee5608c9581228a83f7ad75dbf2cc31dafaa9ea
    (cherry picked from commit d7b44f7218ff665045adb923b1aa92c35b371af9)

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

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

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

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

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

This issue was fixed in the openstack/neutron 22.0.0.0rc1 release candidate.

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

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

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

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

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

This issue was fixed in the openstack/neutron train-eol release.

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

This issue was fixed in the openstack/neutron ussuri-eol release.

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

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