Hi,
as part of my ongoing investigation on sssd-1.8.93's bugs, here is another distilled item:
- when /var/lib/sss/db is missing, sssd does not start. That's ok, though the syslog error message "Cannot load configuration database" is *very* sparse. (It could, for example, say what file it failed to open, and strerror(errno)).
- when /var/lib/sss/mc is missing, sssd does start, and emits a warning message into sssd_nss.log, but only at debug_level=9. This needs to be "louder". (Perhaps terminate sssd, like in the /db case.)
- Can't sssd just create all the directories it needs in /var/lib/sss by itself?
- if /var/lib/sss/mc is missing, the inability to read /mc/group goes in silence. (Well, that's perhaps a "bug" of id(1) and getent(1).) It requires that one checks the return code and errno to see that getgrid returns EBADMSG.
On Thu, Jul 12, 2012 at 11:12:50AM +0200, Jan Engelhardt wrote:
Hi,
as part of my ongoing investigation on sssd-1.8.93's bugs, here is another distilled item:
- when /var/lib/sss/db is missing, sssd does not start. That's ok, though the syslog error message "Cannot load configuration database" is *very* sparse. (It could, for example, say what file it failed to open, and strerror(errno)).
SSSD warns about the inability to open configuration database in the debug logs in more detail than syslog, the syslog pretty much just tells the admin to go look into the debug logs:
[sssd] [confdb_init] (0x0010): Unable to open config database [/var/lib/sss/db/config.ldb] [sssd] [load_configuration] (0x0010): The confdb initialization failed [sssd] [main] (0x0020): Error loading configuration database: [5]: Input/output error
This is the case with many other severe errors we log to syslog, because quite often it would be impossible to report the whole error to syslog without polluting it.
We might want to include errno and strerror(errno), though.. https://fedorahosted.org/sssd/ticket/1414
- when /var/lib/sss/mc is missing, sssd does start, and emits a warning message into sssd_nss.log, but only at debug_level=9. This needs to be "louder". (Perhaps terminate sssd, like in the /db case.)
There's a SSSDBG_CRIT_FAILURE-level debug message, but it lacks a newline, so it's quite easy to overlook it:
(Thu Jul 12 12:01:17 2012) [sssd[nss]] [nss_process_init] (0x0020): passwd mmap cache is DISABLED(Thu Jul 12 12:01:17 2012) [sssd[nss]] [sss_mc_create_file] (0x0020): Failed to open mmap file /var/lib/sss/mc/group: 2(No such file or directory)
I have pushed a trivial fix to this.
I think that the SSSD should start, but just disable the fast cache feature. It claims to be doing that, but as you noticed, group lookups no longer work correctly. passwd lookups seems to be working fine.
This is being tracked by: https://fedorahosted.org/sssd/ticket/1415
- Can't sssd just create all the directories it needs in /var/lib/sss by itself?
I haven't tested this, but I'm not sure if SELinux would allow the mkdir. This seems like quite a corner case, why would the directories be missing?
- if /var/lib/sss/mc is missing, the inability to read /mc/group goes in silence. (Well, that's perhaps a "bug" of id(1) and getent(1).) It requires that one checks the return code and errno to see that getgrid returns EBADMSG.
I think this would be solved by fixing #1415.
On Thu, 2012-07-12 at 12:12 +0200, Jakub Hrozek wrote:
- Can't sssd just create all the directories it needs in /var/lib/sss by itself?
I haven't tested this, but I'm not sure if SELinux would allow the mkdir. This seems like quite a corner case, why would the directories be missing?
Permission errors are one thing, but really it's a division of responsibility problem. Establishing that the appropriate standard directories are present is a problem that should be solved in packaging, not at runtime. The only directories that should ever be created at runtime are those whose location is dependent on runtime information (such as Kerberos caches whose location is based on the UID of the user logging in).
When we run 'make install' from source, we *do* create all of the standard directories we expect to use (including /var/lib/sss/mc, I just verified).
On Thursday 2012-07-12 12:12, Jakub Hrozek wrote:
- Can't sssd just create all the directories it needs in /var/lib/sss by itself?
I haven't tested this, but I'm not sure if SELinux would allow the mkdir. This seems like quite a corner case, why would the directories be missing?
Because one rpm package creator (that would be me) did not put mc into %files when going from the last non-mc version, and there was no NEWS file or other readily-available changelog in the tarball.
On Thu, 2012-07-12 at 13:47 +0200, Jan Engelhardt wrote:
On Thursday 2012-07-12 12:12, Jakub Hrozek wrote:
- Can't sssd just create all the directories it needs in /var/lib/sss by itself?
I haven't tested this, but I'm not sure if SELinux would allow the mkdir. This seems like quite a corner case, why would the directories be missing?
Because one rpm package creator (that would be me) did not put mc into %files when going from the last non-mc version, and there was no NEWS file or other readily-available changelog in the tarball.
Yeah, you make an excellent point. We really should make sure to provide a packager guide whenever we do a release. I'll add that to https://fedorahosted.org/sssd/wiki/ReleaseProcess now.
sssd-devel@lists.fedorahosted.org