Skip to content

Commit

Permalink
Check if leader before creating monitoring user (#229)
Browse files Browse the repository at this point in the history
`self._put_monitoring_user()` puts information in app databag

Fixes integration test error seen on #211
  • Loading branch information
carlcsaposs-canonical authored Apr 12, 2024
1 parent dde6b53 commit 3ad1deb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/charms/opensearch/v0/opensearch_base_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,9 @@ def _post_start_init(self, event: EventBase):
# apply cluster health
self.health.apply()

# Creating the monitoring user
self._put_monitoring_user()
if self.unit.is_leader():
# Creating the monitoring user
self._put_monitoring_user()

# clear waiting to start status
self.status.clear(WaitingToStart)
Expand Down

0 comments on commit 3ad1deb

Please sign in to comment.