-
Notifications
You must be signed in to change notification settings - Fork 306
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-16661 common: Integrate PMDK logging system w/ VOS logging system. #14923
Open
grom72
wants to merge
26
commits into
master
Choose a base branch
from
grom72/pmdk-w-logging
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
149320c
Integrate PMDK logging system w/ VOS logging system.
grom72 1011420
HARK is reported as INFO
grom72 f9b926d
Fix - force build
grom72 45e6548
Skip NLT tests as they blocks functional validation.
grom72 76fe5c6
Fix: apply git-format-clang chanhes
grom72 a516943
Test: re-run to remove failed Trivy build
grom72 224ea5c
Merge remote-tracking branch 'origin/master' into grom72/pmdk-w-logging
grom72 c445554
No error message on intentional pmemobj transaction abort
grom72 055c40f
Merge remote-tracking branch 'origin/master' into grom72/pmdk-w-logging
grom72 8f2b121
Fix merge
grom72 6a85d36
Fix: apply fix for https://github.com/pmem/pmdk/issues/6107
grom72 c5935f1
fix: skip NLT tests for full HW validation
grom72 3e73bd5
Merge remote-tracking branch 'origin/master' into grom72/pmdk-w-logging
grom72 ec17be3
Fix: apply fix for https://github.com/pmem/pmdk/issues/6126
grom72 9c1a53e
Fix: apply final fix for https://github.com/pmem/pmdk/issues/6126
grom72 4672438
Merge remote-tracking branch 'origin/master' into grom72/pmdk-w-logging
grom72 4c0b796
Merge remote-tracking branch 'origin/master' into grom72/pmdk-w-loging
grom72 a7ad9fa
Merge remote-tracking branch 'origin/master' into grom72/pmdk-w-logging
grom72 bd924f6
Update copyright info
grom72 f1e6c21
Merge remote-tracking branch 'origin/master' into grom72/pmdk-w-logging
grom72 7beccb8
Merge remote-tracking branch 'origin/master' into grom72/pmdk-w-logging
grom72 1d3f89a
Optimizing the use of the DD_FLAG() macro
jolivier23 13dd692
pmdk_log_function optimization
jolivier23 2b2b30c
Unified parameters naming convention
grom72 303a42d
pmemobj log to daos translation tab optimization
grom72 ce9fa93
Merge remote-tracking branch 'origin/master' into grom72/pmdk-w-logging
grom72 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
daos (2.7.101-3) unstable; urgency=medium | ||
daos (2.7.101-5) unstable; urgency=medium | ||
[ Tomasz Gromadzki ] | ||
* pmemobj errors and warnings reported via DAOS logging system | ||
|
||
-- Tomasz Gromadzki <[email protected]> Tue, 14 Jan 2025 12:00:00 +0200 | ||
|
||
daos (2.7.101-4) unstable; urgency=medium | ||
[ Jeff Olivier ] | ||
* Switch from libfuse3 to libfused | ||
|
||
-- Jeff Olivier <[email protected]> Thu, 19 Dec 2024 20:15:00 +0000 | ||
-- Jeff Olivier <[email protected]> Fri, 20 Dec 2024 20:15:00 +0000 | ||
|
||
daos (2.7.101-3) unstable; urgency=medium | ||
[ Phillip Henderson ] | ||
* Fix protobuf-c requiremnent for daos-client-tests on Leap. | ||
|
||
-- Phillip Henderson <[email protected]> Thu, 19 Dec 2024 13:05:00 -0500 | ||
|
||
daos (2.7.101-2) unstable; urgency=medium | ||
[ Denis Barakhtanov ] | ||
|
@@ -24,7 +36,6 @@ daos (2.7.100-11) unstable; urgency=medium | |
-- Michael MacDonald <[email protected]> Tue, 5 Nov 2024 12:00:00 -0500 | ||
|
||
daos (2.7.100-10) unstable; urgency=medium | ||
|
||
[ Sherin T George ] | ||
* Add DAV v2 lib | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/** | ||
* (C) Copyright 2024 Intel Corporation. | ||
* (C) Copyright 2025 Google LLC | ||
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP | ||
* | ||
* SPDX-License-Identifier: BSD-2-Clause-Patent | ||
*/ | ||
/** | ||
* Connecting the PMDK's logging to DAOS logging. | ||
* | ||
* vos/pmdk_log.c | ||
*/ | ||
|
||
#define D_LOGFAC DD_FAC(pmdk) | ||
|
||
#ifdef DAOS_PMEM_BUILD | ||
#include <daos/debug.h> | ||
#include <daos/common.h> | ||
#include <libpmemobj/log.h> | ||
#include <libpmemobj.h> | ||
|
||
#define PMDK_LOG_2_DAOS_LOG_INIT(PMDK_LEVEL, DAOS_LEVEL) \ | ||
[PMDK_LEVEL] = {.level = DAOS_LEVEL, .saved_mask = &DD_FLAG(DAOS_LEVEL, D_LOGFAC)} | ||
|
||
static struct { | ||
int level; | ||
int *saved_mask; | ||
} pmemobj_log_level_2_daos_log[] = { | ||
PMDK_LOG_2_DAOS_LOG_INIT(PMEMOBJ_LOG_LEVEL_HARK, DLOG_INFO), | ||
PMDK_LOG_2_DAOS_LOG_INIT(PMEMOBJ_LOG_LEVEL_FATAL, DLOG_CRIT), | ||
PMDK_LOG_2_DAOS_LOG_INIT(PMEMOBJ_LOG_LEVEL_ERROR, DLOG_ERR), | ||
PMDK_LOG_2_DAOS_LOG_INIT(PMEMOBJ_LOG_LEVEL_WARNING, DLOG_WARN), | ||
PMDK_LOG_2_DAOS_LOG_INIT(PMEMOBJ_LOG_LEVEL_NOTICE, DLOG_NOTE), | ||
PMDK_LOG_2_DAOS_LOG_INIT(PMEMOBJ_LOG_LEVEL_INFO, DLOG_INFO), | ||
PMDK_LOG_2_DAOS_LOG_INIT(PMEMOBJ_LOG_LEVEL_DEBUG, DLOG_DBG), | ||
}; | ||
|
||
#undef PMDK_LOG_2_DAOS_LOG_INIT | ||
|
||
static void | ||
pmdk_log_function(enum pmemobj_log_level level, const char *file_name, unsigned line_no, | ||
const char *function_name, const char *message) | ||
{ | ||
/* | ||
* There is a set of handy macros for each of the message priorities | ||
* that are used normally to report a message. They can't be used here | ||
* directly since the file name, line number and the function name | ||
* are provided via arguments to this callback function instead of | ||
* via macro definitions (__FILE__, __LINE__, and __func__) as | ||
* _D_LOG_NOCHECK() would like to consume them. So, the message here is | ||
* provided a few macro-calls later via _D_DEBUG_W_SAVED_MASK() macro which allows | ||
* to swap the _D_LOG_NOCHECK macro for a custom macro. | ||
* | ||
* D_ERROR(...) -> D_DEBUG(DLOG_ERR, ...) -> | ||
* _D_DEBUG(_D_LOG_NOCHECK, DLOG_ERR, ...) -> | ||
* _D_DEBUG_W_SAVED_MASK(_D_LOG_NOCHECK, DD_FLAG(DLOG_ERR, D_LOGFAC), DLOG_ERR, ...) | ||
*/ | ||
|
||
/* | ||
* A custom variant of _D_LOG_NOCHECK() which passes the file name, | ||
* line number and the function name from the local variables. | ||
*/ | ||
#define PMDK_LOG_NOCHECK(mask, fmt, ...) \ | ||
d_log(mask, "%s:%d %s() " fmt, file_name, line_no, function_name, ##__VA_ARGS__) | ||
|
||
int *saved_mask = pmemobj_log_level_2_daos_log[level].saved_mask; | ||
_D_DEBUG_W_SAVED_MASK(PMDK_LOG_NOCHECK, *saved_mask, | ||
pmemobj_log_level_2_daos_log[level].level, "%s\n", message); | ||
|
||
#undef PMDK_LOG_NOCHECK | ||
} | ||
|
||
int | ||
pmdk_log_attach(void) | ||
{ | ||
int rc = pmemobj_log_set_function(pmdk_log_function); | ||
if (rc == 0) { | ||
return 0; | ||
} else { | ||
return daos_errno2der(errno); | ||
} | ||
} | ||
|
||
#else | ||
|
||
int | ||
pmdk_log_attach(void) | ||
{ | ||
; | ||
} | ||
|
||
#endif /* DAOS_PMEM_BUILD */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* (C) Copyright 2024 Intel Corporation. | ||
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP | ||
* | ||
* SPDX-License-Identifier: BSD-2-Clause-Patent | ||
*/ | ||
/** | ||
* Connecting the PMDK's logging to DAOS logging. | ||
* vos/pmdk_log.h | ||
*/ | ||
|
||
#ifndef __PMDK_LOG__ | ||
#define __PMDK_LOG__ | ||
|
||
int | ||
pmdk_log_attach(void); | ||
|
||
#endif /* __PMDK_LOG__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
|
||
Name: daos | ||
Version: 2.7.101 | ||
Release: 4%{?relval}%{?dist} | ||
Release: 5%{?relval}%{?dist} | ||
Summary: DAOS Storage Engine | ||
|
||
License: BSD-2-Clause-Patent | ||
|
@@ -592,6 +592,9 @@ getent passwd daos_agent >/dev/null || useradd -s /sbin/nologin -r -g daos_agent | |
# No files in a shim package | ||
|
||
%changelog | ||
* Tue Jan 14 2025 Tomasz Gromadzki <[email protected]> 2.7.101-5 | ||
- pmemobj errors and warnings reported via DAOS logging system | ||
|
||
* Fri Dec 20 2024 Jeff Olivier <[email protected]> 2.7.101-4 | ||
- Switch libfuse3 to libfused | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this same patch applied in the PMDK rpm builder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jolivier23, Patch https://github.com/pmem/pmdk/commit/2abe15ac0b4eed894b6768cd82a3b0a7c4336284.patch is not required for PMDK rpm builder as it is related to ARM architecture only.
The rest are the same.