-
Notifications
You must be signed in to change notification settings - Fork 247
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
SSSD Log: no_such_file_or_directory_modification #5622
SSSD Log: no_such_file_or_directory_modification #5622
Conversation
@elkoniu can you review it? |
Sure, will be done today. |
Hi Iker, Pawel, The error "No such file or directory" has been replaced with more relevant message "Machine is not on the network" since the earlier message was logged once fail over cycled through all available servers hence did not make sense. Regards, |
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.
Quoting /usr/include/asm/errno.h
:
#define ENOENT 2 /* No such file or directory */
#define ENONET 64 /* Machine is not on the network */
In the be_resolve_server_process()
we are jumping on top of server list.
After entry is validated error code is returned. I am wondering if the better replacement would not be:
#define EHOSTDOWN 112 /* Host is down */
@sumit-bose can you advice here? I saw that EHOSTDOWN
is rarely used in SSSD.
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.
After giving it a second look I think it should be solved different.
ENOENT
is used to tell that we tried all servers from the list and there is nothing more to check.
This is correct. The problem is that due to historical reasons it is printed as No such file or directory
.
I thing that change should be done in function consuming this return - be_resolve_server_done
(src/providers/data_provider_fo.c:578). This upper level function should check for ENOENT
and align error message.
This is similar case to #5625
265dc74
to
8c332cf
Compare
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.
Small style related comment but generally it looks good :)
src/providers/data_provider_fo.c
Outdated
"Server resolution failed: [%d]: %s\n", ret, sss_strerror(ret)); | ||
if (ret == ENOENT) { | ||
DEBUG(SSSDBG_TRACE_LIBS, | ||
"Server resolution failed[%d]: All servers down\n", ret); |
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.
Style error - white space missing in between failed
and opening [
bracket.
"Server resolution failed[%d]: All servers down\n", ret); | ||
} else { | ||
DEBUG(SSSDBG_TRACE_LIBS, | ||
"Server resolution failed: [%d]: %s\n", ret, sss_strerror(ret)); |
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.
In this line we have colon :
after failed
and brackets, where in upper line there is one after brackets. You may want to unify this to both have two or single colon.
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.
Hi Pawel,
I have made the necessary changes. Can you please review.
Thank you!
Replacing no such file or directory error code with alternate message Resolves: SSSD#5614
8c332cf
to
4a5912f
Compare
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.
LGTM
Replacing no such file or directory error code with alternate message
Resolves: #5614