Merge ~peppepetra/charm-prometheus-libvirt-exporter:lp1956433 into charm-prometheus-libvirt-exporter:master

Proposed by Giuseppe Petralia
Status: Merged
Approved by: James Troup
Approved revision: b6f0cb96e36c926b3abad0c503cbea649e1ab2cb
Merged at revision: a98677abf144f89e294e4558aa9d90804d354440
Proposed branch: ~peppepetra/charm-prometheus-libvirt-exporter:lp1956433
Merge into: charm-prometheus-libvirt-exporter:master
Diff against target: 64 lines (+19/-2)
4 files modified
src/reactive/prometheus-libvirt-exporter.py (+4/-0)
src/tests/functional/requirements.txt (+1/-0)
src/tests/functional/tests/tests.yaml (+4/-2)
src/tox.ini (+10/-0)
Reviewer Review Type Date Requested Status
🤖 prod-jenkaas-bootstack continuous-integration Approve
Canonical IS Reviewers Pending
BootStack Reviewers Pending
BootStack Reviewers Pending
Review via email: mp+413662@code.launchpad.net

Commit message

Check if apparmor libvirtd profile exists before opening it.

To post a comment you must log in.
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision a98677abf144f89e294e4558aa9d90804d354440

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/reactive/prometheus-libvirt-exporter.py b/src/reactive/prometheus-libvirt-exporter.py
2index 6da8e79..a1c4dc3 100644
3--- a/src/reactive/prometheus-libvirt-exporter.py
4+++ b/src/reactive/prometheus-libvirt-exporter.py
5@@ -218,6 +218,10 @@ def configure_libvirtd_apparmor_local_profile(libvirtd_apparmor_local_profile):
6 "deny ptrace (read) peer=snap.prometheus-libvirt-exporter.daemon,"
7 )
8
9+ # if there is no libvirtd installed this is a noop
10+ if not os.path.exists(libvirtd_apparmor_local_profile):
11+ return
12+
13 # Read current local profile and strip new lines.
14 current_profile_lines = open(libvirtd_apparmor_local_profile, "r").readlines()
15 current_profile_lines = list(map(str.strip, current_profile_lines))
16diff --git a/src/tests/functional/requirements.txt b/src/tests/functional/requirements.txt
17index 4e8f16b..9f7e79c 100644
18--- a/src/tests/functional/requirements.txt
19+++ b/src/tests/functional/requirements.txt
20@@ -1,2 +1,3 @@
21 git+https://github.com/openstack-charmers/zaza.git#egg=zaza
22 requests
23+python-openstackclient
24\ No newline at end of file
25diff --git a/src/tests/functional/tests/tests.yaml b/src/tests/functional/tests/tests.yaml
26index 459785a..429812c 100644
27--- a/src/tests/functional/tests/tests.yaml
28+++ b/src/tests/functional/tests/tests.yaml
29@@ -8,10 +8,12 @@ smoke_bundles:
30 dev_bundles:
31 - bionic
32 target_deploy_status:
33+ ubuntu:
34+ workload-status-message-prefix: ""
35 grafana:
36- workload-status-message: Started
37+ workload-status-message-prefix: Started
38 nrpe:
39 workload-status: blocked
40- workload-status-message: Nagios server not configured or related
41+ workload-status-message-prefix: Nagios server not configured or related
42 tests:
43 - tests.test_prometheus_libvirt_exporter.CharmOperationTest
44diff --git a/src/tox.ini b/src/tox.ini
45index a46b006..2144384 100644
46--- a/src/tox.ini
47+++ b/src/tox.ini
48@@ -21,6 +21,16 @@ passenv =
49 NO_PROXY
50 SNAP_HTTP_PROXY
51 SNAP_HTTPS_PROXY
52+ OS_REGION_NAME
53+ OS_AUTH_VERSION
54+ OS_AUTH_URL
55+ OS_PROJECT_DOMAIN_NAME
56+ OS_USERNAME
57+ OS_PASSWORD
58+ OS_PROJECT_ID
59+ OS_USER_DOMAIN_NAME
60+ OS_PROJECT_NAME
61+ OS_IDENTITY_API_VERSION
62
63 [testenv:lint]
64 commands =

Subscribers

People subscribed via source and target branches

to all changes: