Skip to content

Commit 0284890

Browse files
kanard38knard38
authored andcommitted
Merge remote-tracking branch 'origin/master' into ckochhof/fix/master/daos-18291
Features: recovery
2 parents 9cbf6fe + cd97fbb commit 0284890

File tree

17 files changed

+86
-60
lines changed

17 files changed

+86
-60
lines changed

.github/workflows/bullseye-coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ jobs:
366366
if: (!cancelled()) && (success() || failure()) &&
367367
steps.run-test.outcome != 'skipped'
368368
# yamllint disable-line rule:line-length
369-
uses: EnricoMi/publish-unit-test-result-action@34d7c956a59aed1bfebf31df77b8de55db9bbaaf # v2.21.0
369+
uses: EnricoMi/publish-unit-test-result-action@27d65e188ec43221b20d26de30f4892fad91df2f # v2.22.0
370370
with:
371371
check_name: ${{ env.STAGE_NAME }} Test Results
372372
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -634,7 +634,7 @@ jobs:
634634
if: (!cancelled()) && (success() || failure()) &&
635635
steps.run-test.outcome != 'skipped'
636636
# yamllint disable-line rule:line-length
637-
uses: EnricoMi/publish-unit-test-result-action@34d7c956a59aed1bfebf31df77b8de55db9bbaaf # v2.21.0
637+
uses: EnricoMi/publish-unit-test-result-action@27d65e188ec43221b20d26de30f4892fad91df2f # v2.22.0
638638
with:
639639
check_name: ${{ env.STAGE_NAME }} Test Results
640640
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
- name: Publish NLT test results
6969
if: always()
7070
# yamllint disable-line rule:line-length
71-
uses: EnricoMi/publish-unit-test-result-action@34d7c956a59aed1bfebf31df77b8de55db9bbaaf # v2.21.0
71+
uses: EnricoMi/publish-unit-test-result-action@27d65e188ec43221b20d26de30f4892fad91df2f # v2.22.0
7272
with:
7373
github_token: ${{ secrets.GITHUB_TOKEN }}
7474
files: nlt-junit.xml

.github/workflows/landing-builds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ jobs:
144144
- name: Publish NLT test results
145145
if: always()
146146
# yamllint disable-line rule:line-length
147-
uses: EnricoMi/publish-unit-test-result-action@34d7c956a59aed1bfebf31df77b8de55db9bbaaf # v2.21.0
147+
uses: EnricoMi/publish-unit-test-result-action@27d65e188ec43221b20d26de30f4892fad91df2f # v2.22.0
148148
with:
149149
github_token: ${{ secrets.GITHUB_TOKEN }}
150150
files: nlt-junit.xml

.github/workflows/ossf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ jobs:
7171
# Upload the results to GitHub's code scanning dashboard (optional).
7272
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
7373
- name: "Upload to code-scanning"
74-
uses: github/codeql-action/upload-sarif@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8
74+
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
7575
with:
7676
sarif_file: results.sarif

.github/workflows/rpm-build-and-test-report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
esac
9494
echo "STAGE_NAME=Build RPM on $DISTRO_NAME $DISTRO_VERSION" >> $GITHUB_ENV
9595
- name: Test Report
96-
uses: dorny/test-reporter@fe45e9537387dac839af0d33ba56eed8e24189e8 # v2.3.0
96+
uses: dorny/test-reporter@b082adf0eced0765477756c2a610396589b8c637 # v2.5.0
9797
with:
9898
artifact: ${{ env.STAGE_NAME }} test-results
9999
name: ${{ env.STAGE_NAME }} Test Results (dorny)
@@ -112,7 +112,7 @@ jobs:
112112
- name: Set variables
113113
run: echo "STAGE_NAME=Functional Hardware ${{ matrix.stage }}" >> $GITHUB_ENV
114114
- name: Test Report
115-
uses: dorny/test-reporter@fe45e9537387dac839af0d33ba56eed8e24189e8 # v2.3.0
115+
uses: dorny/test-reporter@b082adf0eced0765477756c2a610396589b8c637 # v2.5.0
116116
with:
117117
artifact: ${{ env.STAGE_NAME }} test-results
118118
name: ${{ env.STAGE_NAME }} Test Results (dorny)

