Bug 1010700

Summary: autofs fails to start
Product: [openSUSE] openSUSE Distribution Reporter: malcolm moore <st-malcolm.moore>
Component: NetworkAssignee: Samuel Cabrero <scabrero>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P2 - High CC: ckowalczyk, dakechi, emiura, hguo, hvdheuvel, jeffm, maint-coord, meissner, mmartins, samba-maintainers, scabrero, varkoly
Version: Leap 42.3   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: System froze
Supportconfig - 2018-12-21 - autofs

Description malcolm moore 2016-11-17 11:56:19 UTC
openSUSE 42.2 seems to have acquired the bug that causes autofs not to start
when it gets it's maps from LDAP 


( see :-

https://bugs.launchpad.net/ubuntu/+source/autofs/+bug/1566508

https://bugzilla.redhat.com/show_bug.cgi?id=1189767

)

If authentication and automounts are configured to use a LDAP server, users cannot log in as they don't have home directories as autofs has failed 

journalctl shows ' setautomntent: lookup(sss): setautomntent: No such file or directory'

Manually restarting autofs  after boot works ( but is impractical )
Adding ExecStartPre=/bin/sleep 10 to the sssd.service also seems to work

M
Comment 1 malcolm moore 2016-11-24 08:13:40 UTC
This morning couldn't log in, so the sleep 10 bit works 90% of the time. I guess that under different network loads the race condition still exists.

M
Comment 2 malcolm moore 2016-11-24 13:53:58 UTC
I discovered that my sssd.service had been overwritten by an update so my comment from this morning maybe bogus
Comment 4 malcolm moore 2017-06-28 11:23:16 UTC
This is still in 42.3 beta ( 0283 )
Comment 6 Howard Guo 2018-01-15 09:01:54 UTC
SSSD on SLES 15 is already at 1.16.

I'll pick up the commit as a maintenance update for sp2.
Comment 8 Tomáš Chvátal 2018-04-17 13:51:27 UTC
This is automated batch bugzilla cleanup.

The openSUSE 42.2 changed to end-of-life (EOL [1]) status. As such
it is no longer maintained, which means that it will not receive any
further security or bug fix updates.
As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
openSUSE, or you can still observe it under openSUSE Leap 15.0, please
feel free to reopen this bug against that version (see the "Version"
component in the bug fields), or alternatively open
a new ticket.

Thank you for reporting this bug and we are sorry it could not be fixed
during the lifetime of the release.

[1] https://en.opensuse.org/Lifetime
Comment 9 Ednilson Miura 2018-05-08 18:00:50 UTC
Testing this bug as update S:M:6481:162437, I was able to replicate behaviour on SLES12SP3.
However, after update, the machine got stuck somewhere and does not complete boot process anymore.

After some debugging, the problem is caused by sss entry on /etc/nssswitch.conf
automount: sss (or any combination, like "files sss")

Removing the offending "sss" string allow the system to boot normally.

This problem does not occours before the update, altough it could be just masked by the fact that autofs fails without the patch (original bug).

Since I wasn't able to extract a meaningful from the system, any directions on this mater is welcome.
Comment 10 Ednilson Miura 2018-05-08 18:01:21 UTC
Created attachment 769452 [details]
System froze
Comment 11 Diego Vinicius Akechi 2018-05-09 16:19:30 UTC
Reopening, as the problem is still present on 42.3
Comment 12 Peter Varkoly 2018-05-10 07:23:23 UTC
*** Bug 1091533 has been marked as a duplicate of this bug. ***
Comment 34 Marcelo Martins 2018-12-22 00:09:21 UTC
Testing with S:M:6481:180375 on SLES 12 SP3, I verified that error still showing:

"setautomntent: lookup(sss): setautomntent: No such file or directory"

After boot machine, verifing status to autofs:

s12sp3-lvm:~ # rcautofs status
* autofs.service - Automounts filesystems on demand
   Loaded: loaded (/usr/lib/systemd/system/autofs.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2018-12-21 14:11:52 -02; 7h ago
     Docs: man:automount(8)
           man:autofs(5)
  Process: 1405 ExecStart=/usr/sbin/automount $AUTOFS_OPTIONS -p /var/run/automount.pid (code=exited, status=0/SUCCESS)
 Main PID: 1414 (automount)
    Tasks: 3 (limit: 512)
   CGroup: /system.slice/autofs.service
           `-1414 /usr/sbin/automount -p /var/run/automount.pid

Dec 21 14:11:52 s12sp3-lvm systemd[1]: Starting Automounts filesystems on demand...
Dec 21 14:11:52 s12sp3-lvm automount[1414]: setautomntent: lookup(sss): setautomntent: No such file or directory
Dec 21 14:11:52 s12sp3-lvm systemd[1]: Started Automounts filesystems on demand.

 
s12sp3-lvm:~ # rpm -qa sssd
sssd-1.13.4-34.21.2.x86_64

If need more details, please let me know.
Comment 35 Marcelo Martins 2018-12-22 00:12:46 UTC
Created attachment 793294 [details]
Supportconfig - 2018-12-21 - autofs
Comment 36 Samuel Cabrero 2018-12-24 16:52:58 UTC
(In reply to Marcelo Martins from comment #34)
> Testing with S:M:6481:180375 on SLES 12 SP3, I verified that error still
> showing:
> 
> "setautomntent: lookup(sss): setautomntent: No such file or directory"
> 

Hi Marcelo,

I think you need to configure autofs in sssd.conf:
1. Add autofs to "services" under [sssd]
2. Add a [autofs] section
3. Configure autofs_provider and ldap_autofs_* settings under [domain/...]

It is working for me, however after having a look again I backported another pair of related patches (Race condition on boot between SSSD and Autofs, https://pagure.io/SSSD/sssd/issue/3080). The patch 0007-AUTOFS-Fix-offline-resolution-of-autofs-maps.patch allows to serve the autofs entries from the sssd cache when it is offline, the new patches fix the race condition on boot.

New MR https://build.suse.de/request/show/180697
Comment 37 Swamp Workflow Management 2019-01-11 20:09:12 UTC
SUSE-SU-2019:0081-1: An update that solves one vulnerability and has 6 fixes is now available.

Category: security (moderate)
Bug References: 1010700,1072728,1080156,1087320,1098377,1101877,1110299
CVE References: CVE-2018-10852
Sources used:
SUSE OpenStack Cloud 7 (src):    sssd-1.13.4-34.23.1
SUSE Linux Enterprise Software Development Kit 12-SP3 (src):    sssd-1.13.4-34.23.1
SUSE Linux Enterprise Server for SAP 12-SP2 (src):    sssd-1.13.4-34.23.1
SUSE Linux Enterprise Server 12-SP3 (src):    sssd-1.13.4-34.23.1
SUSE Linux Enterprise Server 12-SP2-LTSS (src):    sssd-1.13.4-34.23.1
SUSE Linux Enterprise Desktop 12-SP3 (src):    sssd-1.13.4-34.23.1
SUSE Enterprise Storage 4 (src):    sssd-1.13.4-34.23.1
Comment 38 Swamp Workflow Management 2019-01-13 23:08:55 UTC
openSUSE-SU-2019:0051-1: An update that solves one vulnerability and has 6 fixes is now available.

Category: security (moderate)
Bug References: 1010700,1072728,1080156,1087320,1098377,1101877,1110299
CVE References: CVE-2018-10852
Sources used:
openSUSE Leap 42.3 (src):    sssd-1.13.4-12.1
Comment 39 Samuel Cabrero 2019-01-14 07:30:36 UTC
Released.