On Tue, Mar 29, 2016 at 01:14:10PM -0500, Jason L Tibbitts III wrote:
I'm trying to better understand how sssd caches automount maps.
I've
had everything working for quite some time; autofs will get the maps
(which are stored in ldap) from sssd when the system boots and in
general there are no issues. However, there are a couple of problems
I've been having:
* Autofs is mostly nonfunctional When a system boots without the network.
This is not expected.
* Even with a network, autofs sometimes simply fails to start with:
automount[917]: setautomntent: lookup(sss): setautomntent: No such
file or directory
This might be OK, it's an annoying error message that we might want to
fix, but basically automounter is querying SSSD for more maps until SSSD
returns ENOENT. What you're seeing is just strerror(ENOENT), which
indicates all maps were enumerated, but not necessarilly that there were
no maps.
---
With no network, autofs starts but the only thing which operates is the
/net map because that's in /etc/auto.master. The rest of the maps
simply aren't there, and if the network returns, autofs doesn't notice
(which I know is an issue with autofs).
I thought that sssd would be able to cache the master map entries which
come from ldap when the network is offline, but that doesn't seem to be
the case. I know that it couldn't actually mount anything, but if it at
had access to a cached version the map, it would at least start properly.
Yes, that's what I would expect, too. It would be nice to see the autofs
responder logs. I think you could also simulate this w/o restart by
telling SSSD to go offline with SIGUSR1 and then running automounter -m.
---
The startup failure is rather difficult to reproduce. My guess is that
autofs is simply coming up before sssd is ready to provide the master
map, but I haven't been able to confirm that. I also haven't been able
to see how much of autofs is actually functioning in that case (because
people keep rebooting their desktops before I can examine one in
detail).
Do you know if SSSD is running at that point? Isn't it 'just' a race
between sssd and autofs services?
By the way, this reminds me of
https://bugzilla.redhat.com/show_bug.cgi?id=1113639 but that issue only
happens with an empty cache, it looks like sssd doesn't even revert to
cache in your case.
>
> ---
>
> By skipping ldap and storing the entire master map in /etc/auto.master,
> everything seems to work better. At least, the first problem goes away
> entirely, and I haven't yet been able to reproduce the second problem.
>
> With a local auto.master and no network, autofs starts up OK but
> automount -m shows no data at all for the maps. This also surprises me
> because I figured they'd be cached. As soon as the network returns the
> maps appear.
>
> Is this the normal behavior? Am I expecting sssd to cache things it
> isn't supposed to be caching?
>
> - J<
> _______________________________________________
> sssd-users mailing list
> sssd-users(a)lists.fedorahosted.org
>
https://lists.fedorahosted.org/admin/lists/sssd-users@lists.fedorahosted.org