Skip to content

Commit

Permalink
Add requires to Notifier service
Browse files Browse the repository at this point in the history
Autostart of mix of service dependencies
resulted in panic mode pebble, see bug [1]

As a workaround, add Requires to notifier
service definition.

[1] canonical/pebble#525
  • Loading branch information
hemanthnakkina committed Nov 27, 2024
1 parent ce7737e commit 000be3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ def _rabbitmq_layer(self) -> dict:
"summary": "Pebble notifier",
"command": "/usr/bin/notifier",
"startup": "enabled",
# Workaround to avoid bug
# https://github.com/canonical/pebble/issues/525
"requires": [RABBITMQ_SERVICE],
},
},
}
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def test_rabbitmq_pebble_ready(self):
"override": "replace",
"startup": "enabled",
"summary": "Pebble notifier",
"requires": ["rabbitmq"],
},
"epmd": {
"override": "replace",
Expand Down

0 comments on commit 000be3e

Please sign in to comment.