Esempio n. 1
0
def cman_ignored_option(option):
    """
    specified option is ignored as CMAN clusters do not support it
    options string option name
    """
    return ReportItem.warning(report_codes.IGNORED_CMAN_UNSUPPORTED_OPTION,
                              info={'option_name': option})
Esempio n. 2
0
def cman_broadcast_all_rings():
    """
    broadcast enabled in all rings, CMAN doesn't support 1 ring only broadcast
    """
    return ReportItem.warning(
        report_codes.CMAN_BROADCAST_ALL_RINGS,
    )
Esempio n. 3
0
def omitting_node(node):
    """
    warning that specified node will be omitted in following actions

    node -- node name
    """
    return ReportItem.warning(report_codes.OMITTING_NODE, info={"node": node})
Esempio n. 4
0
def cluster_restart_required_to_apply_changes():
    """
    warn user a cluster needs to be manually restarted to use new configuration
    """
    return ReportItem.warning(
        report_codes.CLUSTER_RESTART_REQUIRED_TO_APPLY_CHANGES,
    )
Esempio n. 5
0
def sbd_requires_atb():
    """
    Warning that ATB will be enabled in order to make SBD fencing effective.
    """
    return ReportItem.warning(
        report_codes.SBD_REQUIRES_ATB,
    )
Esempio n. 6
0
def cman_udpu_restart_required():
    """
    warn user it is required to restart CMAN cluster for changes to take effect
    """
    return ReportItem.warning(
        report_codes.CMAN_UDPU_RESTART_REQUIRED,
    )
Esempio n. 7
0
def booth_unsupported_file_location(file):
    """
    location of booth configuration file (config, authfile) file is not
    supported (not in /etc/booth/)

    file -- file path
    """
    return ReportItem.warning(report_codes.BOOTH_UNSUPORTED_FILE_LOCATION,
                              info={"file": file})
Esempio n. 8
0
def cman_ignored_option(option):
    """
    specified option is ignored as CMAN clusters do not support it
    options string option name
    """
    return ReportItem.warning(
        report_codes.IGNORED_CMAN_UNSUPPORTED_OPTION,
        info={'option_name': option}
    )
Esempio n. 9
0
def cman_broadcast_all_rings():
    """
    broadcast enabled in all rings, CMAN doesn't support 1 ring only broadcast
    """
    return ReportItem.warning(
        report_codes.CMAN_BROADCAST_ALL_RINGS,
        "Enabling broadcast for all rings as CMAN does not support "
            + "broadcast in only one ring"
    )
Esempio n. 10
0
def cman_udpu_restart_required():
    """
    warn user it is required to restart CMAN cluster for changes to take effect
    """
    return ReportItem.warning(
        report_codes.CMAN_UDPU_RESTART_REQUIRED,
        "Using udpu transport on a CMAN cluster, "
            + "cluster restart is required after node add or remove"
    )
Esempio n. 11
0
def omitting_node(node):
    """
    warning that specified node will be omitted in following actions

    node -- node name
    """
    return ReportItem.warning(
        report_codes.OMITTING_NODE,
        info={"node": node}
    )
Esempio n. 12
0
def booth_unsupported_file_location(file):
    """
    location of booth configuration file (config, authfile) file is not
    supported (not in /etc/booth/)

    file -- file path
    """
    return ReportItem.warning(
        report_codes.BOOTH_UNSUPPORTED_FILE_LOCATION,
        info={"file": file}
    )
Esempio n. 13
0
def booth_skipping_config(config_file, reason):
    """
    Warning about skipping booth config file.

    config_file -- file name of config which is skipped
    reason -- reason
    """
    return ReportItem.warning(report_codes.BOOTH_SKIPPING_CONFIG,
                              info={
                                  "config_file": config_file,
                                  "reason": reason,
                              })
Esempio n. 14
0
def unable_to_get_sbd_status(node, reason):
    """
    there was (communication or parsing) failure during obtaining status of SBD
    from specified node

    node -- node name
    reason -- reason of failure
    """
    return ReportItem.warning(report_codes.UNABLE_TO_GET_SBD_STATUS,
                              info={
                                  "node": node,
                                  "reason": reason
                              })
Esempio n. 15
0
def booth_skipping_config(config_file, reason):
    """
    Warning about skipping booth config file.

    config_file -- file name of config which is skipped
    reason -- reason
    """
    return ReportItem.warning(
        report_codes.BOOTH_SKIPPING_CONFIG,
        info={
            "config_file": config_file,
            "reason": reason,
        }
    )
Esempio n. 16
0
def booth_unsupported_file_location(file_path, expected_dir, file_type_code):
    """
    a booth file (config, authfile) is not in the expected dir, skipping it

    string file_path -- the actual path of the file
    string expected_dir -- where the file is supposed to be
    string file_type_code -- item from pcs.common.file_type_codes
    """
    return ReportItem.warning(report_codes.BOOTH_UNSUPPORTED_FILE_LOCATION,
                              info={
                                  "file_path": file_path,
                                  "expected_dir": expected_dir,
                                  "file_type_code": file_type_code,
                              })
Esempio n. 17
0
def unable_to_get_sbd_status(node, reason):
    """
    there was (communication or parsing) failure during obtaining status of SBD
    from specified node

    node -- node name
    reason -- reason of failure
    """
    return ReportItem.warning(
        report_codes.UNABLE_TO_GET_SBD_STATUS,
        info={
            "node": node,
            "reason": reason
        }
    )
Esempio n. 18
0
def booth_unsupported_file_location(file):
    return ReportItem.warning(
        report_codes.BOOTH_UNSUPORTED_FILE_LOCATION,
        "skipping file {file}: unsupported file location",
        info={"file": file}
    )