Ensure services are not started while unit paused

Closes-Bug: #1983594
Change-Id: Ib05687d0146fee7609f36ca8692dafe0082846bc
This commit is contained in:
Corey Bryant 2022-08-04 14:48:11 +00:00
parent 13211f092c
commit 1dc253a098
2 changed files with 3 additions and 0 deletions

View File

@ -105,6 +105,7 @@ def config_rendered():
reactive.set_state('config.rendered')
@reactive.when_none('charm.paused')
@reactive.when('config.rendered', 'base-config.rendered')
def start_designate_services():
"""Enable services when database is synchronized"""

View File

@ -73,6 +73,8 @@ class TestRegisteredHooks(test_utils.TestRegisteredHooks):
'when_none': {
'clear_dns_config_available': (
'dns-slaves-config-valid', 'dns-backend.available', ),
'start_designate_services': (
'charm.paused', ),
},
'when_file_changed': {
'local_pools_updated': ('/etc/designate/pools.yaml', ),