Skip to content

Commit

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


Signed-off-by: am-agrawa <[email protected]>
  • Loading branch information
openshift-cherrypick-robot authored Oct 25, 2023
1 parent 0d05416 commit 9216f1e
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,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 @@ -242,10 +243,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 @@ -299,6 +305,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 9216f1e

Please sign in to comment.