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})
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, )
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})
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, )
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, )
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, )
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})
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} )
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" )
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" )
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} )
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} )
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, })
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 })
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, } )
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, })
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 } )
def booth_unsupported_file_location(file): return ReportItem.warning( report_codes.BOOTH_UNSUPORTED_FILE_LOCATION, "skipping file {file}: unsupported file location", info={"file": file} )