1# Copyright (C) 2017 Xin Liang <XLiang@suse.com>
2# See COPYING for license information.
3
4import socket
5from crmsh import config
6
7ARGOPTS_VALUE = "f:t:l:u:X:p:L:e:E:n:MSDZVsvhdQ"
8B_CONF = None
9CIB_DIR = None
10COMPRESS = config.report.compress
11COMPRESS_DATA_FLAG = "COMPRESS HB_REPORT DATA:::"
12COMPRESS_PROG = ""
13COMPRESS_EXT = ""
14CORES_DIRS = None
15CONF = None
16CRM_DAEMON_DIR = None
17CTS = ""
18DEST = ""
19DESTDIR = ""
20DO_SANITIZE = False
21SANITIZE_RULE = "passw.*"
22SANITIZE_RULE_DICT = dict()
23SANITIZE_VALUE_CIB = []
24SANITIZE_KEY_CIB = []
25SANITIZE_VALUE_RAW = []
26EXTRA_LOGS = config.report.collect_extra_logs
27FORCE_REMOVE_DEST = config.report.remove_exist_dest
28FROM_TIME = ""
29GET_STAMP_FUNC = None
30HA_DEBUGFILE = None
31HA_LOG = ""
32HA_LOGFACILITY = "daemon"
33HA_LOGFILE = None
34HA_LOGLEVEL = "info"
35HA_BIN = None
36HA_VARLIB = None
37LOCAL_SUDO = ""
38LOG_PATTERNS = "CRIT: ERROR: error: warning: crit:"
39NO_DESCRIPTION = 1
40NO_SSH = config.report.single_node
41NODES = ""
42OCF_DIR = None
43PACKAGES = None
44PCMK_LIB = None
45PCMK_LOG = "/var/log/pacemaker/pacemaker.log /var/log/pacemaker.log"
46PE_STATE_DIR = None
47PTEST = "crm_simulate"
48SKIP_LVL = config.report.speed_up
49SLAVE = 0
50SLAVEPIDS = None
51SSH_OPTS = "-o StrictHostKeyChecking=no -o EscapeChar=none -o ConnectTimeout=15"
52SSH_PASSWORD_NODES = ""
53SSH_USER = ""
54SUDO = ""
55THIS_IS_NODE = 0
56TMP = None
57TO_TIME = 0
58TRY_SSH = "root hacluster"
59# UNIQUE_MSG = "Mark:HB_REPORT:%d" % now_second
60USER_CLUSTER_TYPE = "Corosync/Pacemaker"
61USER_NODES = ""
62VERBOSITY = 0
63WE = socket.gethostname()
64WORKDIR = None
65
66
67# Important events
68#
69# Patterns format:
70#  title extended_regexp
71# NB: don't use spaces in titles or regular expressions!
72EVENT_PATTERNS = """
73membership crmd.*(NEW|LOST)|pcmk.*(lost|memb|LOST|MEMB):
74quorum crmd.*Updating.quorum.status|crmd.*quorum.(lost|ac?quir)
75pause Process.pause.detected
76resources lrmd.*(start|stop)
77stonith crmd.*Exec|stonith-ng.*log_oper.*reboot|stonithd.*(requests|(Succeeded|Failed).to.STONITH|result=)
78start_stop Configuration.validated..Starting.heartbeat|Corosync.Cluster.Engine|Executive.Service.RELEASE|Requesting.shutdown|Shutdown.complete
79"""
80
81PACKAGES = """pacemaker libpacemaker3 pacemaker-cli pacemaker-remote
82pacemaker-pygui pacemaker-pymgmt pymgmt-client
83openais libopenais2 libopenais3 corosync libcorosync4
84libcfg6 libcmap4 libcorosync_common4 libcpg4 libquorum5
85libsam4 libtotem_pg5 libvotequorum8
86corosync-qdevice corosync-qnetd
87resource-agents cluster-glue libglue2 ldirectord libqb0
88heartbeat heartbeat-common heartbeat-resources libheartbeat2
89booth
90sbd
91ocfs2-tools ocfs2-tools-o2cb ocfs2console
92ocfs2-kmp-default ocfs2-kmp-pae ocfs2-kmp-xen ocfs2-kmp-debug ocfs2-kmp-trace
93drbd drbd-kmp-xen drbd-kmp-pae drbd-kmp-default drbd-kmp-debug drbd-kmp-trace
94drbd-heartbeat drbd-pacemaker drbd-utils drbd-bash-completion drbd-xen
95lvm2 lvm2-clvm cmirrord
96libdlm libdlm2 libdlm3
97hawk ruby lighttpd
98kernel-default kernel-pae kernel-xen
99glibc
100"""
101
102EMAIL_TMPLATE = """
103Please edit this template and describe the issue/problem you
104encountered. Then, post to
105    http://clusterlabs.org/mailman/listinfo/users
106or file a bug at
107    https://github.com/ClusterLabs/crmsh/issues
108
109Thank you.
110
111Date: {0}
112By: report {1}
113Subject: [short problem description]
114Severity: [choose one] enhancement minor normal major critical blocking
115Component: [choose one] CRM LRM CCM RA fencing openais comm GUI tools other
116--------------------------------------------------------
117
118Detailed description:
119
120"""
121
122
123ANALYSIS_F = "analysis.txt"
124BT_F = "backtraces.txt"
125CIB_F = "cib.xml"
126CIB_TXT_F = "cib.txt"
127CONFIGURATIONS = ["/etc/drbd.conf",
128                  "/etc/drbd.d",
129                  "/etc/booth/booth.conf"]
130COROSYNC_RECORDER_F = "fdata.txt"
131CRM_MON_F = "crm_mon.txt"
132CRM_VERIFY_F = "crm_verify.txt"
133DESCRIPTION_F = "description.txt"
134DLM_DUMP_F = "dlm_dump.txt"
135HALOG_F = "ha-log.txt"
136HB_UUID_F = "hb_uuid.txt"
137HOSTCACHE = "hostcache"
138JOURNAL_F = "journal.log"
139MEMBERSHIP_F = "members.txt"
140PERMISSIONS_F = "permissions.txt"
141SBDCONF = "/etc/sysconfig/sbd"
142SYSINFO_F = "sysinfo.txt"
143SYSSTATS_F = "sysstats.txt"
144TIME_F = "time.txt"
145OCFS2_F = "ocfs2.txt"
146SBD_F = "sbd.txt"
147
148# vim:ts=4:sw=4:et:
149