Example #1
0
File: sbd.py Project: cwjenkins/pcs
def set_sbd_config_on_node(report_processor,
                           node_communicator,
                           node,
                           config,
                           watchdog,
                           device_list=None):
    """
    Send SBD configuration to 'node' with specified watchdog set. Also puts
    correct node name into SBD_OPTS option (SBD_OPTS="-n <node_name>").

    report_processor --
    node_communicator -- NodeCommunicator
    node -- NodeAddresses
    config -- dictionary in format: <SBD config option>: <value>
    watchdog -- path to watchdog device
    device_list -- list of strings
    """
    config = dict(config)
    config["SBD_OPTS"] = '"-n {node_name}"'.format(node_name=node.label)
    if watchdog:
        config["SBD_WATCHDOG_DEV"] = watchdog
    if device_list:
        config["SBD_DEVICE"] = '"{0}"'.format(";".join(device_list))
    set_sbd_config(node_communicator, node, dict_to_environment_file(config))
    report_processor.process(reports.sbd_config_accepted_by_node(node.label))
Example #2
0
File: sbd.py Project: dchirikov/pcs
def set_sbd_config_on_node(report_processor, node_communicator, node, config):
    """
    Send SBD configuration to 'node'. Also puts correct node name into
        SBD_OPTS option (SBD_OPTS="-n <node_name>").

    report_processor --
    node_communicator -- NodeCommunicator
    node -- NodeAddresses
    config -- dictionary in format: <SBD config option>: <value>
    """
    config = dict(config)
    config["SBD_OPTS"] = '"-n {node_name}"'.format(node_name=node.label)
    set_sbd_config(node_communicator, node, dict_to_environment_file(config))
    report_processor.process(
        reports.sbd_config_accepted_by_node(node.label)
    )
Example #3
0
File: sbd.py Project: idevat/pcs
def set_sbd_config_on_node(
    report_processor, node_communicator, node, config, watchdog
):
    """
    Send SBD configuration to 'node' with specified watchdog set. Also puts
    correct node name into SBD_OPTS option (SBD_OPTS="-n <node_name>").

    report_processor --
    node_communicator -- NodeCommunicator
    node -- NodeAddresses
    config -- dictionary in format: <SBD config option>: <value>
    watchdog -- path to watchdog device
    """
    config = dict(config)
    config["SBD_OPTS"] = '"-n {node_name}"'.format(node_name=node.label)
    if watchdog:
        config["SBD_WATCHDOG_DEV"] = watchdog
    set_sbd_config(node_communicator, node, dict_to_environment_file(config))
    report_processor.process(
        reports.sbd_config_accepted_by_node(node.label)
    )
Example #4
0
File: sbd.py Project: miz-take/pcs
 def _get_success_report(self, node_label):
     return reports.sbd_config_accepted_by_node(node_label)
Example #5
0
 def _get_success_report(self, node_label):
     return reports.sbd_config_accepted_by_node(node_label)