[Prefix Delegation] router add segment fails with Subnet for router interface must have a gateway IP

Bug #1962306 reported by yatin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
yatin

Bug Description

Steps to reproduce:-
Update ipv6_pd_enabled = true in neutron.conf and restart neutron-api service.

$ openstack network create ipv6-pd
$ openstack subnet create --ip-version 6 --ipv6-ra-mode slaac --ipv6-address-mode slaac --use-default-subnet-pool --network ipv6-pd ipv6-pd-1
$ openstack router add subnet router1 ipv6-pd-1

Add subnet fails with below Error:-
BadRequestException: 400: Client Error for url: http://192.168.0.5:9696/v2.0/routers/417bc2ad-019a-470c-b0ca-61a1d81c3d7d/add_router_interface, Bad router request: Subnet for router interface must have a gateway IP.

The issue is caused with https://review.opendev.org/c/openstack/neutron/+/699465 in order to fix
https://bugs.launchpad.net/neutron/+bug/1856675.

Workaround:-
Create segment with --gateway specified, this will cause the issue #1856675 but working prefix-delegation, so need to fix it without re introducing previous bug:-
openstack subnet create --ip-version 6 --ipv6-ra-mode slaac --ipv6-address-mode slaac --use-default-subnet-pool --network ipv6-pd --gateway :: ipv6-pd-1

yatin (yatinkarel)
Changed in neutron:
assignee: nobody → yatin (yatinkarel)
Revision history for this message
Lajos Katona (lajos-katona) wrote :

As I see prefix delegation docs should be checked also, to be sure that what is written is possible.

tags: added: l3-ipam-dhcp
tags: added: ipv6
Revision history for this message
Lajos Katona (lajos-katona) wrote :

For workaround, what also worked for me to add gateway for subnet create (original command is in [1]):
$ openstack subnet create --ip-version 6 --ipv6-ra-mode slaac --ipv6-address-mode slaac --use-default-subnet-pool --gateway ::1 --network ipv6-pd ipv6-pd-1

[1]: https://docs.openstack.org/neutron/latest/admin/config-ipv6.html#user-workflow

tags: added: doc
Changed in neutron:
status: New → Triaged
importance: Undecided → Medium
importance: Medium → High
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/+/831214

Changed in neutron:
status: Triaged → 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/+/831214
Committed: https://opendev.org/openstack/neutron/commit/820b2e26658a3fb5e00a7cedbdc2418d2196aa42
Submitter: "Zuul (22348)"
Branch: master

commit 820b2e26658a3fb5e00a7cedbdc2418d2196aa42
Author: yatinkarel <email address hidden>
Date: Mon Feb 28 18:54:26 2022 +0530

    Ensure gateway is set for prefix delegated subnets

    With [1] gateway is no longer set for subnet created
    with prefix delegation, but when adding the subnet
    to the router it fails as it expects gateway to be
    set.

    This patch ensures gateway is set temporary to the first IP
    of the subnet as it used to be just like the temporary CIDR.
    Also need to ensure dhcp configuration is skipped to avoid the
    original issue[2].

    [1] https://review.opendev.org/c/openstack/neutron/+/699465
    [2] https://bugs.launchpad.net/neutron/+bug/1856675

    Closes-Bug: #1962306
    Related-Bug: #1856675
    Change-Id: I512f7d98ac99bb0ef06fd2acba09482e3436d18d

Changed in neutron:
status: In Progress → Fix Released
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/+/834305

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/+/834306

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/+/834307

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

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

commit 80879049cfd2d968ec4296def523e0dbd6964f7a
Author: yatinkarel <email address hidden>
Date: Mon Feb 28 18:54:26 2022 +0530

    Ensure gateway is set for prefix delegated subnets

    With [1] gateway is no longer set for subnet created
    with prefix delegation, but when adding the subnet
    to the router it fails as it expects gateway to be
    set.

    This patch ensures gateway is set temporary to the first IP
    of the subnet as it used to be just like the temporary CIDR.
    Also need to ensure dhcp configuration is skipped to avoid the
    original issue[2].

    [1] https://review.opendev.org/c/openstack/neutron/+/699465
    [2] https://bugs.launchpad.net/neutron/+bug/1856675

    Closes-Bug: #1962306
    Related-Bug: #1856675
    Change-Id: I512f7d98ac99bb0ef06fd2acba09482e3436d18d
    (cherry picked from commit 820b2e26658a3fb5e00a7cedbdc2418d2196aa42)

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

This issue was fixed in the openstack/neutron 20.0.0.0rc2 release candidate.

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/834306
Committed: https://opendev.org/openstack/neutron/commit/64c29bcaf3b057b4d009faf93f554d76cdc0a9e3
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 64c29bcaf3b057b4d009faf93f554d76cdc0a9e3
Author: yatinkarel <email address hidden>
Date: Mon Feb 28 18:54:26 2022 +0530

    Ensure gateway is set for prefix delegated subnets

    With [1] gateway is no longer set for subnet created
    with prefix delegation, but when adding the subnet
    to the router it fails as it expects gateway to be
    set.

    This patch ensures gateway is set temporary to the first IP
    of the subnet as it used to be just like the temporary CIDR.
    Also need to ensure dhcp configuration is skipped to avoid the
    original issue[2].

    [1] https://review.opendev.org/c/openstack/neutron/+/699465
    [2] https://bugs.launchpad.net/neutron/+bug/1856675

    Closes-Bug: #1962306
    Related-Bug: #1856675
    Change-Id: I512f7d98ac99bb0ef06fd2acba09482e3436d18d
    (cherry picked from commit 820b2e26658a3fb5e00a7cedbdc2418d2196aa42)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/834307
Committed: https://opendev.org/openstack/neutron/commit/6f01d45c4a62aebf2712eebe4ae2500aa1357e0b
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 6f01d45c4a62aebf2712eebe4ae2500aa1357e0b
Author: yatinkarel <email address hidden>
Date: Mon Feb 28 18:54:26 2022 +0530

    Ensure gateway is set for prefix delegated subnets

    With [1] gateway is no longer set for subnet created
    with prefix delegation, but when adding the subnet
    to the router it fails as it expects gateway to be
    set.

    This patch ensures gateway is set temporary to the first IP
    of the subnet as it used to be just like the temporary CIDR.
    Also need to ensure dhcp configuration is skipped to avoid the
    original issue[2].

    [1] https://review.opendev.org/c/openstack/neutron/+/699465
    [2] https://bugs.launchpad.net/neutron/+bug/1856675

    Closes-Bug: #1962306
    Related-Bug: #1856675
    Change-Id: I512f7d98ac99bb0ef06fd2acba09482e3436d18d
    (cherry picked from commit 820b2e26658a3fb5e00a7cedbdc2418d2196aa42)

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

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

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

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

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

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

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.