ovn: db sync fails if all ips are allocated in the subnet and metadata port is missing an ip

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

Bug Description

If a user creates a tenant network with small subnet (like /30) and then manually deletes IP address from the metadata port and allocates all available IP addresses then db sync will fail when attempting to allocate a new IP address to the metadata port.

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

Changed in neutron:
status: New → In Progress
tags: added: l3-ipam-dhcp
Changed in neutron:
importance: Undecided → High
assignee: nobody → Jakub Libosvar (libosvar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit d237a2a83034fab809517a39dddee15995226131
Author: Jakub Libosvar <email address hidden>
Date: Fri Aug 19 20:16:09 2022 +0000

    ovn: Don't fail db sync if new IP allocation fails for metadata

    There is a scenario where IP allocation pool is depleted but OVN
    metadata port got removed its IP manually. The DB sync script will
    attempt to allocate a new IP address if DHCP is enabled in the subnet.
    Since the pool has no available IP addresses an exception is raised and
    the whole db sync stops.

    This patch simply catches the exception, logs and error and continues
    syncing other resources.

    Closes-bug: #1987135
    Signed-off-by: Jakub Libosvar <email address hidden>
    Change-Id: Iaa7b0d7ceb244a38fddd7676066683bf2ca72341

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

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

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

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

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

commit de9e632e1464173ce474d0a3e2a4c10a49ebc117
Author: Jakub Libosvar <email address hidden>
Date: Fri Aug 19 20:16:09 2022 +0000

    ovn: Don't fail db sync if new IP allocation fails for metadata

    There is a scenario where IP allocation pool is depleted but OVN
    metadata port got removed its IP manually. The DB sync script will
    attempt to allocate a new IP address if DHCP is enabled in the subnet.
    Since the pool has no available IP addresses an exception is raised and
    the whole db sync stops.

    This patch simply catches the exception, logs and error and continues
    syncing other resources.

    Closes-bug: #1987135
    Signed-off-by: Jakub Libosvar <email address hidden>
    Change-Id: Iaa7b0d7ceb244a38fddd7676066683bf2ca72341
    (cherry picked from commit d237a2a83034fab809517a39dddee15995226131)

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

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

commit 6f92ba9280793107563cf4ef059fa2b000121281
Author: Jakub Libosvar <email address hidden>
Date: Fri Aug 19 20:16:09 2022 +0000

    ovn: Don't fail db sync if new IP allocation fails for metadata

    There is a scenario where IP allocation pool is depleted but OVN
    metadata port got removed its IP manually. The DB sync script will
    attempt to allocate a new IP address if DHCP is enabled in the subnet.
    Since the pool has no available IP addresses an exception is raised and
    the whole db sync stops.

    This patch simply catches the exception, logs and error and continues
    syncing other resources.

    Closes-bug: #1987135
    Signed-off-by: Jakub Libosvar <email address hidden>
    Change-Id: Iaa7b0d7ceb244a38fddd7676066683bf2ca72341
    (cherry picked from commit d237a2a83034fab809517a39dddee15995226131)

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

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

commit a6432b3943611d2d2f5ff3a22230abc181edc1ac
Author: Jakub Libosvar <email address hidden>
Date: Fri Aug 19 20:16:09 2022 +0000

    ovn: Don't fail db sync if new IP allocation fails for metadata

    There is a scenario where IP allocation pool is depleted but OVN
    metadata port got removed its IP manually. The DB sync script will
    attempt to allocate a new IP address if DHCP is enabled in the subnet.
    Since the pool has no available IP addresses an exception is raised and
    the whole db sync stops.

    This patch simply catches the exception, logs and error and continues
    syncing other resources.

    Closes-bug: #1987135
    Signed-off-by: Jakub Libosvar <email address hidden>
    Change-Id: Iaa7b0d7ceb244a38fddd7676066683bf2ca72341
    (cherry picked from commit d237a2a83034fab809517a39dddee15995226131)

tags: added: in-stable-wallaby
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.

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 20.3.0

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