コード例 #1
0
def qdevice_setup(runner):
    """
    initialize qdevice on local host
    """
    if qdevice_initialized():
        raise LibraryError(reports.qdevice_already_initialized(__model))

    stdout, stderr, retval = runner.run([__qnetd_certutil, "-i"])
    if retval != 0:
        raise LibraryError(
            reports.qdevice_initialization_error(
                __model, join_multilines([stderr, stdout])))
コード例 #2
0
def qdevice_setup(runner):
    """
    initialize qdevice on local host
    """
    if external.is_dir_nonempty(
            settings.corosync_qdevice_net_server_certs_dir):
        raise LibraryError(reports.qdevice_already_initialized(__model))

    stdout, stderr, retval = runner.run([__qnetd_certutil, "-i"])
    if retval != 0:
        raise LibraryError(
            reports.qdevice_initialization_error(
                __model, join_multilines([stderr, stdout])))
コード例 #3
0
ファイル: qdevice_net.py プロジェクト: dchirikov/pcs
def qdevice_setup(runner):
    """
    initialize qdevice on local host
    """
    if external.is_dir_nonempty(settings.corosync_qdevice_net_server_certs_dir):
        raise LibraryError(reports.qdevice_already_initialized(__model))

    output, retval = runner.run([
        __qnetd_certutil, "-i"
    ])
    if retval != 0:
        raise LibraryError(
            reports.qdevice_initialization_error(__model, output.rstrip())
        )