forked from TrueCloudLab/frostfs-testcases
[#175] Update maintenance steps
Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
This commit is contained in:
parent
e14579f026
commit
6ee9b70d50
1 changed files with 24 additions and 29 deletions
|
@ -471,7 +471,7 @@ class TestMaintenanceMode(ClusterTestBase):
|
|||
netmap = NetmapParser.snapshot_all_nodes(netmap)
|
||||
assert node_under_test.host_ip not in [
|
||||
netmap_node.node for netmap_node in netmap
|
||||
], f"Node {node_under_test.host_ip} not in state offline"
|
||||
], f"Node {node_under_test.host_ip} not in state offline. netmap - {netmap}"
|
||||
|
||||
with reporter.step("Restart storage service"):
|
||||
cluster_state_controller.stop_storage_service(node_under_test)
|
||||
|
@ -484,10 +484,10 @@ class TestMaintenanceMode(ClusterTestBase):
|
|||
netmap = frostfs_cli.netmap.snapshot(
|
||||
rpc_endpoint=cluster_nodes[0].storage_node.get_rpc_endpoint(), wallet=default_wallet
|
||||
).stdout
|
||||
node_state = NetmapParser.snapshot_one_node(netmap, node_under_test).node_status
|
||||
assert node_state == ModeNode.ONLINE.value.upper(), (
|
||||
f"Node actual state - {node_state}, " f"expect - {ModeNode.ONLINE.value}"
|
||||
)
|
||||
node = NetmapParser.snapshot_one_node(netmap, node_under_test)
|
||||
assert (
|
||||
node.node_status == ModeNode.ONLINE.value.upper()
|
||||
), f"{node_under_test} actual state in netmap - {netmap}"
|
||||
|
||||
with reporter.step("Tick epoch"):
|
||||
self.tick_epochs(epochs_to_tick=2, alive_node=cluster_nodes[0].storage_node, wait_block=2)
|
||||
|
@ -507,10 +507,8 @@ class TestMaintenanceMode(ClusterTestBase):
|
|||
netmap = frostfs_cli.netmap.snapshot(
|
||||
rpc_endpoint=cluster_nodes[0].storage_node.get_rpc_endpoint(), wallet=default_wallet
|
||||
).stdout
|
||||
node_state = NetmapParser.snapshot_one_node(netmap, node_under_test).node_status
|
||||
assert node_state == ModeNode.MAINTENANCE.value.upper(), (
|
||||
f"Node actual state - {node_state}, " f"expect - {ModeNode.MAINTENANCE.value}"
|
||||
)
|
||||
node = NetmapParser.snapshot_one_node(netmap, node_under_test)
|
||||
assert node == ModeNode.MAINTENANCE.value.upper(), f"{node_under_test} actual state in netmap - {netmap}"
|
||||
|
||||
with reporter.step("Tick epoch"):
|
||||
self.tick_epochs(epochs_to_tick=2, alive_node=cluster_nodes[0].storage_node, wait_block=2)
|
||||
|
@ -519,10 +517,10 @@ class TestMaintenanceMode(ClusterTestBase):
|
|||
netmap = frostfs_cli.netmap.snapshot(
|
||||
rpc_endpoint=cluster_nodes[0].storage_node.get_rpc_endpoint(), wallet=default_wallet
|
||||
).stdout
|
||||
node_state = NetmapParser.snapshot_one_node(netmap, node_under_test).node_status
|
||||
assert node_state == ModeNode.OFFLINE.value.upper(), (
|
||||
f"Node actual state - {node_state}, " f"expect - {ModeNode.OFFLINE.value}"
|
||||
)
|
||||
node = NetmapParser.snapshot_one_node(netmap, node_under_test)
|
||||
assert (
|
||||
node.node_status == ModeNode.OFFLINE.value.upper()
|
||||
), f"{node_under_test} actual state in netmap - {netmap}"
|
||||
|
||||
with reporter.step("Stop storage service"):
|
||||
cluster_state_controller.stop_storage_service(node_under_test)
|
||||
|
@ -537,10 +535,8 @@ class TestMaintenanceMode(ClusterTestBase):
|
|||
netmap = frostfs_cli.netmap.snapshot(
|
||||
rpc_endpoint=cluster_nodes[0].storage_node.get_rpc_endpoint(), wallet=default_wallet
|
||||
).stdout
|
||||
node_state = NetmapParser.snapshot_one_node(netmap, node_under_test).node_status
|
||||
assert node_state == ModeNode.OFFLINE.value.upper(), (
|
||||
f"Node actual state - {node_state}, " f"expect - {ModeNode.OFFLINE.value}"
|
||||
)
|
||||
node = NetmapParser.snapshot_one_node(netmap, node_under_test)
|
||||
assert node == ModeNode.OFFLINE.value.upper(), f"{node_under_test} actual state in netmap - {netmap}"
|
||||
|
||||
with reporter.step("Tick epoch"):
|
||||
self.tick_epochs(epochs_to_tick=2, alive_node=cluster_nodes[0].storage_node, wait_block=2)
|
||||
|
@ -549,10 +545,10 @@ class TestMaintenanceMode(ClusterTestBase):
|
|||
netmap = frostfs_cli.netmap.snapshot(
|
||||
rpc_endpoint=cluster_nodes[0].storage_node.get_rpc_endpoint(), wallet=default_wallet
|
||||
).stdout
|
||||
node_state = NetmapParser.snapshot_one_node(netmap, node_under_test).node_status
|
||||
assert node_state == ModeNode.ONLINE.value.upper(), (
|
||||
f"Node actual state - {node_state}, " f"expect - {ModeNode.ONLINE.value}"
|
||||
)
|
||||
node = NetmapParser.snapshot_one_node(netmap, node_under_test)
|
||||
assert (
|
||||
node.node_status == ModeNode.ONLINE.value.upper()
|
||||
), f"{node_under_test} actual state in netmap - {netmap}"
|
||||
|
||||
with reporter.step("Tick epoch"):
|
||||
self.tick_epochs(epochs_to_tick=2, alive_node=cluster_nodes[0].storage_node, wait_block=2)
|
||||
|
@ -575,11 +571,10 @@ class TestMaintenanceMode(ClusterTestBase):
|
|||
netmap = frostfs_cli.netmap.snapshot(
|
||||
rpc_endpoint=cluster_nodes[0].storage_node.get_rpc_endpoint(), wallet=default_wallet
|
||||
).stdout
|
||||
node_state = NetmapParser.snapshot_one_node(netmap, node_under_test).node_status
|
||||
|
||||
node = NetmapParser.snapshot_one_node(netmap, node_under_test)
|
||||
assert (
|
||||
node_state == ModeNode.MAINTENANCE.value.upper()
|
||||
), f"Node actual state - {node_state}, expect - {ModeNode.MAINTENANCE.value}"
|
||||
node.node_status == ModeNode.MAINTENANCE.value.upper()
|
||||
), f"{node_under_test} actual state in netmap - {netmap}"
|
||||
|
||||
with reporter.step("Tick epoch"):
|
||||
self.tick_epochs(epochs_to_tick=2, alive_node=cluster_nodes[0].storage_node, wait_block=2)
|
||||
|
@ -588,10 +583,10 @@ class TestMaintenanceMode(ClusterTestBase):
|
|||
netmap = frostfs_cli.netmap.snapshot(
|
||||
rpc_endpoint=cluster_nodes[0].storage_node.get_rpc_endpoint(), wallet=default_wallet
|
||||
).stdout
|
||||
node_state = NetmapParser.snapshot_one_node(netmap, node_under_test).node_status
|
||||
assert node_state == ModeNode.MAINTENANCE.value.upper(), (
|
||||
f"Node actual state - {node_state}, " f"expect - {ModeNode.MAINTENANCE.value}"
|
||||
)
|
||||
node = NetmapParser.snapshot_one_node(netmap, node_under_test)
|
||||
assert (
|
||||
node.node_status == ModeNode.MAINTENANCE.value.upper()
|
||||
), f"{node_under_test} actual state in netmap - {netmap}"
|
||||
|
||||
@allure.title("A node cannot go into maintenance if maintenance is prohibited globally in the network")
|
||||
def test_maintenance_globally_forbidden(
|
||||
|
|
Loading…
Reference in a new issue