diff options
Diffstat (limited to 'sys-cluster/neutron/files/0001-Fixes-bug-in-interface-handling-of-ip_lib.py.patch')
-rw-r--r-- | sys-cluster/neutron/files/0001-Fixes-bug-in-interface-handling-of-ip_lib.py.patch | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/sys-cluster/neutron/files/0001-Fixes-bug-in-interface-handling-of-ip_lib.py.patch b/sys-cluster/neutron/files/0001-Fixes-bug-in-interface-handling-of-ip_lib.py.patch deleted file mode 100644 index 23f8cc6621ff..000000000000 --- a/sys-cluster/neutron/files/0001-Fixes-bug-in-interface-handling-of-ip_lib.py.patch +++ /dev/null @@ -1,73 +0,0 @@ -From f3100ad343759ad32435766df33b0384cd15629d Mon Sep 17 00:00:00 2001 -From: Matthew Thode <mthode@mthode.org> -Date: Mon, 9 Feb 2015 11:02:58 -0600 -Subject: [PATCH 1/3] Fixes bug in interface handling of ip_lib.py - -ip_lib was parsing tunnel links incorrectly, we know what to delimit on -when we see interfaces with @NONE in their name - -@NONE is appended to the interface name by iproute2 when a tunnel is not -connected to it's remote endpoint, this patch adds allows for handling -that situation. - -Change-Id: I07d1d297f07857d216649cccf717896574aac301 -Closes-Bug: 1374663 ---- - neutron/agent/linux/ip_lib.py | 3 +++ - neutron/tests/unit/test_linux_ip_lib.py | 12 +++++++++--- - 2 files changed, 12 insertions(+), 3 deletions(-) - -diff --git a/neutron/agent/linux/ip_lib.py b/neutron/agent/linux/ip_lib.py -index 1d32a54..b2264d2 100644 ---- a/neutron/agent/linux/ip_lib.py -+++ b/neutron/agent/linux/ip_lib.py -@@ -109,6 +109,9 @@ class IPWrapper(SubProcessBase): - if len(tokens) == 3: - if any(v in tokens[2] for v in VLAN_INTERFACE_DETAIL): - delimiter = '@' -+ # tunnel interfaces can have @NONE in their name as well -+ elif '@NONE' in tokens[1]: -+ delimiter = '@' - else: - delimiter = ':' - name = tokens[1].rpartition(delimiter)[0].strip() -diff --git a/neutron/tests/unit/test_linux_ip_lib.py b/neutron/tests/unit/test_linux_ip_lib.py -index 2b9486d..41f9caa 100644 ---- a/neutron/tests/unit/test_linux_ip_lib.py -+++ b/neutron/tests/unit/test_linux_ip_lib.py -@@ -70,7 +70,11 @@ LINK_SAMPLE = [ - '14: bar@bar:bar@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 ' - 'qdisc mq state UP qlen 1000' - '\ link/ether cc:dd:ee:ff:ab:cd brd ff:ff:ff:ff:ff:ff promiscuity 0' -- '\ vlan protocol 802.1Q id 14 <REORDER_HDR>'] -+ '\ vlan protocol 802.1Q id 14 <REORDER_HDR>', -+ '15: gre0@NONE: <NOARP> mtu 1476 qdisc noqueue state DOWN mode DEFAULT ' -+ 'group default ' -+ '\ link/gre 0.0.0.0 brd 0.0.0.0 promiscuity 0 ' -+ '\ gre remote any local any ttl inherit nopmtudisc'] - - ADDR_SAMPLE = (""" - 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000 -@@ -221,7 +225,8 @@ class TestIpWrapper(base.BaseTestCase): - ip_lib.IPDevice('bar:bar'), - ip_lib.IPDevice('bar@bar'), - ip_lib.IPDevice('bar:bar@bar'), -- ip_lib.IPDevice('bar@bar:bar')]) -+ ip_lib.IPDevice('bar@bar:bar'), -+ ip_lib.IPDevice('gre0')]) - - self.execute.assert_called_once_with(['o', 'd'], 'link', ('list',), - 'sudo', None) -@@ -243,7 +248,8 @@ class TestIpWrapper(base.BaseTestCase): - ip_lib.IPDevice('bar:bar'), - ip_lib.IPDevice('bar@bar'), - ip_lib.IPDevice('bar:bar@bar'), -- ip_lib.IPDevice('bar@bar:bar')]) -+ ip_lib.IPDevice('bar@bar:bar'), -+ ip_lib.IPDevice('gre0')]) - - self.execute.assert_called_once_with(['o', 'd'], 'link', ('list',), - 'sudo', None) --- -2.0.5 - |