[systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3
Rainer Krienke
krienke at uni-koblenz.de
Wed May 15 05:54:07 PDT 2013
Am 14.05.2013 14:21, schrieb Rainer Krienke:
> The reason that autofs failed was not that it had problems mounting or
> umounting but was rooted in /etc/nsswitch.conf, where long before
> systemd was present in openSuSE I had entered ldap as an additional
> source of maps and those old "sysv init" days this caused no problems
> (eg in openSuSE 12.1 using still sysv init):
>
> automount: files nis ldap
>
> Actually autmount gets its maps from NIS and our LDAP server is not yet
> providing automounter maps and the ldap client isn't configured either
> for this. For this reason automount reports an error since it cannot get
> maps from ldap:
>
> May 14 13:44:54 rzinstal3 automount[3496]: get_query_dn: lookup(ldap):
> query failed for (&(objectclass=nisMap)(nisMapName=auto.direct)):
> Invalid DN syntax
>
> So I simply removed the ldap entry from nsswitch.conf because its
> actually not needed at the moment. After this things now work and my
> system reboots.
>
I have to add one point to the fix I found for my autofs in combination
with systemd. My solution from above was not complete as hangs in
shutdown still occured.
After all I found out that when I choose to reboot from within a KDE
session managed by kdm, it happenes that at the time systemd terminates
automount, not all of my (kde session) processes have exited. The
result is that automount cannot umount my NFS home directory and this
leads to a stall in the shutdown process.
My solution was quite simple. I had to change the default autofs.service
file that does not contain a special ExecStop entry, to wait a second
before automount is killed. I did this by adding a ExecStop like this:
ExecStop=/usr/bin/sleep 1 ; /sbin/killproc -p $PIDFILE -t 45
/usr/sbin/automount
It proofed that the sleep is essential, without it, shutdown again
hangs. The sleep seems to wait long enough until all my processes from
my KDE session have died and thus automount can really umount my NFS
home directory.
My wish to systemd would be to offer much more detailed and easy
debugging. I think it would be great to be able to see all stop-actions
systemd performs on a virtual terminal. My problem was that my system
did not shutdown, debug shell did not work and so I was unable to get a
journal by using the trick documented using a
systemd/system-shutdown/debug.sh script. If I could have seen what
happens during shutdown it would have saved me a day of searching.
Thanks
Rainer
--
Rainer Krienke, Uni Koblenz, Rechenzentrum, A22, Universitaetsstrasse 1
56070 Koblenz, http://userpages.uni-koblenz.de/~krienke, Tel: +49261287 1312
PGP: http://userpages.uni-koblenz.de/~krienke/mypgp.html,Fax: +49261287
1001312
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4697 bytes
Desc: S/MIME Kryptografische Unterschrift
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130515/8345ea5b/attachment.bin>
More information about the systemd-devel
mailing list