From b468a06f4eca0557d20876f1e0b2e514b1d5f723 Mon Sep 17 00:00:00 2001 From: Vladimir Avdeev Date: Tue, 2 Aug 2022 09:43:56 +0300 Subject: [PATCH] Fix hard reboot via sysrq-trigger Signed-off-by: Vladimir Avdeev --- pytest_tests/testsuites/failovers/test_failover_storage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytest_tests/testsuites/failovers/test_failover_storage.py b/pytest_tests/testsuites/failovers/test_failover_storage.py index 4089af0..5ee56b8 100644 --- a/pytest_tests/testsuites/failovers/test_failover_storage.py +++ b/pytest_tests/testsuites/failovers/test_failover_storage.py @@ -39,8 +39,8 @@ def panic_reboot_host(ip: str = None): password=STORAGE_NODE_SSH_PASSWORD, private_key_path=STORAGE_NODE_SSH_PRIVATE_KEY_PATH) ssh.exec('sudo sh -c "echo 1 > /proc/sys/kernel/sysrq"') - with pytest.raises(HostIsNotAvailable): - ssh.exec('sudo sh -c "echo b > /proc/sysrq-trigger"', timeout=1) + ssh_stdin, _, _ = ssh.ssh_client.exec_command('sudo sh -c "echo b > /proc/sysrq-trigger"', timeout=1) + ssh_stdin.close() def return_all_storage_nodes(sbercloud_client: SberCloud) -> None: