forked from openstack/neutron
-
Notifications
You must be signed in to change notification settings - Fork 2
Synchronise 2023.1 with upstream #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously we would expect duplicates rows from MySQL and then filter them with _unique_floatingip_iterator. This means that we were converting rows to ORM-mapped objects unnecessarily. This conversion is very CPU intensive. Instead, we can remove the duplicates as a part of the query which means that only unique rows are returned and the number of conversions from rows to ORM-mapped objects is reduced significantly. It also means that the _unique_floatingip_iterator function is no longer needed. Change-Id: I05136302f7b8abc0a985b91c993008595234ad6b Signed-off-by: Adam Oswick <adam@adamoswick.co.uk> (cherry picked from commit 8946684)
normal network namespaces are bind-mounted to files under /var/run/netns. If a process deleting a network namespace gets killed during that operation there is the chance that the bind mount to the netns has been removed, but the file under /var/run/netns still exists. When the neutron-ovn-metadata-agent tries to clean up such network namespaces it first tires to validate that the network namespace is empty. For the cases described above this fails, as this network namespace no longer really exists, but is just a stray file laying around. To fix this we treat network namespaces where we get an `OSError` with errno 22 (Invalid Argument) as empty. The calls to pyroute2 to delete the namespace will then clean up the file. Additionally we add a guard to teardown_datapath to continue even if this fails. failing to remove a datapath is not critical and leaves in the worst case a process and a network namespace running, however previously it would have also prevented the creation of new datapaths which is critical for VM startup. Closes-Bug: #2037102 Change-Id: I7c43812fed5903f98a2e491076c24a8d926a59b4 (cherry picked from commit 566fea3)
When network device which is ovs internal port is moved to the namespace it may happend sometimes that it will have "shy port syndrome" [1]. Even though there is wait for device to be in namespace in the set_netns method it may happend that device is in namespace during this check but it dissapears for short time later and that causes failures e.g. in functional tests like described in [2]. To avoid that, this patch proposed simple (and ugly) sleep for 1 second before checking if port really exists in the namespace. If it will be "shy" port it should already flap during that 1 second. [1] https://bugs.launchpad.net/neutron/+bug/1618987 [2] https://bugs.launchpad.net/neutron/+bug/1961740 Related-Bug: #1961740 Related-Bug: #1998337 Change-Id: I442587e7ef55917f4ea873e190bf8afbc0e911e1 (cherry picked from commit 2af5fd8)
As of Ib3c6f0dc01efd31430691e720ba23ccb4ede65fa, the MaintenanceWorker checks for Chassis_Private table support and uses it to remove duplicate Chassis/Chassis_Private entries. The Chassis_Private table was not monitored in the BaseOvnSbIdl class which the MaintenanceWorker uses. Closes-Bug: #2049265 Change-Id: I711996b7644e80bc195833e4429e4d745728f9cf (cherry picked from commit 60eb15e)
When a router interface is created, the corresponding subnet gateway IP is tested first [1]. If the subnet has no gateway IP, the router interface cannot be created. This IP will be assigned to this port. The Neutron API also prevents from modifying the subnet gateway IP if assigned to a router interface [2]. However the API is not preventing the subnet gateway IP deletion. This patch is adding this check. This patch is being tested in the neutron-tempest-plugin [3]. [1]https://github.com/openstack/neutron/blob/de58c1b99523104a471420ef0468147f13c9e98d/neutron/db/l3_db.py#L902-L904 [2]https://github.com/openstack/neutron/blob/de58c1b99523104a471420ef0468147f13c9e98d/neutron/db/db_base_plugin_v2.py#L715 [3]https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/904710 Closes-Bug: #2036423 Change-Id: I4c7b399a3a052749abdb88fb50be628ee91b63a0 (cherry picked from commit f9e4097)
… attached" into stable/2023.1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains a snapshot of 2023.1 from upstream.