Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-16943 rebuild: check DAOS_REBUILD ENV for restart #15729

Open
wants to merge 1 commit into
base: release/2.6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/pool/srv_pool.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* (C) Copyright 2016-2024 Intel Corporation.
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -7255,7 +7256,8 @@ pool_svc_update_map(struct pool_svc *svc, crt_opcode_t opc, bool exclude_rank,
d_agetenv_str(&env, REBUILD_ENV);
if ((env && !strcasecmp(env, REBUILD_ENV_DISABLED)) ||
daos_fail_check(DAOS_REBUILD_DISABLE)) {
D_DEBUG(DB_TRACE, "Rebuild is disabled\n");
D_DEBUG(DB_REBUILD, DF_UUID ": Rebuild is disabled for all pools\n",
DP_UUID(svc->ps_pool->sp_uuid));
d_freeenv_str(&env);
D_GOTO(out, rc = 0);
}
Expand Down
15 changes: 13 additions & 2 deletions src/rebuild/srv.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* (C) Copyright 2016-2024 Intel Corporation.
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -2143,11 +2144,21 @@ regenerate_task_of_type(struct ds_pool *pool, pool_comp_state_t match_states, ui
int
ds_rebuild_regenerate_task(struct ds_pool *pool, daos_prop_t *prop)
{
struct daos_prop_entry *entry;
int rc = 0;
struct daos_prop_entry *entry;
char *env;
int rc = 0;

rebuild_gst.rg_abort = 0;

d_agetenv_str(&env, REBUILD_ENV);
if (env && !strcasecmp(env, REBUILD_ENV_DISABLED)) {
D_DEBUG(DB_REBUILD, DF_UUID ": Rebuild is disabled for all pools\n",
DP_UUID(pool->sp_uuid));
d_freeenv_str(&env);
return DER_SUCCESS;
}
d_freeenv_str(&env);

if (pool->sp_reint_mode == DAOS_REINT_MODE_NO_DATA_SYNC) {
D_DEBUG(DB_REBUILD, DF_UUID" No data sync for reintegration\n",
DP_UUID(pool->sp_uuid));
Expand Down
Loading