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
This commit is contained in:
David Ames 2017-11-13 16:26:30 -08:00
parent c6513b0dc1
commit 1ee9f46543
4 changed files with 8 additions and 2 deletions

View File

@ -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()

View File

@ -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 }}

0
tests/gate-basic-xenial-pike Normal file → Executable file
View File

View File

@ -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