manila_handlers.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:charm-manila 作者: openstack 项目源码 文件源码
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')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号