Create a method to add multiple IP addresses in one call

Bug #1987281 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Rodolfo Alonso

Bug Description

When the OVN metadata agent creates a local namespace in a compute node, it creates a network namespace, a veth pair between the OVS instance and the network metadata namespace and then assigns the each IP of the metadata port. The number of IP addresses depend on the number of subnets. If this number is high, setting each IP address individually will take some time.

This bug proposes to create a method to pass multiple IP addresses that will be set in one privsep call.

Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
Changed in neutron:
importance: Undecided → Low
tags: added: l3-ipam-dhcp
tags: added: py
tags: added: privsep pyroute2
removed: l3-ipam-dhcp py
Revision history for this message
Miro Tomaska (mtomaska) wrote :

Hi Rodolfo,

I have tried this when looking into implementation of bug1981113. Unless I am missing something, doing this change only adds minimal gains. Take a look at my WIP review, did I miss something?
https://review.opendev.org/c/openstack/neutron/+/855677

Here is my manual test:
I created a single network with 801 IPv4 subnets of slightly different net masks. This was on a "all in one" devstack environment.
Without the change a namespace was created on average in about 16.83 seconds
With the change, the average was about 15.72 seconds

I think it will not hurt to still have this new function even if the performance is minimal.

Changed in neutron:
status: New → In Progress
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hi Miro:

My benchmarks are better, but of course that is when I execute them in my dev env. When I initially implemented locally this method, I halved the time spent on larger IP sets.

Regards.

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

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

commit 81980146cbdcc42d2398f4e777e659fc59c3b55f
Author: Miro Tomaska <email address hidden>
Date: Fri Sep 2 10:26:11 2022 -0500

    Add and delete multiple ip addresses in one priv call

    Created new add_ip_addresses privileged function
    which takes an iterable of cidrs and adds them
    in one privileged call. This is so we dont have to
    take on additional priv overhead when calling
    add_ip_address in a loop.
    For parity, performed the same change on the
    delete_ip_address function.

    Closes-Bug: #1987281
    Partial-Bug: #1981113
    Change-Id: Ib1278af20c3b3b057712453cb249aba34b684a21

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

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

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

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

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/zed)

Change abandoned by "Miro Tomaska <email address hidden>" on branch: stable/zed
Review: https://review.opendev.org/c/openstack/neutron/+/869940
Reason: many backport conflicts outweight the benefit of backporting.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/yoga)

Change abandoned by "Miro Tomaska <email address hidden>" on branch: stable/yoga
Review: https://review.opendev.org/c/openstack/neutron/+/869941
Reason: many backport conflicts outweight the benefit of backporting

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/xena)

Change abandoned by "Miro Tomaska <email address hidden>" on branch: stable/xena
Review: https://review.opendev.org/c/openstack/neutron/+/869942
Reason: many backport conflicts outweight the benefit of backporting

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/wallaby)

Change abandoned by "Miro Tomaska <email address hidden>" on branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/neutron/+/869943
Reason: many backport conflicts outweight the benefit of backporting

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/victoria)

Change abandoned by "Miro Tomaska <email address hidden>" on branch: stable/victoria
Review: https://review.opendev.org/c/openstack/neutron/+/869944
Reason: many backport conflicts outweight the benefit of backporting

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/ussuri)

Change abandoned by "Miro Tomaska <email address hidden>" on branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/neutron/+/869945
Reason: many backport conflicts outweight the benefit of backporting

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.

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.