summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-12-21 12:36:36 -0500
committerTim Rozet <trozet@redhat.com>2018-12-22 01:34:50 +0000
commit86c8042bcd60d8fa73ed43bc780186595f6edd4c (patch)
treed23efa9f842a285e7ab9b6a237d4238b71d6b782
parent0377ac5fa5212f2a58e0b3279290c651e7e2b494 (diff)
Always update OVS to 2.9.2
Right now RDO defaults to an old version of OVS. In Apex for non-sfc scenarios we were pulling a prebuilt RPM of OVS 2.9.0 that included a group tables fix needed for ODL. For SFC, we now just build OVS along with the kernel module from native OVS because NSH support exists upstream in that version. We can move to always doing this operation for all OVS based scenarios, which will bump our OVS and ensure the package we build at runtime will work with our kernel. Change-Id: If38d0b858878f1af66990d987612a8f8f6fa2718 Signed-off-by: Tim Rozet <trozet@redhat.com> (cherry picked from commit 4f988328adf5dd8735bbf0a9420528cd343cfcd3)
-rw-r--r--apex/overcloud/deploy.py19
-rw-r--r--apex/tests/test_apex_overcloud_deploy.py14
2 files changed, 15 insertions, 18 deletions
diff --git a/apex/overcloud/deploy.py b/apex/overcloud/deploy.py
index eeab42c1..a2a41fa6 100644
--- a/apex/overcloud/deploy.py
+++ b/apex/overcloud/deploy.py
@@ -366,21 +366,10 @@ def prep_image(ds, ns, img, tmp_dir, root_pw=None, docker_tag=None,
virt_cmds.append({con.VIRT_PW: pw_op})
if dataplane == 'ovs':
- if ds_opts['sfc']:
- oc_builder.inject_ovs_nsh(tmp_oc_image, tmp_dir)
- elif sdn == 'opendaylight':
- # FIXME(trozet) remove this after RDO is updated with fix for
- # https://bugzilla.redhat.com/show_bug.cgi?id=1544892
- ovs_file = os.path.basename(con.CUSTOM_OVS)
- ovs_url = con.CUSTOM_OVS.replace(ovs_file, '')
- utils.fetch_upstream_and_unpack(dest=tmp_dir, url=ovs_url,
- targets=[ovs_file])
- virt_cmds.extend([
- {con.VIRT_UPLOAD: "{}:/root/".format(os.path.join(tmp_dir,
- ovs_file))},
- {con.VIRT_RUN_CMD: "yum downgrade -y /root/{}".format(
- ovs_file)}
- ])
+ # FIXME(trozet) remove this after RDO is updated with fix for
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1544892
+ # https://review.rdoproject.org/r/#/c/13839/
+ oc_builder.inject_ovs_nsh(tmp_oc_image, tmp_dir)
if dataplane == 'fdio':
# Patch neutron with using OVS external interface for router
diff --git a/apex/tests/test_apex_overcloud_deploy.py b/apex/tests/test_apex_overcloud_deploy.py
index a70057b9..86c37602 100644
--- a/apex/tests/test_apex_overcloud_deploy.py
+++ b/apex/tests/test_apex_overcloud_deploy.py
@@ -234,6 +234,7 @@ class TestOvercloudDeploy(unittest.TestCase):
prep_image(ds, ns, 'undercloud.qcow2', '/tmp', root_pw='test')
mock_virt_utils.virt_customize.assert_called()
+ @patch('apex.builders.overcloud_builder.inject_ovs_nsh')
@patch('apex.overcloud.deploy.utils.fetch_upstream_and_unpack')
@patch('apex.builders.overcloud_builder.inject_opendaylight')
@patch('apex.overcloud.deploy.virt_utils')
@@ -241,7 +242,8 @@ class TestOvercloudDeploy(unittest.TestCase):
@patch('apex.overcloud.deploy.os.path.isfile')
@patch('builtins.open', mock_open())
def test_prep_image_sdn_odl(self, mock_is_file, mock_shutil,
- mock_virt_utils, mock_inject_odl, mock_fetch):
+ mock_virt_utils, mock_inject_odl,
+ mock_fetch, mock_ovs_nsh):
mock_is_file.return_value = True
ds_opts = {'dataplane': 'ovs',
'sdn_controller': 'opendaylight',
@@ -259,6 +261,7 @@ class TestOvercloudDeploy(unittest.TestCase):
prep_image(ds, ns, 'undercloud.qcow2', '/tmp', root_pw='test')
mock_virt_utils.virt_customize.assert_called()
mock_inject_odl.assert_called()
+ mock_ovs_nsh.assert_called()
@patch('apex.overcloud.deploy.c_builder')
@patch('apex.overcloud.deploy.oc_builder')
@@ -340,12 +343,13 @@ class TestOvercloudDeploy(unittest.TestCase):
mock_virt_utils.virt_customize.assert_called()
mock_oc_builder.inject_opendaylight.assert_called()
+ @patch('apex.builders.overcloud_builder.inject_ovs_nsh')
@patch('apex.overcloud.deploy.virt_utils')
@patch('apex.overcloud.deploy.shutil')
@patch('apex.overcloud.deploy.os.path.isfile')
@patch('builtins.open', mock_open())
def test_prep_image_sdn_ovn(self, mock_is_file, mock_shutil,
- mock_virt_utils):
+ mock_virt_utils, mock_ovs_nsh):
mock_is_file.return_value = True
ds_opts = {'dataplane': 'ovs',
'vpn': False,
@@ -358,7 +362,9 @@ class TestOvercloudDeploy(unittest.TestCase):
ns = MagicMock()
prep_image(ds, ns, 'undercloud.qcow2', '/tmp', root_pw='test')
mock_virt_utils.virt_customize.assert_called()
+ mock_ovs_nsh.assert_called()
+ @patch('apex.builders.overcloud_builder.inject_ovs_nsh')
@patch('apex.overcloud.deploy.utils.fetch_upstream_and_unpack')
@patch('apex.builders.overcloud_builder.inject_quagga')
@patch('apex.builders.overcloud_builder.inject_opendaylight')
@@ -368,7 +374,8 @@ class TestOvercloudDeploy(unittest.TestCase):
@patch('builtins.open', mock_open())
def test_prep_image_sdn_odl_vpn(self, mock_is_file, mock_shutil,
mock_virt_utils, mock_inject_odl,
- mock_inject_quagga, mock_fetch):
+ mock_inject_quagga, mock_fetch,
+ mock_ovs_nsh):
mock_is_file.return_value = True
ds_opts = {'dataplane': 'ovs',
'sdn_controller': 'opendaylight',
@@ -387,6 +394,7 @@ class TestOvercloudDeploy(unittest.TestCase):
mock_virt_utils.virt_customize.assert_called()
mock_inject_odl.assert_called()
mock_inject_quagga.assert_called()
+ mock_ovs_nsh.assert_called()
@patch('apex.builders.overcloud_builder.inject_ovs_nsh')
@patch('apex.builders.overcloud_builder.inject_opendaylight')