Merge ~tiago.pasqualini/charm-graylog:fix_1794630 into ~graylog-charmers/charm-graylog:master

Proposed by Tiago Pasqualini da Silva
Status: Merged
Approved by: Tom Haddon
Approved revision: a13693800f358639dc220781ae3c6abad7b84255
Merged at revision: a48a96bf742c6af701d8542ded754f5c4fac7f1c
Proposed branch: ~tiago.pasqualini/charm-graylog:fix_1794630
Merge into: ~graylog-charmers/charm-graylog:master
Diff against target: 12 lines (+1/-0)
1 file modified
reactive/graylog.py (+1/-0)
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
Canonical IS Reviewers Pending
Review via email: mp+367145@code.launchpad.net

Commit message

Fix configure_mongodb_connection called on stop

Description of the change

This commit fixes LP 1794630 by adding an extra condition to run configure_mongodb_connection. This avoids it being called when the application is being removed.

To post a comment you must log in.
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
Stuart Bishop (stub) wrote :

Yup. The mongodb interface is undocumented, but a quick look at the source indicates that this is the correct flag to use.

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

Change successfully merged at revision a48a96bf742c6af701d8542ded754f5c4fac7f1c

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/reactive/graylog.py b/reactive/graylog.py
2index cc5ff2e..786df04 100644
3--- a/reactive/graylog.py
4+++ b/reactive/graylog.py
5@@ -480,6 +480,7 @@ def configure_elasticsearch_connection(elasticsearch):
6
7 @when('graylog.configured')
8 @when('mongodb.available')
9+@when_not('mongodb.removed')
10 def configure_mongodb_connection(mongodb):
11 mongodb_hosts = []
12 for mongo_host in mongodb.connection_strings():

Subscribers

People subscribed via source and target branches