Merge ~aluria/charm-openstack-service-checks/+git/charm-openstack-service-checks:bug/1875627 into ~llama-charmers/charm-openstack-service-checks:master

Proposed by Alvaro Uria
Status: Merged
Approved by: Jeremy Lounder
Approved revision: 0880d739b4e599367636604cad5204c16e8de7b6
Merged at revision: 8eb1380e7762b52e06a768493a1ee7a6768bb11e
Proposed branch: ~aluria/charm-openstack-service-checks/+git/charm-openstack-service-checks:bug/1875627
Merge into: ~llama-charmers/charm-openstack-service-checks:master
Diff against target: 70 lines (+8/-6)
4 files modified
layer.yaml (+2/-5)
lib/lib_openstack_service_checks.py (+2/-0)
metadata.yaml (+1/-0)
tests/functional/test_deploy.py (+3/-1)
Reviewer Review Type Date Requested Status
Jeremy Lounder (community) Approve
Wouter van Bommel (community) Approve
Review via email: mp+383075@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alvaro Uria (aluria) wrote :

This MP limits the use to python3 packages. keystoneauth1 is imported in a lib used by the reactive script, and needs to be installed by layer-basic. For such reason, default python3 modules (keystoneclient, openstackclient) are also installed via layer-basic.

With regard to python3-octaviaclient, it is installed only if Octavia is supported (from bionic onwards and if the Juju config parameter is enabled).

Finally, support on focal has also been tested as is, and since it works as expected it has been included in this MP.

* lint: commands succeeded
* unit: 15 passed, 17 warnings in 1.24s
* func: 22 passed, 10804 warnings in 1166.94s (0:19:26)

Revision history for this message
Wouter van Bommel (woutervb) wrote :

lgtm

review: Approve
Revision history for this message
Jeremy Lounder (jldev) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/layer.yaml b/layer.yaml
2index 0606d45..2ba89c2 100644
3--- a/layer.yaml
4+++ b/layer.yaml
5@@ -10,18 +10,15 @@ includes:
6 - 'interface:keystone-notifications'
7 - 'interface:nrpe-external-master'
8 ignore: ['.*.swp' ]
9-repo: 'lp:~canonical-bootstack/+git/charm-openstack-service-checks'
10+repo: 'lp:charm-openstack-service-checks'
11 options:
12 basic:
13 use_venv: true
14 include_system_packages: true
15 packages:
16- - nagios-nrpe-server
17+ - python3-keystoneauth1
18 - python3-keystoneclient
19 - python3-openstackclient
20- - python-openstackclient
21- - python3-octaviaclient
22- - python-octaviaclient
23 snap:
24 fcbtest:
25 channel: stable
26diff --git a/lib/lib_openstack_service_checks.py b/lib/lib_openstack_service_checks.py
27index 3ec61b1..25607d9 100644
28--- a/lib/lib_openstack_service_checks.py
29+++ b/lib/lib_openstack_service_checks.py
30@@ -8,6 +8,7 @@ from urllib.parse import urlparse
31
32 import configparser
33
34+from charmhelpers import fetch
35 from charmhelpers.core.templating import render
36 from charmhelpers.contrib.openstack.utils import config_flags_parser
37 from charmhelpers.core import hookenv, host, unitdata
38@@ -201,6 +202,7 @@ class OSCHelper():
39 # only care about octavia after 18.04
40 if host.lsb_release()['DISTRIB_RELEASE'] >= '18.04':
41 if self.is_octavia_check_enabled:
42+ fetch.apt_install(["python3-octaviaclient"], fatal=True)
43 script = os.path.join(self.plugins_dir, 'check_octavia.py')
44
45 for check in ('loadbalancers', 'amphorae', 'pools'):
46diff --git a/metadata.yaml b/metadata.yaml
47index 94a7db8..eaf778e 100644
48--- a/metadata.yaml
49+++ b/metadata.yaml
50@@ -8,6 +8,7 @@ tags:
51 - ops
52 - monitoring
53 series:
54+- focal
55 - bionic
56 - xenial
57 - trusty
58diff --git a/tests/functional/test_deploy.py b/tests/functional/test_deploy.py
59index 9ddc19c..163f130 100644
60--- a/tests/functional/test_deploy.py
61+++ b/tests/functional/test_deploy.py
62@@ -8,7 +8,9 @@ pytestmark = pytest.mark.asyncio
63
64 SERIES = [
65 'xenial',
66- 'bionic']
67+ 'bionic',
68+ 'focal',
69+]
70 CHARM_BUILD_DIR = os.getenv('CHARM_BUILD_DIR', '.').rstrip('/')
71
72

Subscribers

People subscribed via source and target branches