Page MenuHomeClusterLabs Projects

No OneTemporary

diff --git a/python/pacemaker/_cts/tests/remotestonithd.py b/python/pacemaker/_cts/tests/remotestonithd.py
index 795928b2fb..fd5144e2f6 100644
--- a/python/pacemaker/_cts/tests/remotestonithd.py
+++ b/python/pacemaker/_cts/tests/remotestonithd.py
@@ -1,50 +1,60 @@
-""" Test-specific classes for Pacemaker's Cluster Test Suite (CTS)
-"""
+""" Fail the connection resource and fence the remote node """
__all__ = ["RemoteStonithd"]
__copyright__ = "Copyright 2000-2023 the Pacemaker project contributors"
__license__ = "GNU General Public License version 2 or later (GPLv2+) WITHOUT ANY WARRANTY"
from pacemaker._cts.tests.remotedriver import RemoteDriver
class RemoteStonithd(RemoteDriver):
+ """ A concrete test that fails the connection resource and fences the
+ remote node
+ """
+
def __init__(self, cm):
+ """ Create a new RemoteStonithd instance
+
+ Arguments:
+
+ cm -- A ClusterManager instance
+ """
+
RemoteDriver.__init__(self, cm)
+
self.name = "RemoteStonithd"
def __call__(self, node):
- '''Perform the 'RemoteStonithd' test. '''
+ """ Perform this test """
if not self.start_new_test(node):
return self.failure(self.fail_string)
self.fail_connection(node)
self.cleanup_metal(node)
self.debug("Waiting for the cluster to recover")
self._cm.cluster_stable()
if self.failed:
return self.failure(self.fail_string)
return self.success()
def is_applicable(self):
+ """ Return True if this test is applicable in the current test configuration. """
+
if not RemoteDriver.is_applicable(self):
return False
- if "DoFencing" in self._env:
- return self._env["DoFencing"]
-
- return True
+ return self._env.get("DoFencing", True)
@property
def errors_to_ignore(self):
""" Return list of errors which should be ignored """
return [ r"Lost connection to Pacemaker Remote node",
r"Software caused connection abort",
r"pacemaker-controld.*:\s+error.*: Operation remote-.*_monitor",
r"pacemaker-controld.*:\s+error.*: Result of monitor operation for remote-.*",
r"schedulerd.*:\s+Recover\s+remote-.*\s+\(.*\)",
r"error: Result of monitor operation for .* on remote-.*: Internal communication failure" ] + super().errors_to_ignore

File Metadata

Mime Type
text/x-diff
Expires
Sat, Jan 25, 10:54 AM (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1322211
Default Alt Text
(2 KB)

Event Timeline