neutron/neutron/privileged
Sławek Kapłoński 56324c12aa Fix potential race condition in privileged ip_lib module
Functions like _run_iproute_{link,addr,neigh} are not atomic and
work in two steps.
First it tries to get device index and in second step calls specified
command for this device.
It might happen sometimes that device exists during first of those
steps but not exists during second step. Such case causes raising
pyroute2.NetlinkError exception which isn't properly handled in
Neutron code which uses ip_lib module.

This patch fixes it by catching pyroute2.NetlinkError exception
and raising NetworkInterfaceNotFound.
This is subclass of RuntimeError and all callers of ip_lib can handle
it properly is needed.

Change-Id: I568ef183466f5ff2f2c30ed74a7dc52db41ba577
Closes-Bug: #1763329
2018-04-13 09:39:29 +02:00
..
agent Fix potential race condition in privileged ip_lib module 2018-04-13 09:39:29 +02:00
__init__.py Adopt privsep and read routing table with pyroute2 2016-12-21 17:52:58 +02:00