From 1ee9f465435c893613af86dd9f99ddbdfc2701d4 Mon Sep 17 00:00:00 2001 From: David Ames Date: Mon, 13 Nov 2017 16:26:30 -0800 Subject: [PATCH] Fix Ocata to Pike upgrade When upgrading from Ocata to Pike the context was not recognizing Pike until a subsequent hook run. Resetting os release fixes this. Enable xenia-pike amulet test. Closes-Bug: #1723981 Change-Id: I67ec257f0a91cf4108de54a2cd93ab0cc3663376 --- hooks/neutron_api_utils.py | 2 ++ templates/pike/neutron.conf | 6 +++++- tests/gate-basic-xenial-pike | 0 tox.ini | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) mode change 100644 => 100755 tests/gate-basic-xenial-pike diff --git a/hooks/neutron_api_utils.py b/hooks/neutron_api_utils.py index 046d4b40..7078b65c 100755 --- a/hooks/neutron_api_utils.py +++ b/hooks/neutron_api_utils.py @@ -46,6 +46,7 @@ from charmhelpers.contrib.openstack.utils import ( token_cache_pkgs, enable_memcache, CompareOpenStackReleases, + reset_os_release, ) from charmhelpers.contrib.python.packages import ( @@ -559,6 +560,7 @@ def do_openstack_upgrade(configs): ] apt_update(fatal=True) apt_upgrade(options=dpkg_opts, fatal=True, dist=True) + reset_os_release() pkgs = determine_packages(new_src) # Sort packages just to make unit tests easier pkgs.sort() diff --git a/templates/pike/neutron.conf b/templates/pike/neutron.conf index 263414b6..d9d2f8c4 100644 --- a/templates/pike/neutron.conf +++ b/templates/pike/neutron.conf @@ -1,4 +1,4 @@ -# newton +# pike ############################################################################### # [ WARNING ] # Configuration file maintained by Juju. Local changes may be overwritten. @@ -16,6 +16,10 @@ rpc_workers = {{ workers }} router_distributed = {{ enable_dvr }} +{% if dns_domain -%} +dns_domain = {{ dns_domain }} +{% endif -%} + l3_ha = {{ l3_ha }} {% if l3_ha -%} max_l3_agents_per_router = {{ max_l3_agents_per_router }} diff --git a/tests/gate-basic-xenial-pike b/tests/gate-basic-xenial-pike old mode 100644 new mode 100755 diff --git a/tox.ini b/tox.ini index 7c2936e3..6d44f4b9 100644 --- a/tox.ini +++ b/tox.ini @@ -60,7 +60,7 @@ basepython = python2.7 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = - bundletester -vl DEBUG -r json -o func-results.json gate-basic-xenial-mitaka --no-destroy + bundletester -vl DEBUG -r json -o func-results.json gate-basic-xenial-pike --no-destroy [testenv:func27-dfs] # Charm Functional Test