Merge ~jfguedez/charm-openstack-service-checks:bug/1914115 into charm-openstack-service-checks:master

Proposed by Jose Guedez
Status: Merged
Approved by: James Troup
Approved revision: 1daf37317b9311bc4c619fef72af0321bd25226f
Merged at revision: a9059f67025d346f10e0b2b427127f4b319ec3c8
Proposed branch: ~jfguedez/charm-openstack-service-checks:bug/1914115
Merge into: charm-openstack-service-checks:master
Diff against target: 23 lines (+12/-0)
1 file modified
src/reactive/openstack_service_checks.py (+12/-0)
Reviewer Review Type Date Requested Status
🤖 prod-jenkaas-bootstack (community) continuous-integration Needs Fixing
BootStack Reviewers Pending
BootStack Reviewers Pending
Review via email: mp+409135@code.launchpad.net

Commit message

Cleanup when nrpe-external-master is removed

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
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jose Guedez (jfguedez) wrote :

CI failed, but it's unrelated to the changes, there seem to be network connectivity issues on the jenkins node:

2021-09-24 09:55:16 INFO: Recreating container "lp-charm-test-unit-withcompiler"
2021-09-24 09:55:16 INFO: Checking if container exists
2021-09-24 09:55:16 INFO: Running: lxc launch ubuntu:focal lp-charm-test-unit-withcompiler
Creating lp-charm-test-unit-withcompiler
Error: Failed instance creation: Get "https://cloud-images.ubuntu.com/releases/server/releases/focal/release-20210415/ubuntu-20.04-server-cloudimg-amd64-lxd.tar.xz": Unable to connect to: cloud-images.ubuntu.com:443
Build step 'Execute shell' marked build as failure
Finished: FAILURE

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
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision a9059f67025d346f10e0b2b427127f4b319ec3c8

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/reactive/openstack_service_checks.py b/src/reactive/openstack_service_checks.py
2index 9c99652..d06f8e2 100644
3--- a/src/reactive/openstack_service_checks.py
4+++ b/src/reactive/openstack_service_checks.py
5@@ -316,6 +316,18 @@ def parse_hooks():
6 clear_flag("openstack-service-checks.configured")
7
8
9+@when_not("nrpe-external-master.available")
10+@when("openstack-service-checks.installed")
11+@when("openstack-service-checks.configured")
12+def nrpe_relation_reparted():
13+ """Cleanup after the nrpe relation is removed."""
14+ hookenv.log(
15+ "nrpe-external-master not available (relation departed), clearing flags"
16+ )
17+ clear_flag("openstack-service-checks.installed")
18+ clear_flag("openstack-service-checks.configured")
19+
20+
21 def _set_keystone_error_workload_status(keystone_error):
22 error_status_message = (
23 "Failed to create endpoint checks due issue communicating with Keystone"

Subscribers

People subscribed via source and target branches

to all changes: