Skip to content

Commit d3237a1

Browse files
committed
Low: cts: Fix the BadNews messages that the SplitBrain test ignores.
This has been broken since the message changed in 07a19bc, but we didn't notice because the SplitBrain test has been disabled for a long time. Additionally, I've removed the "stonith " part from the beginning of the string. Other resources can cause the same message to be printed in the SplitBrain test. We could have a whole separate message for this case, but I'm not sure it's worth it.
1 parent f1120ce commit d3237a1

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

python/pacemaker/_cts/patterns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def __init__(self):
7676
"Pat:Fencing_start": r"Requesting peer fencing .* targeting %s",
7777
"Pat:Fencing_ok": r"pacemaker-fenced.*:\s*Operation .* targeting %s by .* for .*@.*: OK",
7878
"Pat:Fencing_recover": r"pacemaker-schedulerd.*: Recover\s+%s",
79-
"Pat:Fencing_active": r"stonith resource .* is active on 2 nodes (attempting recovery)",
79+
"Pat:Resource_active": r"resource .* might be active on \d+ nodes \(attempting recovery\)",
8080
"Pat:Fencing_probe": r"pacemaker-controld.* Result of probe operation for %s on .*: Error",
8181

8282
"Pat:RscOpOK": r"pacemaker-controld.*:\s+Result of %s operation for %s.*: (0 \()?OK",

python/pacemaker/_cts/tests/componentfail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __call__(self, node):
7979
# Ignore actions for fence devices if fencer will respawn
8080
# (their registration will be lost, and probes will fail)
8181
self._okerrpatterns = [
82-
self._cm.templates["Pat:Fencing_active"],
82+
self._cm.templates["Pat:Resource_active"],
8383
]
8484
(_, lines) = self._rsh(node, "crm_resource -c", verbose=1)
8585

python/pacemaker/_cts/tests/splitbraintest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ def errors_to_ignore(self):
200200
r"Another DC detected:",
201201
r"(ERROR|error).*: .*Application of an update diff failed",
202202
r"pacemaker-controld.*:.*not in our membership list",
203-
r"CRIT:.*node.*returning after partition"
203+
r"CRIT:.*node.*returning after partition",
204+
self._cm.templates["Pat:Resource_active"],
204205
]
205206

206207
def is_applicable(self):

python/pacemaker/_cts/tests/stonithdtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def errors_to_ignore(self):
125125
return [
126126
self._cm.templates["Pat:Fencing_start"] % ".*",
127127
self._cm.templates["Pat:Fencing_ok"] % ".*",
128-
self._cm.templates["Pat:Fencing_active"],
128+
self._cm.templates["Pat:Resource_active"],
129129
r"error.*: Operation 'reboot' targeting .* by .* for stonith_admin.*: Timer expired"
130130
]
131131

0 commit comments

Comments
 (0)