Skip to content

Commit e3f996e

Browse files
gnailzenhliuxuezhao
authored andcommitted
DAOS-18641 tests: test pool_extend.py with lo change
Test-tag: NvmePoolExtend Test-repeat: 6 Skip-nlt: true Skip-unit-test-memcheck: true Skip-unit-tests: true Skip-unit-test: true Skip-checkpatch: true Skip-fault-injection-test: true Quick-Functional: true Signed-off-by: Xuezhao Liu <xuezhao.liu@hpe.com>
1 parent bcd7fd9 commit e3f996e

7 files changed

Lines changed: 29 additions & 17 deletions

File tree

src/common/pool_map.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2429,7 +2429,7 @@ update_failed_cnt_helper(struct pool_domain *dom,
24292429

24302430
if (dom->do_children == NULL) {
24312431
for (i = 0; i < dom->do_target_nr; ++i) {
2432-
if (pool_target_down(&dom->do_targets[i]))
2432+
if (pool_target_is_down(&dom->do_targets[i]))
24332433
num_failed++;
24342434
}
24352435
} else {

src/include/daos/pool_map.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ pool_target_is_down2up(struct pool_target *tgt)
418418

419419
/** Check if the target is in PO_COMP_ST_DOWN status */
420420
static inline bool
421-
pool_target_down(struct pool_target *tgt)
421+
pool_target_is_down(struct pool_target *tgt)
422422
{
423423
struct pool_component *comp = &tgt->ta_comp;
424424
uint8_t status = comp->co_status;

src/placement/jump_map.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
*
33
* (C) Copyright 2016-2024 Intel Corporation.
4-
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
4+
* (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP
55
*
66
* SPDX-License-Identifier: BSD-2-Clause-Patent
77
*/
@@ -732,8 +732,16 @@ get_object_layout(struct pl_jump_map *jmap, uint32_t layout_ver, struct pl_obj_l
732732
} else {
733733
if (domain != NULL)
734734
setbit(dom_cur_grp_real, domain - root);
735-
if (pool_target_down(target))
735+
736+
if (pool_target_is_down(target))
736737
layout->ol_shards[k].po_rebuilding = 1;
738+
739+
if (pool_target_is_down2up(target)) {
740+
if (gen_mode == PRE_REBUILD)
741+
layout->ol_shards[k].po_rebuilding = 1;
742+
else
743+
layout->ol_shards[k].po_reintegrating = 1;
744+
}
737745
}
738746

739747
if (is_extending != NULL && pool_target_is_up_or_drain(target))

src/placement/pl_map_common.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/**
22
* (C) Copyright 2016-2024 Intel Corporation.
3+
* (C) Copyright 2026 Hewlett Packard Enterprise Development LP
34
*
45
* SPDX-License-Identifier: BSD-2-Clause-Patent
56
*/
@@ -255,13 +256,7 @@ is_comp_avaible(struct pool_component *comp, uint32_t allow_version,
255256
status = PO_COMP_ST_UPIN;
256257
} else if (status == PO_COMP_ST_UP) {
257258
if (comp->co_flags & PO_COMPF_DOWN2UP) {
258-
/* PO_COMP_ST_UP status with PO_COMPF_DOWN2UP flag
259-
* is the case of delay_rebuild exclude+reint.
260-
* Cannot mark it as UPIN to avoid it be used for
261-
* rebuild enumerate/fetch, as the data will be
262-
* discarded in reintegrate.
263-
*/
264-
/* status = PO_COMP_ST_UPIN; */
259+
status = PO_COMP_ST_UPIN;
265260
} else {
266261
if (comp->co_fseq <= 1)
267262
status = PO_COMP_ST_NEW;
@@ -394,18 +389,23 @@ determine_valid_spares(struct pool_target *spare_tgt, struct daos_obj_md *md,
394389
if (spare_avail) {
395390
/* The selected spare target is up and ready */
396391
l_shard->po_target = spare_tgt->ta_comp.co_id;
397-
l_shard->po_fseq = f_shard->fs_fseq;
398-
l_shard->po_rank = spare_tgt->ta_comp.co_rank;
399-
l_shard->po_index = spare_tgt->ta_comp.co_index;
392+
l_shard->po_fseq = f_shard->fs_fseq;
393+
l_shard->po_rank = spare_tgt->ta_comp.co_rank;
394+
l_shard->po_index = spare_tgt->ta_comp.co_index;
395+
f_shard->fs_down2up = pool_target_is_down2up(spare_tgt);
400396

401397
/*
402398
* Mark the shard as 'rebuilding' so that read will skip this shard.
403399
* f_shard->fs_down2up is the case of delay_rebuild exclude+reint.
404400
*/
405401
if (f_shard->fs_status == PO_COMP_ST_DOWN ||
406-
f_shard->fs_status == PO_COMP_ST_DRAIN ||
407-
f_shard->fs_down2up || pool_target_down(spare_tgt))
402+
f_shard->fs_status == PO_COMP_ST_DRAIN || f_shard->fs_down2up ||
403+
pool_target_is_down(spare_tgt))
408404
l_shard->po_rebuilding = 1;
405+
406+
if (f_shard->fs_down2up && gen_mode != PRE_REBUILD)
407+
l_shard->po_reintegrating = 1;
408+
409409
} else {
410410
l_shard->po_shard = -1;
411411
l_shard->po_target = -1;

src/rebuild/srv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2047,7 +2047,7 @@ rebuild_task_ult(void *arg)
20472047
uint32_t map_dist_ver = 0;
20482048
struct rebuild_global_pool_tracker *rgt = NULL;
20492049
d_rank_t myrank;
2050-
uint64_t cur_ts = 0;
2050+
uint64_t cur_ts = 0;
20512051
uint32_t obj_reclaim_ver = 0;
20522052
int rc;
20532053

src/tests/ftest/nvme/pool_extend.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ server_config:
2323
nr_xs_helpers: 1
2424
log_file: daos_server0.log
2525
storage: auto
26+
log_mask: DEBUG,MEM=ERR,RPC=ERR,BULK=ERR,HG=ERR,GRP=ERR
2627
1:
2728
pinned_numa_node: 1
2829
nr_xs_helpers: 1
2930
log_file: daos_server1.log
3031
storage: auto
32+
log_mask: DEBUG,MEM=ERR,RPC=ERR,BULK=ERR,HG=ERR,GRP=ERR
3133

3234
pool:
3335
svcn: 4

src/tests/ftest/util/ior_test_base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ def run_ior(self, manager, processes, intercept=None, display_space=True,
228228
env["HDF5_VOL_CONNECTOR"] = "daos"
229229
env["HDF5_PLUGIN_PATH"] = str(plugin_path)
230230
manager.working_dir.value = self.dfuse.mount_dir.value
231+
env['D_LOG_MASK'] = 'DEBUG'
232+
env['D_LOG_FLUSH'] = 'DEBUG'
231233
manager.assign_hosts(
232234
self.hostlist_clients, self.workdir, self.hostfile_clients_slots)
233235
# Pass only processes or ppn to be compatible with previous behavior

0 commit comments

Comments
 (0)