diff --git a/ChangeLog b/ChangeLog index d76593894b..095d7750ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +XXX + + * Version X.X.X + + - Fix "The pool was not closed" message (no ADR failure) (daos-stack/pmdk#1, DAOS-18692) + Fri Jan 16 2026 Oksana Sałyk * Version 2.1.3 diff --git a/src/common/shutdown_state.c b/src/common/shutdown_state.c index 49e9caad9a..4bc3a67c30 100644 --- a/src/common/shutdown_state.c +++ b/src/common/shutdown_state.c @@ -157,6 +157,8 @@ shutdown_state_clear_dirty(struct shutdown_state *sds, struct pool_replica *rep) shutdown_state_checksum(sds, rep); } +#define SDS_REINIT_SUFFIX " - reinitializing the ADR failure detection state." + /* * shutdown_state_check -- compares and fixes shutdown state */ @@ -194,8 +196,7 @@ shutdown_state_check(struct shutdown_state *curr_sds, if (!is_checksum_correct) { /* the program was killed during opening or closing the pool */ - CORE_LOG_WARNING( - "The pool was not opened/closed properly - reinitializing ADR failure detection."); + CORE_LOG_WARNING("The pool was not opened/closed properly" SDS_REINIT_SUFFIX); shutdown_state_reinit(curr_sds, pool_sds, rep); return 0; } @@ -203,22 +204,18 @@ shutdown_state_check(struct shutdown_state *curr_sds, if (is_uuid_usc_correct) { if (dirty == 0) return 0; - /* - * the program was killed when the pool was opened - * but there wasn't an ADR failure - */ - CORE_LOG_WARNING( - "The ADR failure was detected but the pool was closed properly - reinitializing ADR failure detection."); + /* the program was killed when the pool was opened but there wasn't an ADR failure */ + CORE_LOG_WARNING("The pool was not closed" SDS_REINIT_SUFFIX); shutdown_state_reinit(curr_sds, pool_sds, rep); return 0; } if (dirty == 0) { if (is_uuid_correct) CORE_LOG_WARNING( - "The ADR failure was detected but the pool was closed properly - reinitializing ADR failure detection."); + "The ADR failure was detected but the pool was closed properly" SDS_REINIT_SUFFIX); else CORE_LOG_HARK( - "The pool has moved to a new location but it was closed properly - reinitializing ADR failure detection."); + "The pool has moved to a new location but it was closed properly" SDS_REINIT_SUFFIX); shutdown_state_reinit(curr_sds, pool_sds, rep); return 0; } diff --git a/src/test/core_log_max/call_all.c.generated b/src/test/core_log_max/call_all.c.generated index 4674fad626..78525276e4 100644 --- a/src/test/core_log_max/call_all.c.generated +++ b/src/test/core_log_max/call_all.c.generated @@ -466,11 +466,11 @@ call_all_CORE_LOG_WARNING(void) // src/common/shutdown_state.c CORE_LOG_WARNING("Enabling ADR failure detection, assuming pool consistency up to this point."); // src/common/shutdown_state.c - CORE_LOG_WARNING("The pool was not opened/closed properly - reinitializing ADR failure detection."); + CORE_LOG_WARNING("The pool was not opened/closed properly - reinitializing the ADR failure detection state."); // src/common/shutdown_state.c - CORE_LOG_WARNING("The ADR failure was detected but the pool was closed properly - reinitializing ADR failure detection."); + CORE_LOG_WARNING("The pool was not closed - reinitializing the ADR failure detection state."); // src/common/shutdown_state.c - CORE_LOG_WARNING("The ADR failure was detected but the pool was closed properly - reinitializing ADR failure detection."); + CORE_LOG_WARNING("The ADR failure was detected but the pool was closed properly - reinitializing the ADR failure detection state."); // src/libpmemobj/heap.c CORE_LOG_WARNING("failed to allocate memory block runtime tracking info"); // src/libpmemobj/heap.c diff --git a/src/test/util_sds/grep3.log.match b/src/test/util_sds/grep3.log.match index 65fdd3a5a2..fbf2647020 100644 --- a/src/test/util_sds/grep3.log.match +++ b/src/test/util_sds/grep3.log.match @@ -1 +1 @@ -: <1> [shutdown_state.c:$(N) shutdown_state_check] The pool has moved to a new location but it was closed properly - reinitializing ADR failure detection. +: <1> [shutdown_state.c:$(N) shutdown_state_check] The pool has moved to a new location but it was closed properly - reinitializing the ADR failure detection state. diff --git a/src/test/util_sds/grep5.log.match b/src/test/util_sds/grep5.log.match index 64f8dea763..253d51c7b7 100644 --- a/src/test/util_sds/grep5.log.match +++ b/src/test/util_sds/grep5.log.match @@ -1 +1 @@ -: <2> [shutdown_state.c:$(N) shutdown_state_check] The ADR failure was detected but the pool was closed properly - reinitializing ADR failure detection. +: <2> [shutdown_state.c:$(N) shutdown_state_check] The pool was not closed - reinitializing the ADR failure detection state. diff --git a/src/test/util_sds_check/out1.log.match b/src/test/util_sds_check/out1.log.match index c9575de573..ac7e5b59cc 100644 --- a/src/test/util_sds_check/out1.log.match +++ b/src/test/util_sds_check/out1.log.match @@ -3,5 +3,5 @@ util_sds_check$(nW)TEST1: START: util_sds_check src version: $(nW) compiled with support for shutdown state compiled with libndctl $(nW) -The pool was not opened/closed properly - reinitializing ADR failure detection. +The pool was not opened/closed properly - reinitializing the ADR failure detection state. util_sds_check$(nW)TEST1: DONE diff --git a/src/test/util_sds_check/out2.log.match b/src/test/util_sds_check/out2.log.match index 8e878eb850..50a39d1230 100644 --- a/src/test/util_sds_check/out2.log.match +++ b/src/test/util_sds_check/out2.log.match @@ -3,5 +3,5 @@ util_sds_check$(nW)TEST2: START: util_sds_check src version: $(nW) compiled with support for shutdown state compiled with libndctl $(nW) -The ADR failure was detected but the pool was closed properly - reinitializing ADR failure detection. +The pool was not closed - reinitializing the ADR failure detection state. util_sds_check$(nW)TEST2: DONE diff --git a/src/test/util_sds_check/out3.log.match b/src/test/util_sds_check/out3.log.match index 6b65326c5b..dd25ebdd36 100644 --- a/src/test/util_sds_check/out3.log.match +++ b/src/test/util_sds_check/out3.log.match @@ -3,5 +3,5 @@ util_sds_check$(nW)TEST3: START: util_sds_check src version: $(nW) compiled with support for shutdown state compiled with libndctl $(nW) -The pool has moved to a new location but it was closed properly - reinitializing ADR failure detection. +The pool has moved to a new location but it was closed properly - reinitializing the ADR failure detection state. util_sds_check$(nW)TEST3: DONE diff --git a/src/test/util_sds_check/out5.log.match b/src/test/util_sds_check/out5.log.match index 7a7f21f0d1..858ece451d 100644 --- a/src/test/util_sds_check/out5.log.match +++ b/src/test/util_sds_check/out5.log.match @@ -3,5 +3,5 @@ util_sds_check$(nW)TEST5: START: util_sds_check src version: $(nW) compiled with support for shutdown state compiled with libndctl $(nW) -The ADR failure was detected but the pool was closed properly - reinitializing ADR failure detection. +The ADR failure was detected but the pool was closed properly - reinitializing the ADR failure detection state. util_sds_check$(nW)TEST5: DONE diff --git a/utils/call_stacks_analysis/log_call_all_generate.py b/utils/call_stacks_analysis/log_call_all_generate.py index d4a2b7924d..b0404da1a1 100755 --- a/utils/call_stacks_analysis/log_call_all_generate.py +++ b/utils/call_stacks_analysis/log_call_all_generate.py @@ -274,7 +274,8 @@ def call_get_format_tokens(call): LITERAL_TO_STRING = { 'PRIx64': 'lx', - 'PRIu64': 'lu' + 'PRIu64': 'lu', + 'SDS_REINIT_SUFFIX': ' - reinitializing the ADR failure detection state.', } def token_stringify(token: str) -> str: