]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Ignore non-existent ports during OVS intf list
authorKevin Benton <blak111@gmail.com>
Sun, 4 Jan 2015 09:47:01 +0000 (01:47 -0800)
committerKevin Benton <kevinbenton@buttewifi.com>
Sun, 4 Jan 2015 12:16:42 +0000 (12:16 +0000)
commit5de1d2ed67e00a010f23c5f9055556745a55957a
treeee5cf1e49dabcaa34e59d6d2395b41d366753491
parentb88f9df7339a576fbcdf481225bfc644a2a13b2f
Ignore non-existent ports during OVS intf list

A recent commit[1] to pass the list of port names directly to
ovs-vsctl during a list operation introduced a new possible
failure condition where one of the names might refer to a port
which no longer exists. By default this causes ovs-vsctl to quit
in a fit of rage[2].

Previously, all interfaces were retrieved and the ones that were a
subset of the name list were processed. The name list could contain
extra non-existent names (e.g. recently deleted interfaces).

This patch just passes the '--if-exists' flag to the 'list Interface'
command to match the same previous behavior.

1. 3f0bf6cfac2e151d5a4a7f076062b3365bdbf457
2. Example: Stderr: 'ovs-vsctl: no row "tap80664420-ea" in table Interface\n'

Closes-Bug: #1407190
Change-Id: I8f359981386d13fb455281a72b8bb245395c0909
neutron/agent/linux/ovs_lib.py
neutron/tests/unit/agent/linux/test_ovs_lib.py