Skip to content

DAOS-18567 bio: Set SPDK/DPDK engine log level via env#17497

Open
tanabarr wants to merge 5 commits intomasterfrom
tanabarr/control-toggle-spdk-dbg2
Open

DAOS-18567 bio: Set SPDK/DPDK engine log level via env#17497
tanabarr wants to merge 5 commits intomasterfrom
tanabarr/control-toggle-spdk-dbg2

Conversation

@tanabarr
Copy link
Contributor

@tanabarr tanabarr commented Feb 3, 2026

Allow administrator to configure the engine process log levels for
SPDK and DPDK via environment variables DAOS_[SD]PDK_LOG_LEVEL. SPDK
accepts 0-4 (ERR,WARN,NOTICE,INFO,DEBUG) and DPDK accepts 1-8.

Steps for the author:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
@tanabarr tanabarr requested review from a team as code owners February 3, 2026 18:47
@tanabarr tanabarr self-assigned this Feb 3, 2026
@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Ticket title is 'Set SPDK & DPDK log levels via engine environment variables'
Status is 'In Review'
https://daosio.atlassian.net/browse/DAOS-18567

@NiuYawei
Copy link
Contributor

NiuYawei commented Feb 4, 2026

@tanabarr is this for replacing #17488 ?

@daosbuild3
Copy link
Collaborator

@daosbuild3
Copy link
Collaborator

Test stage Fault injection testing on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-17497/1/execution/node/984/log

@daosbuild3
Copy link
Collaborator

@tanabarr
Copy link
Contributor Author

tanabarr commented Feb 4, 2026

@tanabarr is this for replacing #17488 ?

yes

…ggle-spdk-dbg2

Features: control
Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
NiuYawei
NiuYawei previously approved these changes Feb 5, 2026
DAOS_DPDK_LOG_DEFAULT);
dpdk_level = DAOS_DPDK_LOG_DEFAULT;
} else {
D_INFO("DPDK log level is %u\n", dpdk_level);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: we could combine the "DPDK & SPDK log level" message into single D_INFO.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

knard38
knard38 previously approved these changes Feb 5, 2026
Copy link
Contributor

@knard38 knard38 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a minor non blocking remark.

/* Max SPDK log level */
#define DAOS_SPDK_LOG_MAX SPDK_LOG_DEBUG
/* Default DPDK log level: RTE_LOG_ERR */
#define DAOS_DPDK_LOG_DEFAULT 4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: Could be nice to define it in a .h file to make it accessible in spdk_default.go and thus not call C.dpdk_cli_build_opts(4, 4) with hard coded parameter values

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@daosbuild3
Copy link
Collaborator

Test stage Fault injection testing on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-17497/3/execution/node/766/log

@daosbuild3
Copy link
Collaborator

Test stage Fault injection testing on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-17497/4/execution/node/431/log

@daosbuild3
Copy link
Collaborator

Test stage Fault injection testing on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-17497/5/execution/node/431/log

kjacque
kjacque previously approved these changes Feb 6, 2026
Copy link
Contributor

@kjacque kjacque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments are minor and could be addressed in a follow-on.

Comment on lines +171 to +172
* DPDK log level (1-8): 1=EMERG, 2=ALERT, 3=CRIT, 4=ERR, 5=WARNING,
* 6=NOTICE, 7=INFO, 8=DEBUG
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we can't include these from some dpdk header file, it would be better to define our own enum than to embed the meaning in a comment here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed given we are just passing them through I've settled on defining the relevant levels in control.h

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the log levels are vendor specific, I'd suggest removing them from the comment as well, and refer to the min and max instead.

Comment on lines 104 to 105
if (ret < 0 || ret >= sizeof(dpdk_cli_opts_buffer)) {
return NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should log an error here. If snprintf fails, it would be nice to know why.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to easily add logfac and daos common header so I will defer this to another time if okay with you. there are only two reasons for nULL return here and it should be easy to differentiate between the two based on the log level inputs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with me for the time being.

…ggle-spdk-dbg2

Features: control
Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
@daosbuild3
Copy link
Collaborator

@daosbuild3
Copy link
Collaborator

Test stage Fault injection testing on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-17497/6/execution/node/984/log

@daosbuild3
Copy link
Collaborator

@daosbuild3
Copy link
Collaborator

Test stage Fault injection testing on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-17497/7/execution/node/446/log

@daosbuild3
Copy link
Collaborator

Test stage Fault injection testing on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-17497/8/execution/node/445/log

@daosbuild3
Copy link
Collaborator

@daosbuild3
Copy link
Collaborator

Test stage Fault injection testing on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-17497/9/execution/node/445/log

Features: control
Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
@tanabarr tanabarr dismissed stale reviews from NiuYawei, kjacque, and knard38 via 8daa259 February 9, 2026 23:21
@daosbuild3
Copy link
Collaborator

@daosbuild3
Copy link
Collaborator

Test stage Fault injection testing on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-17497/12/execution/node/984/log

@tanabarr
Copy link
Contributor Author

build with parameters without fault injection test selected, because it seems to be broken

knard38
knard38 previously approved these changes Feb 10, 2026
Copy link
Contributor

@knard38 knard38 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Features: control
Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
@tanabarr tanabarr requested a review from knard38 February 11, 2026 23:10
Copy link
Contributor

@kjacque kjacque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tanabarr tanabarr requested a review from knard38 February 12, 2026 15:06
@tanabarr tanabarr requested a review from a team February 14, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants