示例#1
0
文件: stonith.py 项目: wuyeliang/pcs
def history_update(env):
    """
    Update fencing history in a cluster (sync with other nodes)

    LibraryEnvironment env
    """
    if not is_fence_history_supported():
        raise LibraryError(reports.fence_history_not_supported())

    try:
        return fence_history_update(env.cmd_runner())
    except FenceHistoryCommandErrorException as e:
        raise LibraryError(
            reports.fence_history_command_error(str(e), "update"))
示例#2
0
文件: stonith.py 项目: tomjelinek/pcs
def history_update(env):
    """
    Update fencing history in a cluster (sync with other nodes)

    LibraryEnvironment env
    """
    if not is_fence_history_supported():
        raise LibraryError(reports.fence_history_not_supported())

    try:
        return fence_history_update(env.cmd_runner())
    except FenceHistoryCommandErrorException as e:
        raise LibraryError(
            reports.fence_history_command_error(str(e), "update")
        )
示例#3
0
def history_update(env: LibraryEnvironment):
    """
    Update fencing history in a cluster (sync with other nodes)

    env
    """
    runner = env.cmd_runner()
    if not is_fence_history_supported_management(runner):
        raise LibraryError(
            ReportItem.error(reports.messages.FenceHistoryNotSupported()))

    try:
        return fence_history_update(runner)
    except FenceHistoryCommandErrorException as e:
        raise LibraryError(
            ReportItem.error(
                reports.messages.FenceHistoryCommandError(str(e), "update")))