|
25 | 25 |
|
26 | 26 | __all__ = ('patterns',) |
27 | 27 |
|
28 | | -_patterns_old = { |
29 | | - "resource": ( |
30 | | - ( # detail 0 |
31 | | - "lrmd.*%% (?:start|stop|promote|demote|migrate)", |
32 | | - "lrmd.*RA output: .%%:.*:stderr", |
33 | | - "lrmd.*WARN: Managed %%:.*exited", |
34 | | - "lrmd.*WARN: .* %% .*timed out$", |
35 | | - "crmd.*LRM operation %%_(?:start|stop|promote|demote|migrate)_.*confirmed=true", |
36 | | - "crmd.*LRM operation %%_.*Timed Out", |
37 | | - "[(]%%[)]\\[", |
38 | | - ), |
39 | | - ( # detail 1 |
40 | | - "lrmd.*%% (?:probe|notify)", |
41 | | - "lrmd.*Managed %%:.*exited", |
42 | | - ), |
43 | | - ), |
44 | | - "node": ( |
45 | | - ( # detail 0 |
46 | | - " %% .*Corosync.Cluster.Engine", |
47 | | - " %% .*Executive.Service.RELEASE", |
48 | | - " %% .*Requesting.shutdown", |
49 | | - " %% .*Shutdown.complete", |
50 | | - " %% .*Configuration.validated..Starting.heartbeat", |
51 | | - "pengine.*Scheduling Node %% for STONITH", |
52 | | - "crmd.* of %% failed", |
53 | | - "stonith-ng.*host '%%'", |
54 | | - "Exec.*on %% ", |
55 | | - "Node %% will be fenced", |
56 | | - "stonith-ng.*for %% timed", |
57 | | - "stonith-ng.*can not fence %%:", |
58 | | - "stonithd.*Succeeded.*node %%:", |
59 | | - "(?:lost|memb): %% ", |
60 | | - "crmd.*(?:NEW|LOST):.* %% ", |
61 | | - "Node return implies stonith of %% ", |
62 | | - ), |
63 | | - ( # detail 1 |
64 | | - ), |
65 | | - ), |
66 | | - "quorum": ( |
67 | | - ( # detail 0 |
68 | | - "crmd.*Updating.quorum.status", |
69 | | - "crmd.*quorum.(?:lost|ac?quir)", |
70 | | - ), |
71 | | - ( # detail 1 |
72 | | - ), |
73 | | - ), |
74 | | - "events": ( |
75 | | - ( # detail 0 |
76 | | - "CRIT:", |
77 | | - "ERROR:", |
78 | | - ), |
79 | | - ( # detail 1 |
80 | | - "WARN:", |
81 | | - ), |
82 | | - ), |
83 | | -} |
84 | | - |
85 | | -_patterns_118 = { |
86 | | - "resource": ( |
87 | | - ( # detail 0 |
88 | | - "crmd.*Initiating.*%%_(?:start|stop|promote|demote|migrate)_", |
89 | | - "lrmd.*operation_finished: %%_", |
90 | | - "lrmd.*executing - rsc:%% action:(?:start|stop|promote|demote|migrate)", |
91 | | - "lrmd.*finished - rsc:%% action:(?:start|stop|promote|demote|migrate)", |
92 | | - |
93 | | - "crmd.*LRM operation %%_(?:start|stop|promote|demote|migrate)_.*confirmed=true", |
94 | | - "crmd.*LRM operation %%_.*Timed Out", |
95 | | - "[(]%%[)]\\[", |
96 | | - ), |
97 | | - ( # detail 1 |
98 | | - "crmd.*Initiating.*%%_(?:monitor_0|notify)", |
99 | | - "lrmd.*executing - rsc:%% action:(?:monitor_0|notify)", |
100 | | - "lrmd.*finished - rsc:%% action:(?:monitor_0|notify)", |
101 | | - ), |
102 | | - ), |
103 | | - "node": ( |
104 | | - ( # detail 0 |
105 | | - " %% .*Corosync.Cluster.Engine", |
106 | | - " %% .*Executive.Service.RELEASE", |
107 | | - " %% .*crm_shutdown:.Requesting.shutdown", |
108 | | - " %% .*pcmk_shutdown:.Shutdown.complete", |
109 | | - " %% .*Configuration.validated..Starting.heartbeat", |
110 | | - "pengine.*Scheduling Node %% for STONITH", |
111 | | - "pengine.*Node %% will be fenced", |
112 | | - "crmd.*for %% failed", |
113 | | - "stonith-ng.*host '%%'", |
114 | | - "Exec.*on %% ", |
115 | | - "Node %% will be fenced", |
116 | | - "stonith-ng.*on %% for.*timed out", |
117 | | - "stonith-ng.*can not fence %%:", |
118 | | - "stonithd.*Succeeded.*node %%:", |
119 | | - "(?:lost|memb): %% ", |
120 | | - "crmd.*(?:NEW|LOST|new|lost):.* %% ", |
121 | | - "Node return implies stonith of %% ", |
122 | | - ), |
123 | | - ( # detail 1 |
124 | | - ), |
125 | | - ), |
126 | | - "quorum": ( |
127 | | - ( # detail 0 |
128 | | - "crmd.*Updating.(quorum).status", |
129 | | - r"crmd.*quorum.(?:lost|ac?quir[^\s]*)", |
130 | | - ), |
131 | | - ( # detail 1 |
132 | | - ), |
133 | | - ), |
134 | | - "events": ( |
135 | | - ( # detail 0 |
136 | | - "(CRIT|crit|ERROR|error|UNCLEAN|unclean):", |
137 | | - ), |
138 | | - ( # detail 1 |
139 | | - "(WARN|warning):", |
140 | | - ), |
141 | | - ), |
142 | | -} |
143 | | - |
144 | 28 | _patterns_200 = { |
145 | 29 | "resource": ( |
146 | 30 | ( # detail 0 |
|
280 | 164 | def patterns(cib_f=None): |
281 | 165 | if utils.is_min_pcmk_ver(constants.PCMK_VERSION_DEFAULT, cib_f=cib_f): |
282 | 166 | return _patterns_200 |
283 | | - is118 = utils.is_larger_than_pcmk_118(cib_f=cib_f) |
284 | | - if is118: |
285 | | - return _patterns_118 |
286 | | - else: |
287 | | - return _patterns_old |
0 commit comments