From 56d60366c775b309c6d989d4ac0399a3ef10e17e Mon Sep 17 00:00:00 2001 From: James Page Date: Thu, 16 Aug 2018 11:36:46 +0100 Subject: [PATCH] Deal with lack of neutron-plugin-openvswitch-agent The neutron-plugin-openvswitch-agent package has been dropped @ Rocky. Pre-install neutron-common and ensure any previously cached os_release value is reset when evaluating which OpenStack release is being installed, ensuring that the correct package for the neutron-openvswitch-agent is used. Closes-Bug: #1788266 Change-Id: I1224aa7f5e7caa6a8aaf2ab3043fac9c62735749 --- hooks/neutron_ovs_utils.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hooks/neutron_ovs_utils.py b/hooks/neutron_ovs_utils.py index ec165789..3c83c58d 100644 --- a/hooks/neutron_ovs_utils.py +++ b/hooks/neutron_ovs_utils.py @@ -217,6 +217,11 @@ DATA_BRIDGE = 'br-data' def install_packages(): status_set('maintenance', 'Installing apt packages') apt_update() + # NOTE(jamespage): install neutron-common package so we always + # get a clear signal on which OS release is + # being deployed + apt_install(filter_installed_packages(['neutron-common']), + fatal=True) # NOTE(jamespage): ensure early install of dkms related # dependencies for kernels which need # openvswitch via dkms (12.04). @@ -252,7 +257,8 @@ def determine_packages(): pkgs.extend(METADATA_PACKAGES) cmp_release = CompareOpenStackReleases( - os_release('neutron-common', base='icehouse')) + os_release('neutron-common', base='icehouse', + reset_cache=True)) if cmp_release >= 'mitaka' and 'neutron-plugin-openvswitch-agent' in pkgs: pkgs.remove('neutron-plugin-openvswitch-agent') pkgs.append('neutron-openvswitch-agent')