Merge ~stub/charm-k8s-discourse:pgrel into charm-k8s-discourse:master

Proposed by Stuart Bishop
Status: Merged
Approved by: Tom Haddon
Approved revision: 13a5efd9fab9c562bb8beac4605b01d0a78cb147
Merged at revision: 9b0380f81d2e2cac9de5478dc0817acea82bbe34
Proposed branch: ~stub/charm-k8s-discourse:pgrel
Merge into: charm-k8s-discourse:master
Diff against target: 22 lines (+3/-1)
1 file modified
src/charm.py (+3/-1)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Canonical IS Reviewers Pending
Review via email: mp+391033@code.launchpad.net

Commit message

Call reconfigure method when database details change

Description of the change

Forgot to call the main configuration when the database connection details changed, which meant it didn't work unless the charm config was subsequently changed. So do that.

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
Tom Haddon (mthaddon) wrote :

LGTM, thx

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

Change successfully merged at revision 9b0380f81d2e2cac9de5478dc0817acea82bbe34

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/charm.py b/src/charm.py
2index aed2b46..b7e5e2b 100755
3--- a/src/charm.py
4+++ b/src/charm.py
5@@ -156,7 +156,7 @@ class DiscourseCharm(CharmBase):
6 def get_pod_spec(self, config):
7 return get_pod_spec(self.framework.model.app.name, config)
8
9- def configure_pod(self, event):
10+ def configure_pod(self, event=None):
11 # Set our status while we get configured.
12 self.model.unit.status = MaintenanceStatus('Configuring pod')
13
14@@ -206,6 +206,8 @@ class DiscourseCharm(CharmBase):
15 self.state.db_password = event.master.password
16 self.state.db_host = event.master.host
17
18+ self.configure_pod()
19+
20
21 if __name__ == '__main__': # pragma: no cover
22 main(DiscourseCharm)

Subscribers

People subscribed via source and target branches