.github/workflows/rpm-build-and-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ jobs:
375375
if: (!cancelled()) && (success() || failure()) &&
376376
steps.run-test.outcome != 'skipped'
377377
# yamllint disable-line rule:line-length
378-
uses: EnricoMi/publish-unit-test-result-action@34d7c956a59aed1bfebf31df77b8de55db9bbaaf # v2.21.0
378+
uses: EnricoMi/publish-unit-test-result-action@27d65e188ec43221b20d26de30f4892fad91df2f # v2.22.0
379379
with:
380380
check_name: ${{ env.STAGE_NAME }} Test Results
381381
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -643,7 +643,7 @@ jobs:
643643
if: (!cancelled()) && (success() || failure()) &&
644644
steps.run-test.outcome != 'skipped'
645645
# yamllint disable-line rule:line-length
646-
uses: EnricoMi/publish-unit-test-result-action@34d7c956a59aed1bfebf31df77b8de55db9bbaaf # v2.21.0
646+
uses: EnricoMi/publish-unit-test-result-action@27d65e188ec43221b20d26de30f4892fad91df2f # v2.22.0
647647
with:
648648
check_name: ${{ env.STAGE_NAME }} Test Results
649649
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/trivy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
trivy-config: 'utils/trivy/trivy.yaml'
6969

7070
- name: Upload Trivy scan results to GitHub Security tab
71-
uses: github/codeql-action/upload-sarif@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8
71+
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
7272
with:
7373
sarif_file: 'trivy-results.sarif'
7474

src/chk/chk_engine.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* (C) Copyright 2022-2024 Intel Corporation.
3-
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
3+
* (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP
44
*
55
* SPDX-License-Identifier: BSD-2-Clause-Patent
66
*/
@@ -1981,7 +1981,7 @@ chk_engine_sched(void *args)
19811981
D_GOTO(out, rc);
19821982
}
19831983

