forked from openstack/networking-generic-switch
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not make actual device changes in bind_port()
According to the bind_port specification (as summed up in its docstring), we should not make any change when bind_port() is called, because binding results might end up not getting committed. To satisfy this specification, this patch moves actual device reconfiguration to update_port_postcommit(). This makes the behaviour symmetrical for port creation (handled in update_port_postcommit) and port deletion (handled in delete_port_postcommit). In addition, this will make it easier to improve performance of port creation, see https://bugs.launchpad.net/networking-generic-switch/+bug/2024385 Note that this change introduces a different retry behaviour when we fail to configure a device. Since bind_port() is retried several times by Neutron, we indirectly benefited from these retries, but this is no longer the case. However, NGS already has an internal retry mechanism for SSH connection errors, which should cover most network-related issues. To sum up, errors that are no longer covered by a retry are the ones that happen after we successfully connect to the device. For instance, the switch port may not exist on the device, or the device could be in an unexpected state such as a port being currently part of an unexpected VLAN. This kind of errors are unlikely to be solved by retrying, so the new behaviour should be fine and will even allow to return the error much faster to the end-user. Related-Bug: #2024385 Change-Id: If4ca9c58d7f30b40992d0f1aee7e915c6978e0ca
- Loading branch information
Showing
2 changed files
with
154 additions
and
51 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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