Skip to content

Commit

Permalink
DAOS-16943 rebuild: check DAOS_REBUILD ENV also for restart
Browse files Browse the repository at this point in the history
For restart, check DAOS_REBUILD ENV in ds_rebuild_regenerate_task
to make it be able to disable rebuild.

Signed-off-by: Xuezhao Liu <[email protected]>
  • Loading branch information
liuxuezhao committed Jan 14, 2025
1 parent b1756f1 commit 590422d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/rebuild/srv.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright 2016-2024 Intel Corporation.
* (C) Copyright 2016-2025 Intel Corporation.

Check failure on line 2 in src/rebuild/srv.c

View workflow job for this annotation

GitHub Actions / Copyright check

Copyright out of date
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -2144,10 +2144,19 @@ int
ds_rebuild_regenerate_task(struct ds_pool *pool, daos_prop_t *prop)
{
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_TRACE, "Rebuild is disabled\n");
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

0 comments on commit 590422d

Please sign in to comment.