De-dupe subnet IDs when calling neutron /subnets API
In the _get_subnets_from_port method, we call the neutron /subnets API
to list subnets filtered by subnet IDs. We get the subnet IDs by
iterating all of the fixed IPs for the instance and sending the list of
corresponding subnet IDs. The python-neutronclient sends the list of
subnet IDs as a query string in the URI. When an instance has a large
number of interfaces attached, the list of subnet IDs can be too long
for the URI, resulting in a RequestURITooLong error from neutronclient.
This de-dupes the subnet IDs before calling neutron, to handle the case
where an instance has a large number of interfaces attached, but many
of them are on the same subnet.
Reviewed: https:/ /review. openstack. org/608040 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=ab5fc687026 0d3b3c3bce90a71 23c17816bf0093
Committed: https:/
Submitter: Zuul
Branch: master
commit ab5fc6870260d3b 3c3bce90a7123c1 7816bf0093
Author: melanie witt <email address hidden>
Date: Thu Oct 4 17:37:59 2018 +0000
De-dupe subnet IDs when calling neutron /subnets API
In the _get_subnets_ from_port method, we call the neutron /subnets API neutronclient sends the list of
to list subnets filtered by subnet IDs. We get the subnet IDs by
iterating all of the fixed IPs for the instance and sending the list of
corresponding subnet IDs. The python-
subnet IDs as a query string in the URI. When an instance has a large
number of interfaces attached, the list of subnet IDs can be too long
for the URI, resulting in a RequestURITooLong error from neutronclient.
This de-dupes the subnet IDs before calling neutron, to handle the case
where an instance has a large number of interfaces attached, but many
of them are on the same subnet.
Closes-Bug: #1796074
Change-Id: I5b52ff81f74ae7 cb11e6f012ab7e5 3cfc6821486