def update_status():
"""Use the update-status hook to check to see if we can restart the
manila-share service: (BUG#1706699). The bug appears to be a race-hazard
but it's proving very difficult to track it down.
This is a band-aid to enable the charm to get into a working state once all
of the interfaces have joined, and the bug has been hit; otherwise the
charm stays "stuck" with the service not running.
Note, there is no need to actually call update_status as one of the other
handlers will activate it.
"""
if not os_utils.is_unit_paused_set():
state, message = os_utils._ows_check_services_running(
services=['manila-share'],
ports=None)
if state == 'blocked':
# try to start the 'manila-share' service
ch_host.service_start('manila-share')
评论列表
文章目录