JONGLEZ Baptiste
authored
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(). In addition, this will likely make it easier to improve performance of bulk port creation in the future, see https://bugs.launchpad.net/neutron/+bug/1976270 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. Change-Id: If4ca9c58d7f30b40992d0f1aee7e915c6978e0ca
Name | Last commit | Last update |
---|---|---|
.. | ||
devices | ||
tests | ||
__init__.py | ||
_i18n.py | ||
config.py | ||
exceptions.py | ||
generic_switch_mech.py | ||
locking.py |