Skip to content

Commit

Permalink
DAOS-16001 placement: fix cases for delay_rebuild (#14557)
Browse files Browse the repository at this point in the history
Placement fixes for delayed rebuild

* Note: this is just a partial backport of stuff that changed since
we backported it (See #14558) before it landed on master branch.

Signed-off-by: Xuezhao Liu <xuezhao.liu@intel.com>
  • Loading branch information
liuxuezhao authored and jolivier23 committed Jun 21, 2024
1 parent 9c5c222 commit 7d60c74
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/tests/ftest/rebuild/cascading_failures.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
(C) Copyright 2019-2022 Intel Corporation.
(C) Copyright 2019-2024 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
Expand Down Expand Up @@ -52,14 +52,14 @@ def start_rebuild(self):
"""Start the rebuild process."""
if self.mode == "simultaneous":
# Exclude both ranks from the pool to initiate rebuild
self.server_managers[0].stop_ranks(self.inputs.rank.value, self.d_log)
self.server_managers[0].stop_ranks(self.inputs.rank.value, self.d_log, force=True)
else:
# Exclude the first rank from the pool to initiate rebuild
self.server_managers[0].stop_ranks([self.inputs.rank.value[0]], self.d_log)
self.server_managers[0].stop_ranks([self.inputs.rank.value[0]], self.d_log, force=True)

if self.mode == "sequential":
# Exclude the second rank from the pool
self.server_managers[0].stop_ranks([self.inputs.rank.value[1]], self.d_log)
self.server_managers[0].stop_ranks([self.inputs.rank.value[1]], self.d_log, force=True)

# Wait for rebuild to start
self.pool.wait_for_rebuild_to_start(1)
Expand All @@ -69,7 +69,7 @@ def execute_during_rebuild(self):
self.daos_cmd = DaosCommand(self.bin)
if self.mode == "cascading":
# Exclude the second rank from the pool during rebuild
self.server_managers[0].stop_ranks([self.inputs.rank.value[1]], self.d_log)
self.server_managers[0].stop_ranks([self.inputs.rank.value[1]], self.d_log, force=True)

self.daos_cmd.container_set_prop(
pool=self.pool.uuid, cont=self.container.uuid, prop="status", value="healthy")
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/util/container_rf_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def start_rebuild_cont_rf(self, rd_fac):

# Exclude the ranks from the pool to initiate rebuild simultaneously
self.log.info("==>(3)Start rebuild for all specified ranks simultaneously")
self.server_managers[0].stop_ranks(self.inputs.rank.value, self.d_log)
self.server_managers[0].stop_ranks(self.inputs.rank.value, self.d_log, force=True)

def execute_during_rebuild_cont_rf(self, rd_fac, expect_cont_status="HEALTHY"):
"""Execute test steps during rebuild.
Expand Down

0 comments on commit 7d60c74

Please sign in to comment.