Revert "Test quorum number of controller nodes hard shutdown"

This reverts commit 919f5d3eaa.

Reason for revert: This new test brings (almost) no new values and is causing some problems. So let's get rid of it. We have another test which is powering down nodes using Ironic API.

Change-Id: I0e8c6b76d6acaba264ca234fb071d304b3ba8b7c
This commit is contained in:
Slawek Kaplonski 2021-04-26 05:56:32 +00:00
parent 919f5d3eaa
commit 9a58a5f875
4 changed files with 4 additions and 24 deletions

View File

@ -77,7 +77,6 @@ RebootHostMethod = _reboot.RebootHostMethod
crash_method = RebootHostMethod.CRASH
hard_reset_method = RebootHostMethod.HARD
soft_reset_method = RebootHostMethod.SOFT
hard_shutdown_method = RebootHostMethod.HARD_SHUTDOWN
ssh_process = _ssh.ssh_process
ssh_execute = _ssh.ssh_execute

View File

@ -32,8 +32,6 @@ class RebootHostMethod(enum.Enum):
SOFT = '/sbin/reboot',
HARD = 'echo 1 > /proc/sys/kernel/sysrq && echo b > /proc/sysrq-trigger',
CRASH = 'echo 1 > /proc/sys/kernel/sysrq && echo c > /proc/sysrq-trigger',
HARD_SHUTDOWN = \
'echo 1 > /proc/sys/kernel/sysrq && echo o > /proc/sysrq-trigger',
def __init__(self, command: str):
self.command = command
@ -55,7 +53,7 @@ def reboot_host(ssh_client: ssh.SSHClientFixture,
timeout=timeout,
method=method)
tobiko.setup_fixture(reboot)
if method != RebootHostMethod.HARD_SHUTDOWN and wait:
if wait:
reboot.wait_for_operation()
return reboot

View File

@ -192,12 +192,6 @@ def reboot_all_controller_nodes(reboot_method=sh.hard_reset_method,
check_overcloud_node_responsive(controller)
def hard_power_off_overcloud_nodes(nodes):
for node in nodes:
sh.reboot_host(ssh_client=node.ssh_client,
method=sh.hard_shutdown_method)
def get_main_vip():
"""return the ip of the overcloud main vip.
Retreive an ip address (ipv4/ipv6) from the auth_url."""

View File

@ -215,7 +215,7 @@ class DisruptTripleoNodesTest(testtools.TestCase):
cloud_disruptions.request_galera_sst()
OvercloudHealthCheck.run_after()
def _test_controllers_shutdown(self, shutdown_method):
def test_controllers_shutdown(self):
all_nodes = topology.list_openstack_nodes(group='controller')
if len(all_nodes) < 3:
self.skipTest('It requires at least three controller nodes')
@ -229,10 +229,10 @@ class DisruptTripleoNodesTest(testtools.TestCase):
quorum_level = math.ceil(0.5 * len(all_nodes))
assert quorum_level >= len(all_nodes) - quorum_level
nodes = random.sample(all_nodes, quorum_level)
LOG.info(f"Power off {quorum_level} random controller nodes: "
f"{[node.name for node in nodes]}")
shutdown_method(nodes)
for node in nodes:
node.power_off_overcloud_node()
random.shuffle(nodes)
LOG.info("Power on controller nodes: "
@ -245,17 +245,6 @@ class DisruptTripleoNodesTest(testtools.TestCase):
LOG.info("Verify can create VMs after controllers power on...")
tests.test_server_creation()
def test_controllers_shutdown(self):
def shutdown_nodes(nodes):
for node in nodes:
node.power_off_overcloud_node()
self._test_controllers_shutdown(shutdown_nodes)
def test_controllers_hard_power_down(self):
self._test_controllers_shutdown(
cloud_disruptions.hard_power_off_overcloud_nodes)
# [..]
# more tests to follow