Skip to content

Commit

Permalink
Wait for node deletion and verify original node count during teardown…
Browse files Browse the repository at this point in the history
… of test_automated_recovery_from_stopped_node_and_start[True] (#8711)


Signed-off-by: am-agrawa <[email protected]>
  • Loading branch information
am-agrawa authored Oct 23, 2023
1 parent 14cda0c commit 16c39f3
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
get_node_pods,
wait_for_nodes_racks_or_zones,
wait_for_nodes_status,
wait_for_node_count_to_reach_status,
)
from ocs_ci.ocs.exceptions import ResourceWrongStatusException

Expand Down Expand Up @@ -245,10 +246,15 @@ def finalizer():
)
add_new_nodes_and_label_after_node_failure_ipi(self.machineset_name)

log.info("Wait for node count to be equal to original count")
wait_for_node_count_to_reach_status(node_count=initial_node_count)
log.info("Node count matched")
ceph_health_check()

machine.wait_for_ready_replica_count_to_reach_expected_value(
self.machineset_name, expected_value=self.start_ready_replica_count
self.machineset_name,
expected_value=self.start_ready_replica_count,
timeout=420,
)
log.info(
"Verify that the current replica count is equal to the ready replica count"
Expand Down Expand Up @@ -302,6 +308,10 @@ def test_automated_recovery_from_stopped_node_and_start(
self.machineset_name
)

global initial_node_count
initial_node_count = len(get_worker_nodes())
log.info(f"Initial node count is {initial_node_count}")

if additional_node:
new_ocs_node_names = add_new_node_and_label_it(self.machineset_name)
failure_domain = get_failure_domain()
Expand Down

0 comments on commit 16c39f3

Please sign in to comment.