Skip to content

DAOS-18595 gurt: Handle "ERR" and "DBUG" environment values with DD_STDERR#17759

Open
knard38 wants to merge 10 commits intomasterfrom
ckochhof/fix/master/daos-18595/patch-001
Open

DAOS-18595 gurt: Handle "ERR" and "DBUG" environment values with DD_STDERR#17759
knard38 wants to merge 10 commits intomasterfrom
ckochhof/fix/master/daos-18595/patch-001

Conversation

@knard38
Copy link
Copy Markdown
Contributor

@knard38 knard38 commented Mar 23, 2026

Description

Previously, the DD_STDERR environment variable did not support the same set of values as DD_LOG_MASK.
This patch updates the management of DD_STDERR to ensure consistent value handling between both environment variables.

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).

@knard38 knard38 self-assigned this Mar 23, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

Ticket title is 'ERROR and DBUG debug level names can not be used with DD_STDERR env variable'
Status is 'In Review'
https://daosio.atlassian.net/browse/DAOS-18595

@daosbuild3
Copy link
Copy Markdown
Collaborator

@knard38 knard38 force-pushed the ckochhof/fix/master/daos-18595/patch-001 branch 4 times, most recently from 42f2919 to 1300346 Compare April 2, 2026 07:35
…TDERR

Previously, the DD_STDERR environment variable did not support the same
set of values as DD_LOG_MASK. This patch updates the management of
DD_STDERR to ensure consistent value handling between both environment
variables.

Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
@knard38 knard38 force-pushed the ckochhof/fix/master/daos-18595/patch-001 branch from 1300346 to cd50cd7 Compare April 3, 2026 07:18
@knard38 knard38 marked this pull request as ready for review April 17, 2026 12:56
@knard38 knard38 requested a review from a team as a code owner April 17, 2026 12:56
@daosbuild3
Copy link
Copy Markdown
Collaborator

Test stage Functional Hardware Medium MD on SSD completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-17759/11/testReport/

@knard38
Copy link
Copy Markdown
Contributor Author

knard38 commented Apr 20, 2026

The only hardware failing test /dfuse/daos_build.py is not related to this PR but with CI connection issue with external resources as showed by the following logs:

16:58:24 INFO | ==> Step 11: Running 'sudo -E NO_OPENMPI_DEVEL=1 /tmp/install.sh -y' with a 1200s timeout [elapsed since last step: 0.21s]
16:58:24 DEBUG| Running on hdr-223 with a 1200 second timeout: export PATH=/tmp/daos_dfuse_test_dfuse_daos_build_wb_1/venv/bin:$PATH;export VIRTUAL_ENV=/tmp/daos_dfuse_test_dfuse_daos_build_wb_1/venv;export COVFILE=/tmp/test.cov;export HTTPS_PROXY=http://proxy.houston.hpecorp.net:8080/; sudo -E NO_OPENMPI_DEVEL=1 /tmp/install.sh -y
17:00:24 DEBUG|   hdr-223 (rc=1):
17:00:24 DEBUG|     created by dnf config-manager from https://arti 0.0  B/s |   0  B     02:00    
17:00:24 DEBUG|     Errors during downloading metadata for repository 'artifactory.daos.hpc.amslabs.hpecorp.net_artifactory_mellanox-proxy_doca_3.2.1_rhel9_x86_64':
17:00:24 DEBUG|       - Curl error (28): Timeout was reached for https://artifactory.daos.hpc.amslabs.hpecorp.net/artifactory/mellanox-proxy/doca/3.2.1/rhel9/x86_64/repodata/repomd.xml [Operation timed out after 30000 milliseconds with 0 out of 0 bytes received]
17:00:24 DEBUG|     Error: Failed to download metadata for repo 'artifactory.daos.hpc.amslabs.hpecorp.net_artifactory_mellanox-proxy_doca_3.2.1_rhel9_x86_64': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
17:00:24 INFO | Command export PATH=/tmp/daos_dfuse_test_dfuse_daos_build_wb_1/venv/bin:$PATH;export VIRTUAL_ENV=/tmp/daos_dfuse_test_dfuse_daos_build_wb_1/venv;export COVFILE=/tmp/test.cov;export HTTPS_PROXY=http://proxy.houston.hpecorp.net:8080/; sudo -E NO_OPENMPI_DEVEL=1 /tmp/install.sh -y completed in 2:00 (10% of timeout)
17:00:24 INFO | Failure detected - debug information:
17:00:24 ERROR| BuildDaos Test Failed

@knard38 knard38 added the forced-landing The PR has known failures or has intentionally reduced testing, but should still be landed. label Apr 20, 2026
@knard38
Copy link
Copy Markdown
Contributor Author

knard38 commented Apr 20, 2026

@grom72 , @jolivier23 @tanabarr and @wiliamhuang please could you have a look at this short PR ?

jolivier23
jolivier23 previously approved these changes Apr 23, 2026
Comment thread src/gurt/debug.c Outdated
Comment on lines +389 to +392
if (strncasecmp(env, "ERR", sizeof("ERR")) == 0) {
d_dbglog_data.dd_prio_err = DLOG_ERR;
goto out_env;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isn't the value "err" available in the d_dbg_prio_dict array?

Suggested change
if (strncasecmp(env, "ERR", sizeof("ERR")) == 0) {
d_dbglog_data.dd_prio_err = DLOG_ERR;
goto out_env;
}

Copy link
Copy Markdown
Contributor Author

@knard38 knard38 Apr 24, 2026

Choose a reason for hiding this comment

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

From the code, you are correct it is ERROR which is missing.

  • Replace ERR with ERROR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed with commit f7dcb80

Comment thread src/gurt/debug.c Outdated
if (env == NULL)
return;

/* handle some quirks */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
/* handle some quirks */
/* DBUG can be used as an alias for DEBUG */

Copy link
Copy Markdown
Contributor Author

@knard38 knard38 Apr 24, 2026

Choose a reason for hiding this comment

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

  • Update comment messages

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed with commit f7dcb80

- Update comment messages
- Replace ERR with ERROR

Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
tanabarr
tanabarr previously approved these changes Apr 24, 2026
Copy link
Copy Markdown
Contributor

@tanabarr tanabarr left a comment

Choose a reason for hiding this comment

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

no unit test coverage?

@knard38
Copy link
Copy Markdown
Contributor Author

knard38 commented Apr 24, 2026

no unit test coverage?

Not sure any unit test exists for that.
I am going to do more investigation on this.

grom72
grom72 previously approved these changes Apr 24, 2026
@daosbuild3
Copy link
Copy Markdown
Collaborator

Test stage Functional Hardware Medium MD on SSD completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-17759/12/testReport/

Add unit tests for DD_STDERR environment variable parsing,
covering standard values, case insensitivity, invalid inputs,
and unset behavior.

Also add cmocka test filter support via command-line argument
when built with cmocka >= 1.1.5.

Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
@knard38 knard38 dismissed stale reviews from grom72 and tanabarr via 6b602ee April 30, 2026 16:07
@knard38
Copy link
Copy Markdown
Contributor Author

knard38 commented Apr 30, 2026

no unit test coverage?

  • Add unit tests

@tanabarr unit test has been added in commit 6b602ee

kanard38 added 3 commits May 4, 2026 07:01
Remove extra tabs in variable declarations and struct member
definitions in test_dd_stderr function to align with consistent
spacing style.

Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
Replace tab-aligned columns with consistent 4-space indentation
in the test_dd_stderr test case array.

Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
@knard38 knard38 requested review from grom72 and tanabarr May 4, 2026 07:58
@daosbuild3
Copy link
Copy Markdown
Collaborator

Test stage Functional Hardware Medium MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-17759/16/execution/node/1256/log

tanabarr
tanabarr previously approved these changes May 5, 2026
Comment thread src/gurt/tests/test_gurt.c Outdated
{"Warn", DLOG_WARN},
{"CRIT", DLOG_CRIT},
{"Info", DLOG_INFO},
{"error", DLOG_ERR},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this seems to be a duplicate case, did you mean to change case somehow?

Copy link
Copy Markdown
Contributor Author

@knard38 knard38 May 5, 2026

Choose a reason for hiding this comment

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

  • Fix duplicate cases

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed with commit 31e5732

Comment thread src/gurt/tests/test_gurt.c Outdated
{"CRIT", DLOG_CRIT},
{"Info", DLOG_INFO},
{"error", DLOG_ERR},
{"dbug", DLOG_DBG},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

as above

Copy link
Copy Markdown
Contributor Author

@knard38 knard38 May 5, 2026

Choose a reason for hiding this comment

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

  • Fix duplicate cases

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed with commit 31e5732

kanard38 added 2 commits May 5, 2026 14:31
Fix reviewers comments:
- Fix duplicate cases

Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

forced-landing The PR has known failures or has intentionally reduced testing, but should still be landed.

Development

Successfully merging this pull request may close these issues.

6 participants