1 From 6338796ad354f7e82945a52ab14914e1fc490ae3 Mon Sep 17 00:00:00 2001
2 From: Miguel Angel Ajo <mangelajo@redhat.com>
3 Date: Mon, 26 May 2014 15:56:23 +0200
4 Subject: [PATCH] Remove kernel version check for OVS VXLAN
6 Upstream kernel version check for OVS VXLAN doesn't work
7 in RHEL, because we backport those features to our 2.6.x
8 kernel branch. The check is removed downstream until
9 a solution that works for everyone is available.
11 Resolves rhbz: 1100164
13 Upstream-Juno: https://review.openstack.org/#/c/88121/
15 Change-Id: Ica9188c624bf8f7ba91eee2537a2219a97017b54
16 Reviewed-on: https://code.engineering.redhat.com/gerrit/25694
17 Tested-by: RHOS Jenkins <apevec+rhosci@redhat.com>
18 Reviewed-by: Miguel Angel Ajo Pelayo <majopela@redhat.com>
19 Reviewed-by: Ihar Hrachyshka <ihrachys@redhat.com>
20 Tested-by: Ihar Hrachyshka <ihrachys@redhat.com>
22 neutron/plugins/ofagent/agent/ofa_neutron_agent.py | 1 -
23 neutron/plugins/openvswitch/agent/ovs_neutron_agent.py | 1 -
24 neutron/tests/unit/ofagent/test_ofa_neutron_agent.py | 10 +++++-----
25 neutron/tests/unit/openvswitch/test_ovs_lib.py | 12 ++++++------
26 neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py | 10 +++++-----
27 neutron/tests/unit/openvswitch/test_ovs_tunnel.py | 2 +-
28 6 files changed, 17 insertions(+), 19 deletions(-)
30 diff --git a/neutron/plugins/ofagent/agent/ofa_neutron_agent.py b/neutron/plugins/ofagent/agent/ofa_neutron_agent.py
31 index c6e65e5..5caef4b 100644
32 --- a/neutron/plugins/ofagent/agent/ofa_neutron_agent.py
33 +++ b/neutron/plugins/ofagent/agent/ofa_neutron_agent.py
34 @@ -266,7 +266,6 @@ class OFANeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin):
35 self.local_ip = local_ip
37 self.vxlan_udp_port = cfg.CONF.AGENT.vxlan_udp_port
38 - self._check_ovs_version()
39 if self.enable_tunneling:
40 self.setup_tunnel_br(tun_br)
41 # Collect additional bridges to monitor
42 diff --git a/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py b/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py
43 index 79c03f1..17906d0 100644
44 --- a/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py
45 +++ b/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py
46 @@ -212,7 +212,6 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
47 self.local_ip = local_ip
49 self.vxlan_udp_port = cfg.CONF.AGENT.vxlan_udp_port
50 - self._check_ovs_version()
52 if self.enable_tunneling:
53 self.setup_tunnel_br(tun_br)
54 diff --git a/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py b/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py
55 index 71afcd2..9d8e83a 100644
56 --- a/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py
57 +++ b/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py
58 @@ -534,30 +534,30 @@ class TestOFANeutronAgent(OFAAgentTestCase):
60 self.assertEqual(version_ok, expecting_ok)
62 - def test_check_minimum_version(self):
63 + def _test_check_minimum_version(self):
64 min_vxlan_ver = constants.MINIMUM_OVS_VXLAN_VERSION
65 min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
66 self._check_ovs_vxlan_version(min_vxlan_ver, min_vxlan_ver,
67 min_kernel_ver, expecting_ok=True)
69 - def test_check_future_version(self):
70 + def _test_check_future_version(self):
71 install_ver = str(float(constants.MINIMUM_OVS_VXLAN_VERSION) + 0.01)
72 min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
73 self._check_ovs_vxlan_version(install_ver, install_ver,
74 min_kernel_ver, expecting_ok=True)
76 - def test_check_fail_version(self):
77 + def _test_check_fail_version(self):
78 install_ver = str(float(constants.MINIMUM_OVS_VXLAN_VERSION) - 0.01)
79 min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
80 self._check_ovs_vxlan_version(install_ver, install_ver,
81 min_kernel_ver, expecting_ok=False)
83 - def test_check_fail_no_version(self):
84 + def _test_check_fail_no_version(self):
85 min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
86 self._check_ovs_vxlan_version(None, None,
87 min_kernel_ver, expecting_ok=False)
89 - def test_check_fail_klm_version(self):
90 + def _test_check_fail_klm_version(self):
91 min_vxlan_ver = constants.MINIMUM_OVS_VXLAN_VERSION
92 min_kernel_ver = OVS_LINUX_KERN_VERS_WITHOUT_VXLAN
93 install_ver = str(float(min_vxlan_ver) - 0.01)
94 diff --git a/neutron/tests/unit/openvswitch/test_ovs_lib.py b/neutron/tests/unit/openvswitch/test_ovs_lib.py
95 index dbf155b..77e383a 100644
96 --- a/neutron/tests/unit/openvswitch/test_ovs_lib.py
97 +++ b/neutron/tests/unit/openvswitch/test_ovs_lib.py
98 @@ -899,31 +899,31 @@ class OVS_Lib_Test(base.BaseTestCase):
100 self.assertEqual(version_ok, expecting_ok)
102 - def test_check_minimum_version(self):
103 + def _test_check_minimum_version(self):
104 min_vxlan_ver = constants.MINIMUM_OVS_VXLAN_VERSION
105 min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
106 self._check_ovs_vxlan_version(min_vxlan_ver, min_vxlan_ver,
107 min_kernel_ver, expecting_ok=True)
109 - def test_check_future_version(self):
110 + def _test_check_future_version(self):
111 install_ver = str(float(constants.MINIMUM_OVS_VXLAN_VERSION) + 0.01)
112 min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
113 self._check_ovs_vxlan_version(install_ver, install_ver,
114 min_kernel_ver, expecting_ok=True)
116 - def test_check_fail_version(self):
117 + def _test_check_fail_version(self):
118 install_ver = str(float(constants.MINIMUM_OVS_VXLAN_VERSION) - 0.01)
119 min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
120 self._check_ovs_vxlan_version(install_ver, install_ver,
121 min_kernel_ver, expecting_ok=False)
123 - def test_check_fail_no_version(self):
124 + def _test_check_fail_no_version(self):
125 min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
126 self._check_ovs_vxlan_version(None, None,
130 - def test_check_fail_klm_version(self):
131 + def _test_check_fail_klm_version(self):
132 min_vxlan_ver = constants.MINIMUM_OVS_VXLAN_VERSION
133 min_kernel_ver = OVS_LINUX_KERN_VERS_WITHOUT_VXLAN
134 install_ver = str(float(min_vxlan_ver) - 0.01)
135 @@ -932,7 +932,7 @@ class OVS_Lib_Test(base.BaseTestCase):
139 - def test_check_pass_kernel_version(self):
140 + def _test_check_pass_kernel_version(self):
141 min_vxlan_ver = constants.MINIMUM_OVS_VXLAN_VERSION
142 min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
143 self._check_ovs_vxlan_version(min_vxlan_ver, min_vxlan_ver,
144 diff --git a/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py b/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py
145 index 94d3c93..651c991 100644
146 --- a/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py
147 +++ b/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py
148 @@ -520,30 +520,30 @@ class TestOvsNeutronAgent(base.BaseTestCase):
150 self.assertEqual(version_ok, expecting_ok)
152 - def test_check_minimum_version(self):
153 + def _test_check_minimum_version(self):
154 min_vxlan_ver = constants.MINIMUM_OVS_VXLAN_VERSION
155 min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
156 self._check_ovs_vxlan_version(min_vxlan_ver, min_vxlan_ver,
157 min_kernel_ver, expecting_ok=True)
159 - def test_check_future_version(self):
160 + def _test_check_future_version(self):
161 install_ver = str(float(constants.MINIMUM_OVS_VXLAN_VERSION) + 0.01)
162 min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
163 self._check_ovs_vxlan_version(install_ver, install_ver,
164 min_kernel_ver, expecting_ok=True)
166 - def test_check_fail_version(self):
167 + def _test_check_fail_version(self):
168 install_ver = str(float(constants.MINIMUM_OVS_VXLAN_VERSION) - 0.01)
169 min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
170 self._check_ovs_vxlan_version(install_ver, install_ver,
171 min_kernel_ver, expecting_ok=False)
173 - def test_check_fail_no_version(self):
174 + def _test_check_fail_no_version(self):
175 min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
176 self._check_ovs_vxlan_version(None, None,
177 min_kernel_ver, expecting_ok=False)
179 - def test_check_fail_klm_version(self):
180 + def _test_check_fail_klm_version(self):
181 min_vxlan_ver = constants.MINIMUM_OVS_VXLAN_VERSION
182 min_kernel_ver = OVS_LINUX_KERN_VERS_WITHOUT_VXLAN
183 install_ver = str(float(min_vxlan_ver) - 0.01)
184 diff --git a/neutron/tests/unit/openvswitch/test_ovs_tunnel.py b/neutron/tests/unit/openvswitch/test_ovs_tunnel.py
185 index 126b9cc..2ae4fe8 100644
186 --- a/neutron/tests/unit/openvswitch/test_ovs_tunnel.py
187 +++ b/neutron/tests/unit/openvswitch/test_ovs_tunnel.py
188 @@ -249,7 +249,7 @@ class TunnelTest(base.BaseTestCase):
190 self._verify_mock_calls()
192 - def test_construct_vxlan(self):
193 + def _test_construct_vxlan(self):
194 with mock.patch.object(ovs_lib, 'get_installed_ovs_klm_version',
195 return_value="1.10") as klm_ver:
196 with mock.patch.object(ovs_lib, 'get_installed_ovs_usr_version',