Reviewed: https://review.openstack.org/560862 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=56324c12aa58ff9cf46582611b071f3abb743ddf Submitter: Zuul Branch: master
commit 56324c12aa58ff9cf46582611b071f3abb743ddf Author: Sławek Kapłoński <[email protected]> Date: Thu Apr 12 13:02:56 2018 +0200 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 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1763329 Title: Race condition in privileged._run_iproute_xxx() functions Status in neutron: Fix Released Bug description: privileged functions like _run_iproute_link() are not atomic as they first get device index and then do some other action on such device. Because of that there can be the case when device existed when its index was taken but not exists during second call to make some action on device. In such case NetlinkError is raised by pyroute2 and it is not properly handled in Neutron. Because of that for example fullstack test in http://logs.openstack.org/18/558318/7/check/neutron- fullstack/a6688da/logs/testr_results.html.gz failed To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1763329/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