1984-
if (ins_phase > cbk->cb_phase) {
1984+
if (ins_phase != CHK_INVAL_PHASE && ins_phase > cbk->cb_phase) {
19851985
D_INFO(DF_ENGINE" on rank %u moves from phase %u to phase %u\n",
19861986
DP_ENGINE(ins), myrank, cbk->cb_phase, ins_phase);
19871987

src/chk/chk_internal.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* (C) Copyright 2022-2024 Intel Corporation.
3-
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
3+
* (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP
44
*
55
* SPDX-License-Identifier: BSD-2-Clause-Patent
66
*/
@@ -1173,6 +1173,14 @@ chk_pools_find_slowest(struct chk_instance *ins, int *done)
11731173
phase = cpr->cpr_bk.cb_phase;
11741174
}
11751175

1176+
/* All pools have been done, some check engines are still running, leader needs to wait. */
1177+
if (ins->ci_orphan_done && *done > 0 && !d_list_empty(&ins->ci_rank_list)) {
1178+
D_ASSERT(ins->ci_is_leader);
1179+
1180+
phase = CHK_INVAL_PHASE;
1181+
*done = 0;
1182+
}
1183+
11761184
return phase;
11771185
}
11781186

src/chk/chk_leader.c

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* (C) Copyright 2022-2024 Intel Corporation.
3-
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
3+
* (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP
44
*
55
* SPDX-License-Identifier: BSD-2-Clause-Patent
66
*/
@@ -226,9 +226,10 @@ static void
226226
chk_leader_exit(struct chk_instance *ins, uint32_t ins_phase, uint32_t ins_status,
227227
uint32_t pool_status, bool bcast)
228228
{
229-
struct chk_bookmark *cbk = &ins->ci_bk;
230-
struct chk_iv iv = { 0 };
231-
int rc = 0;
229+
struct chk_dead_rank *cdr;
230+
struct chk_bookmark *cbk = &ins->ci_bk;
231+
struct chk_iv iv = {0};
232+
int rc = 0;
232233

233234
ins->ci_sched_exiting = 1;
234235

@@ -237,8 +238,7 @@ chk_leader_exit(struct chk_instance *ins, uint32_t ins_phase, uint32_t ins_statu
237238
chk_pool_stop_all(ins, pool_status, NULL);
238239

239240
if ((bcast && ins_status == CHK__CHECK_INST_STATUS__CIS_FAILED) ||
240-
ins_status == CHK__CHECK_INST_STATUS__CIS_IMPLICATED ||
241-
unlikely(ins_status == CHK__CHECK_INST_STATUS__CIS_COMPLETED && !ins->ci_orphan_done)) {
241+
ins_status == CHK__CHECK_INST_STATUS__CIS_IMPLICATED || !ins->ci_orphan_done) {
242242
iv.ci_gen = cbk->cb_gen;
243243
iv.ci_phase = ins_phase != CHK_INVAL_PHASE ? ins_phase : cbk->cb_phase;
244244
iv.ci_ins_status = ins_status;
@@ -264,6 +264,10 @@ chk_leader_exit(struct chk_instance *ins, uint32_t ins_phase, uint32_t ins_statu
264264
DP_LEADER(ins), ins_status, DP_RC(rc));
265265
}
266266

267+
while ((cdr = d_list_pop_entry(&ins->ci_dead_ranks, struct chk_dead_rank, cdr_link)) !=
268+
NULL)
269+
D_FREE(cdr);
270+
267271
ins->ci_sched_exiting = 0;
268272
}
269273

@@ -305,31 +309,24 @@ chk_leader_post_repair(struct chk_instance *ins, struct chk_pool_rec *cpr,
305309
DP_UUID(cpr->cpr_uuid), rc);
306310
}
307311

308-
/*
309-
* If the operation failed and 'failout' is set, then do nothing here.
310-
* chk_leader_exit will handle all the IV and bookmark related things.
311-
*/
312-
if (*result == 0 || !(ins->ci_prop.cp_flags & CHK__CHECK_FLAG__CF_FAILOUT)) {
313-
if (notify) {
314-
iv.ci_gen = cbk->cb_gen;
315-
uuid_copy(iv.ci_uuid, cpr->cpr_uuid);
316-
iv.ci_ins_status = ins->ci_bk.cb_ins_status;
317-
iv.ci_phase = cbk->cb_phase;
318-
iv.ci_pool_status = cbk->cb_pool_status;
319-
320-
/* Synchronously notify the engines that check on the pool got failure. */
321-
rc = chk_iv_update(ins->ci_iv_ns, &iv, CRT_IV_SHORTCUT_NONE,
322-
CRT_IV_SYNC_EAGER, true);
323-
D_CDEBUG(rc != 0, DLOG_ERR, DLOG_INFO,
324-
DF_LEADER" notify the engines that the check for pool "
325-
DF_UUIDF" is done with status %u: rc = %d\n",
326-
DP_LEADER(ins), DP_UUID(cpr->cpr_uuid), iv.ci_pool_status, rc);
327-
if (rc == 0)
328-
cpr->cpr_notified_exit = 1;
329-
}
312+
if (notify) {
313+
uuid_copy(iv.ci_uuid, cpr->cpr_uuid);
314+
iv.ci_gen = cbk->cb_gen;
315+
iv.ci_ins_status = ins->ci_bk.cb_ins_status;
316+
iv.ci_phase = cbk->cb_phase;
317+
iv.ci_pool_status = cbk->cb_pool_status;
318+
319+
rc = chk_iv_update(ins->ci_iv_ns, &iv, CRT_IV_SHORTCUT_NONE, CRT_IV_SYNC_EAGER,
320+
true);
321+
DL_CDEBUG(rc != 0, DLOG_WARN, DLOG_INFO, rc,
322+
DF_LEADER " notify engines that check pool " DF_UUIDF " done, status %u",
323+
DP_LEADER(ins), DP_UUID(cpr->cpr_uuid), iv.ci_pool_status);
324+
if (rc == 0)
325+
cpr->cpr_notified_exit = 1;
326+
}
330327

328+
if (!(ins->ci_prop.cp_flags & CHK__CHECK_FLAG__CF_FAILOUT))
331329
*result = 0;
332-
}
333330

334331
if (update) {
335332
rc = chk_bk_update_leader(&ins->ci_bk);
@@ -2284,7 +2281,8 @@ chk_leader_sched(void *args)
22842281

22852282
ins_phase = chk_pools_find_slowest(ins, &done);
22862283

2287-
if (ins_phase >= CHK__CHECK_SCAN_PHASE__CSP_POOL_MBS && !ins->ci_orphan_done &&
2284+
if (ins_phase != CHK_INVAL_PHASE &&
2285+
ins_phase >= CHK__CHECK_SCAN_PHASE__CSP_POOL_MBS && !ins->ci_orphan_done &&
22882286
!DAOS_FAIL_CHECK(DAOS_CHK_SYNC_ORPHAN_PROCESS)) {
22892287
iv.ci_gen = cbk->cb_gen;
22902288
iv.ci_phase = ins_phase;
@@ -2316,7 +2314,7 @@ chk_leader_sched(void *args)
23162314
D_GOTO(out, rc);
23172315
}
23182316

2319-
if (cbk->cb_phase == CHK_INVAL_PHASE || cbk->cb_phase < ins_phase) {
2317+
if (ins_phase != CHK_INVAL_PHASE && ins_phase > cbk->cb_phase) {
23202318
D_INFO(DF_LEADER" moves from phase %u to phase %u\n",
23212319
DP_LEADER(ins), cbk->cb_phase, ins_phase);
23222320

0 commit comments

Comments
 (0)