[ovn-octavia-provider] Fix issue when LRP has more than one address

Bug #2036620 reported by Fernando Royo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Fernando Royo

Bug Description

When a LB is created or a new backend member is attached the OVN provider will search for the LRP attached to the LS where the LB is created, in order to associate this new LB to the LR. An exception is triggered if the LRP has more than one address, because current code can't find the port.

e.g a LRP with this neutron:cidrs in external_id field '10.10.10.1/24 fd8b:8a01:ab1d:0:f816:3eff:fe3d:24ab/64' will trigger this exception:

During handling of the above exception, another exception occurred:

    Traceback (most recent call last):

      File "/home/froyo/Documentos/gitprojects/ovn-octavia-provider/.tox/py/lib/python3.10/site-packages/neutron/tests/base.py", line 178, in func
    return f(self, *args, **kwargs)

      File "/home/froyo/Documentos/gitprojects/ovn-octavia-provider/ovn_octavia_provider/tests/unit/test_helper.py", line 2629, in test__find_lr_of_ls_multiple_address
    returned_lr = self.helper._find_lr_of_ls(ls, '10.10.10.1')

      File "/home/froyo/Documentos/gitprojects/ovn-octavia-provider/ovn_octavia_provider/helper.py", line 804, in _find_lr_of_ls
    port_cidr = netaddr.IPNetwork(

      File "/home/froyo/Documentos/gitprojects/ovn-octavia-provider/.tox/py/lib/python3.10/site-packages/netaddr/ip/__init__.py", line 942, in __init__
    value, prefixlen = parse_ip_network(module, addr,

      File "/home/froyo/Documentos/gitprojects/ovn-octavia-provider/.tox/py/lib/python3.10/site-packages/netaddr/ip/__init__.py", line 818, in parse_ip_network
    mask = IPAddress(val2, module.version, flags=INET_PTON)

      File "/home/froyo/Documentos/gitprojects/ovn-octavia-provider/.tox/py/lib/python3.10/site-packages/netaddr/ip/__init__.py", line 278, in __init__
    raise ValueError('%s() does not support netmasks or subnet' \

    ValueError: IPAddress() does not support netmasks or subnet prefixes! See documentation for details.

Changed in neutron:
assignee: nobody → Fernando Royo (froyoredhat)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ovn-octavia-provider (master)
Changed in neutron:
status: New → In Progress
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ovn-octavia-provider (master)

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/895826
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/983ee0c4f31413904b2f1c2b3a655a32cba70401
Submitter: "Zuul (22348)"
Branch: master

commit 983ee0c4f31413904b2f1c2b3a655a32cba70401
Author: Fernando Royo <email address hidden>
Date: Tue Sep 19 17:56:23 2023 +0200

    Check multiple address of a LRP plugged to LS

    When LB or member is created, driver looks for the Logical Router which
    is plugged to the Logical Switch. As there can be more than one address
    on the port, we should iterate over them to be compared with the gateway
    IP.

    This patch modifies code to do not crash if more than one address is
    found in neutron:cidrs external_ids field.

    Closes-Bug: 2036620
    Change-Id: I17b2c2577a4d99455c30ca1e10632a7004d7c084

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

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/896266

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

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/896267

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ovn-octavia-provider (stable/zed)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ovn-octavia-provider (stable/yoga)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ovn-octavia-provider (stable/xena)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ovn-octavia-provider (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/896271

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ovn-octavia-provider (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/896266
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/67e1c6dcce426c846afb888406dc8a803ebe41b8
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit 67e1c6dcce426c846afb888406dc8a803ebe41b8
Author: Fernando Royo <email address hidden>
Date: Tue Sep 19 17:56:23 2023 +0200

    Check multiple address of a LRP plugged to LS

    When LB or member is created, driver looks for the Logical Router which
    is plugged to the Logical Switch. As there can be more than one address
    on the port, we should iterate over them to be compared with the gateway
    IP.

    This patch modifies code to do not crash if more than one address is
    found in neutron:cidrs external_ids field.

    Closes-Bug: 2036620
    Change-Id: I17b2c2577a4d99455c30ca1e10632a7004d7c084
    (cherry picked from commit 983ee0c4f31413904b2f1c2b3a655a32cba70401)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ovn-octavia-provider (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/896267
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/feb5ac89af684f724ccda0c74a908438ce1f48e7
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit feb5ac89af684f724ccda0c74a908438ce1f48e7
Author: Fernando Royo <email address hidden>
Date: Tue Sep 19 17:56:23 2023 +0200

    Check multiple address of a LRP plugged to LS

    When LB or member is created, driver looks for the Logical Router which
    is plugged to the Logical Switch. As there can be more than one address
    on the port, we should iterate over them to be compared with the gateway
    IP.

    This patch modifies code to do not crash if more than one address is
    found in neutron:cidrs external_ids field.

    Closes-Bug: 2036620
    Change-Id: I17b2c2577a4d99455c30ca1e10632a7004d7c084
    (cherry picked from commit 983ee0c4f31413904b2f1c2b3a655a32cba70401)

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

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/896270
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/d4e1961177e2c09e6f718c4e9ad9feb96afb198d
Submitter: "Zuul (22348)"
Branch: stable/xena

commit d4e1961177e2c09e6f718c4e9ad9feb96afb198d
Author: Fernando Royo <email address hidden>
Date: Tue Sep 19 17:56:23 2023 +0200

    Check multiple address of a LRP plugged to LS

    When LB or member is created, driver looks for the Logical Router which
    is plugged to the Logical Switch. As there can be more than one address
    on the port, we should iterate over them to be compared with the gateway
    IP.

    This patch modifies code to do not crash if more than one address is
    found in neutron:cidrs external_ids field.

    Closes-Bug: 2036620
    Change-Id: I17b2c2577a4d99455c30ca1e10632a7004d7c084
    (cherry picked from commit 983ee0c4f31413904b2f1c2b3a655a32cba70401)

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

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/896271
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/3407cfa6b1e2d8feeae9d941e4c4ce14dc761c49
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 3407cfa6b1e2d8feeae9d941e4c4ce14dc761c49
Author: Fernando Royo <email address hidden>
Date: Tue Sep 19 17:56:23 2023 +0200

    Check multiple address of a LRP plugged to LS

    When LB or member is created, driver looks for the Logical Router which
    is plugged to the Logical Switch. As there can be more than one address
    on the port, we should iterate over them to be compared with the gateway
    IP.

    This patch modifies code to do not crash if more than one address is
    found in neutron:cidrs external_ids field.

    Closes-Bug: 2036620
    Change-Id: I17b2c2577a4d99455c30ca1e10632a7004d7c084
    (cherry picked from commit 983ee0c4f31413904b2f1c2b3a655a32cba70401)

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

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/896268
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/d0226474c79277cf369a9ae849d85f93de4db3ab
Submitter: "Zuul (22348)"
Branch: stable/zed

commit d0226474c79277cf369a9ae849d85f93de4db3ab
Author: Fernando Royo <email address hidden>
Date: Tue Sep 19 17:56:23 2023 +0200

    Check multiple address of a LRP plugged to LS

    When LB or member is created, driver looks for the Logical Router which
    is plugged to the Logical Switch. As there can be more than one address
    on the port, we should iterate over them to be compared with the gateway
    IP.

    This patch modifies code to do not crash if more than one address is
    found in neutron:cidrs external_ids field.

    Closes-Bug: 2036620
    Change-Id: I17b2c2577a4d99455c30ca1e10632a7004d7c084
    (cherry picked from commit 983ee0c4f31413904b2f1c2b3a655a32cba70401)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ovn-octavia-provider (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/ovn-octavia-provider/+/896269
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/bb357b684c1e68aee0e43904c98273d1e6672fab
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit bb357b684c1e68aee0e43904c98273d1e6672fab
Author: Fernando Royo <email address hidden>
Date: Tue Sep 19 17:56:23 2023 +0200

    Check multiple address of a LRP plugged to LS

    When LB or member is created, driver looks for the Logical Router which
    is plugged to the Logical Switch. As there can be more than one address
    on the port, we should iterate over them to be compared with the gateway
    IP.

    This patch modifies code to do not crash if more than one address is
    found in neutron:cidrs external_ids field.

    Closes-Bug: 2036620
    Change-Id: I17b2c2577a4d99455c30ca1e10632a7004d7c084
    (cherry picked from commit 983ee0c4f31413904b2f1c2b3a655a32cba70401)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ovn-octavia-provider 5.0.0.0rc2

This issue was fixed in the openstack/ovn-octavia-provider 5.0.0.0rc2 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ovn-octavia-provider yoga-eom

This issue was fixed in the openstack/ovn-octavia-provider yoga-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ovn-octavia-provider 3.1.2

This issue was fixed in the openstack/ovn-octavia-provider 3.1.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ovn-octavia-provider wallaby-eom

This issue was fixed in the openstack/ovn-octavia-provider wallaby-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ovn-octavia-provider xena-eom

This issue was fixed in the openstack/ovn-octavia-provider xena-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ovn-octavia-provider 6.0.0.0rc1

This issue was fixed in the openstack/ovn-octavia-provider 6.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.