From 09f5a51dd9f01efe0d97aba6eaaf38904613398b Mon Sep 17 00:00:00 2001 From: Corey Bryant Date: Mon, 13 Jul 2020 19:01:02 +0000 Subject: [PATCH] Sync charm-helpers for Victoria/Groovy updates This sync picks up the release and version details for Victoria/Groovy. Change-Id: I21438bca663807b7440f7ad99979232d1960c971 --- .../contrib/openstack/amulet/deployment.py | 3 +++ charmhelpers/contrib/openstack/amulet/utils.py | 1 + charmhelpers/contrib/openstack/context.py | 11 +++++++++++ charmhelpers/contrib/openstack/utils.py | 14 ++++++++++++++ charmhelpers/core/hookenv.py | 6 ++++-- charmhelpers/fetch/ubuntu.py | 8 ++++++++ 6 files changed, 41 insertions(+), 2 deletions(-) diff --git a/charmhelpers/contrib/openstack/amulet/deployment.py b/charmhelpers/contrib/openstack/amulet/deployment.py index dd3aebe..94ca079 100644 --- a/charmhelpers/contrib/openstack/amulet/deployment.py +++ b/charmhelpers/contrib/openstack/amulet/deployment.py @@ -300,6 +300,8 @@ class OpenStackAmuletDeployment(AmuletDeployment): ('disco', None): self.disco_stein, ('eoan', None): self.eoan_train, ('focal', None): self.focal_ussuri, + ('focal', 'cloud:focal-victoria'): self.focal_victoria, + ('groovy', None): self.groovy_victoria, } return releases[(self.series, self.openstack)] @@ -319,6 +321,7 @@ class OpenStackAmuletDeployment(AmuletDeployment): ('disco', 'stein'), ('eoan', 'train'), ('focal', 'ussuri'), + ('groovy', 'victoria'), ]) if self.openstack: os_origin = self.openstack.split(':')[1] diff --git a/charmhelpers/contrib/openstack/amulet/utils.py b/charmhelpers/contrib/openstack/amulet/utils.py index 1486419..63aea1e 100644 --- a/charmhelpers/contrib/openstack/amulet/utils.py +++ b/charmhelpers/contrib/openstack/amulet/utils.py @@ -63,6 +63,7 @@ OPENSTACK_RELEASES_PAIRS = [ 'bionic_stein', 'disco_stein', 'bionic_train', 'eoan_train', 'bionic_ussuri', 'focal_ussuri', + 'focal_victoria', 'groovy_victoria', ] diff --git a/charmhelpers/contrib/openstack/context.py b/charmhelpers/contrib/openstack/context.py index 540677c..42abccf 100644 --- a/charmhelpers/contrib/openstack/context.py +++ b/charmhelpers/contrib/openstack/context.py @@ -2798,6 +2798,17 @@ class BridgePortInterfaceMap(object): self.add_interface( bridge, portname, ifname, iftype, pci_address, global_mtu) + if not macs: + # We have not mapped the interface and it is probably some sort + # of virtual interface. Our user have put it in the config with + # a purpose so let's carry out their wish. LP: #1884743 + log('Add unmapped interface from config: name "{}" bridge "{}"' + .format(ifname, bridge), + level=DEBUG) + self.add_interface( + bridge, ifname, ifname, self.interface_type.system, None, + global_mtu) + def __getitem__(self, key): """Provide a Dict-like interface, get value of item. diff --git a/charmhelpers/contrib/openstack/utils.py b/charmhelpers/contrib/openstack/utils.py index fbf0156..f21625d 100644 --- a/charmhelpers/contrib/openstack/utils.py +++ b/charmhelpers/contrib/openstack/utils.py @@ -143,6 +143,7 @@ OPENSTACK_RELEASES = ( 'stein', 'train', 'ussuri', + 'victoria', ) UBUNTU_OPENSTACK_RELEASE = OrderedDict([ @@ -164,6 +165,7 @@ UBUNTU_OPENSTACK_RELEASE = OrderedDict([ ('disco', 'stein'), ('eoan', 'train'), ('focal', 'ussuri'), + ('groovy', 'victoria'), ]) @@ -186,6 +188,7 @@ OPENSTACK_CODENAMES = OrderedDict([ ('2019.1', 'stein'), ('2019.2', 'train'), ('2020.1', 'ussuri'), + ('2020.2', 'victoria'), ]) # The ugly duckling - must list releases oldest to newest @@ -226,6 +229,8 @@ SWIFT_CODENAMES = OrderedDict([ ['2.22.0', '2.23.0']), ('ussuri', ['2.24.0', '2.25.0']), + ('victoria', + ['2.25.0']), ]) # >= Liberty version->codename mapping @@ -241,6 +246,7 @@ PACKAGE_CODENAMES = { ('19', 'stein'), ('20', 'train'), ('21', 'ussuri'), + ('22', 'victoria'), ]), 'neutron-common': OrderedDict([ ('7', 'liberty'), @@ -253,6 +259,7 @@ PACKAGE_CODENAMES = { ('14', 'stein'), ('15', 'train'), ('16', 'ussuri'), + ('17', 'victoria'), ]), 'cinder-common': OrderedDict([ ('7', 'liberty'), @@ -265,6 +272,7 @@ PACKAGE_CODENAMES = { ('14', 'stein'), ('15', 'train'), ('16', 'ussuri'), + ('17', 'victoria'), ]), 'keystone': OrderedDict([ ('8', 'liberty'), @@ -277,6 +285,7 @@ PACKAGE_CODENAMES = { ('15', 'stein'), ('16', 'train'), ('17', 'ussuri'), + ('18', 'victoria'), ]), 'horizon-common': OrderedDict([ ('8', 'liberty'), @@ -289,6 +298,7 @@ PACKAGE_CODENAMES = { ('15', 'stein'), ('16', 'train'), ('18', 'ussuri'), + ('19', 'victoria'), ]), 'ceilometer-common': OrderedDict([ ('5', 'liberty'), @@ -301,6 +311,7 @@ PACKAGE_CODENAMES = { ('12', 'stein'), ('13', 'train'), ('14', 'ussuri'), + ('15', 'victoria'), ]), 'heat-common': OrderedDict([ ('5', 'liberty'), @@ -313,6 +324,7 @@ PACKAGE_CODENAMES = { ('12', 'stein'), ('13', 'train'), ('14', 'ussuri'), + ('15', 'victoria'), ]), 'glance-common': OrderedDict([ ('11', 'liberty'), @@ -325,6 +337,7 @@ PACKAGE_CODENAMES = { ('18', 'stein'), ('19', 'train'), ('20', 'ussuri'), + ('21', 'victoria'), ]), 'openstack-dashboard': OrderedDict([ ('8', 'liberty'), @@ -337,6 +350,7 @@ PACKAGE_CODENAMES = { ('15', 'stein'), ('16', 'train'), ('18', 'ussuri'), + ('19', 'victoria'), ]), } diff --git a/charmhelpers/core/hookenv.py b/charmhelpers/core/hookenv.py index d7c37c1..db7ce72 100644 --- a/charmhelpers/core/hookenv.py +++ b/charmhelpers/core/hookenv.py @@ -372,8 +372,10 @@ class Config(dict): try: self._prev_dict = json.load(f) except ValueError as e: - log('Unable to parse previous config data - {}'.format(str(e)), - level=ERROR) + log('Found but was unable to parse previous config data, ' + 'ignoring which will report all values as changed - {}' + .format(str(e)), level=ERROR) + return for k, v in copy.deepcopy(self._prev_dict).items(): if k not in self: self[k] = v diff --git a/charmhelpers/fetch/ubuntu.py b/charmhelpers/fetch/ubuntu.py index 3ddaf0d..3315284 100644 --- a/charmhelpers/fetch/ubuntu.py +++ b/charmhelpers/fetch/ubuntu.py @@ -190,6 +190,14 @@ CLOUD_ARCHIVE_POCKETS = { 'ussuri/proposed': 'bionic-proposed/ussuri', 'bionic-ussuri/proposed': 'bionic-proposed/ussuri', 'bionic-proposed/ussuri': 'bionic-proposed/ussuri', + # Victoria + 'victoria': 'focal-updates/victoria', + 'focal-victoria': 'focal-updates/victoria', + 'focal-victoria/updates': 'focal-updates/victoria', + 'focal-updates/victoria': 'focal-updates/victoria', + 'victoria/proposed': 'focal-proposed/victoria', + 'focal-victoria/proposed': 'focal-proposed/victoria', + 'focal-proposed/victoria': 'focal-proposed/victoria', }