DAOS-18567 bio: Set SPDK/DPDK engine log level via env#17497
DAOS-18567 bio: Set SPDK/DPDK engine log level via env#17497
Conversation
Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
|
Ticket title is 'Set SPDK & DPDK log levels via engine environment variables' |
|
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-17497/1/testReport/ |
|
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 |
|
Test stage Test RPMs on EL 8.6 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/1029/log |
…ggle-spdk-dbg2 Features: control Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
| DAOS_DPDK_LOG_DEFAULT); | ||
| dpdk_level = DAOS_DPDK_LOG_DEFAULT; | ||
| } else { | ||
| D_INFO("DPDK log level is %u\n", dpdk_level); |
There was a problem hiding this comment.
Minor: we could combine the "DPDK & SPDK log level" message into single D_INFO.
| /* 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 |
There was a problem hiding this comment.
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
|
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 |
|
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 |
|
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
left a comment
There was a problem hiding this comment.
Comments are minor and could be addressed in a follow-on.
| } | ||
|
|
||
| envCtx := C.dpdk_cli_override_opts | ||
| envCtx := C.dpdk_cli_build_opts(4, 4) |
| * DPDK log level (1-8): 1=EMERG, 2=ALERT, 3=CRIT, 4=ERR, 5=WARNING, | ||
| * 6=NOTICE, 7=INFO, 8=DEBUG |
There was a problem hiding this comment.
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.
| * DPDK log level (1-8): 1=EMERG, 2=ALERT, 3=CRIT, 4=ERR, 5=WARNING, | ||
| * 6=NOTICE, 7=INFO, 8=DEBUG | ||
| * | ||
| * \param eal_level Log level for EAL facility (1-8) |
There was a problem hiding this comment.
Maybe a dumb question, but what does EAL stand for?
| } | ||
|
|
||
| /* Build with custom EAL level, others at default */ | ||
| ret = snprintf(dpdk_cli_opts_buffer, sizeof(dpdk_cli_opts_buffer), |
There was a problem hiding this comment.
Looks like this function is only called during bio init, but it'd be good to note in the comments that it's not thread-safe.
| if (ret < 0 || ret >= sizeof(dpdk_cli_opts_buffer)) { | ||
| return NULL; |
There was a problem hiding this comment.
I think we should log an error here. If snprintf fails, it would be nice to know why.
…ggle-spdk-dbg2 Features: control Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
|
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-17497/6/testReport/ |
|
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 |
|
Test stage Functional 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/1089/log |
|
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 |
|
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 |
|
Test stage Functional 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/491/log |
|
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 |
Allow administrator to configure the engine process log levels for
SPDK and DPDK via environment variables DAOS_XPDK_LOG_LEVEL. SPDK
accepts 0-4 (ERR,WARN,NOTICE,INFO,DEBUG) and DPDK accepts 1-8.
Steps for the author:
After all prior steps are complete: