dlck: warn when running not as root or a daos_server group member#17208
dlck: warn when running not as root or a daos_server group member#17208
Conversation
Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
|
Errors are component not formatted correctly,Ticket number prefix incorrect,PR title is malformatted. See https://daosio.atlassian.net/wiki/spaces/DC/pages/11133911069/Commit+Comments,Unable to load ticket data |
|
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-17208/1/testReport/ |
... daos/mgmt.h, fix error handling when getpwuid() fails, and introduce DLCK_FAULT_GETPWUID fault injection point to test the getpwuid() fail scenario. Signed-off-by: Jan Michalski <jan-marian.michalski@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-17208/3/testReport/ |
src/utils/dlck/dlck_main.c
Outdated
| ret = d_errno2der(errno); | ||
| CK_PRINTFL_RC(ck, ret, "Cannot get the name of a user for uid=%" PRIuMAX, | ||
| (uintmax_t)euid); | ||
| CK_PRINT(ck, UNEXPECTED_USER_WARNING_MSG); |
There was a problem hiding this comment.
If possible, I would suggest to merge the CK_PRINT and above CK_PRINTFL_RC into one call since the print logic can handle complex-formatted message.
There was a problem hiding this comment.
It won't look good. CK_PRINTFL_RC() appends the rc description at the end of the message. The rc is related to the operation itself not the warning message.
Obviously, we could break down CK_PRINTFL_RC() and print rc description in the correct place manually but I find it cumbersome when a proper macro exists. Using a dedicated macro when printing an rc description is better compared to constructing a print format each time since it guarantees consistency.
Let's leave it as it is for now.
| } | ||
|
|
||
| CK_PRINTF(ck, EFFECTIVE_USER_STR "%s (uid=%" PRIuMAX ")\n", pw->pw_name, (uintmax_t)euid); | ||
| CK_PRINT(ck, UNEXPECTED_USER_WARNING_MSG); |
There was a problem hiding this comment.
Similar as above merge suggestion.
|
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-17208/3/execution/node/1357/log |
Skip already passed stages. Skip-unit-test-memcheck: true Skip-func-test-vm: true Skip-func-hw-test-medium-verbs-provider: true Skip-func-hw-test-large-md-on-ssd: true Signed-off-by: Jan Michalski <jan-marian.michalski@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-17208/4/testReport/ |
|
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-17208/4/execution/node/1009/log |
…warn-not-root-or-daos_server
|
Test stage Unit Test 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-17208/6/testReport/ |
|
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-17208/6/testReport/ |
…warn-not-root-or-daos_server Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
... group member Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
|
@Nasf-Fan @rpadma2 I updated this warning to reflect the work done here: https://daosio.atlassian.net/browse/DAOS-18324 All new pools now can be maintained (via DDB/DLCK) by users belonging to the daos_server groups as well as by root. |
Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
Signed-off-by: Jan Michalski <jan-marian.michalski@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-17208/8/testReport/ |
Steps for the author:
After all prior steps are complete: