Bug#790448: [systemd] Regression from 215-18: Shutdown delayed for minutes waiting for automounted CIFS
Gavrilov Aleksey
gavrilov at info74.ru
Fri Mar 25 05:07:05 GMT 2016
Package: systemd
Version: 215-17+deb8u3
Hi
An error occurs when the system boots.
Conditions for the appearance.
The main network interface is adapted to receive via DHCP using systemd.
cat /etc/systemd/network/00_eth0.network
/[Match] Name=eth0 [Network] DHCP=yes # <-----/
cat /etc/systemd/network/10_interface_mesh0_ipv4.network
/# Ansible managed: modified on 2016-01-29 17:12:05 /
/[Match] Name=mesh0 [Network] Address=172.16.35.5/24/ cat
/etc/network/interfaces /# The loopback network interface auto lo iface
lo inet loopback/
root at itregion-gavrilov:/tmp# systemctl status media-dst.mount
● media-dst.mount - /media/dst
Loaded: loaded (/etc/fstab)
Active: failed (Result: exit-code) since Чт 2016-03-24 15:41:56
YEKT; 1h 21min ago
Where: /media/dst
What: //192.168.0.37/dst
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
Process: 701 ExecMount=/bin/mount -n //192.168.0.37/dst /media/dst -t
cifs -o
rw,credentials=/root/.smb,iocharset=utf8,_netdev,uid=1000,gid=1000
(code=exited, status=32)
мар 24 15:41:56 itregion-gavrilov systemd[1]: media-dst.mount mount
process exited, code=exited status=32
мар 24 15:41:56 itregion-gavrilov systemd[1]: Failed to mount /media/dst.
мар 24 15:41:56 itregion-gavrilov systemd[1]: Unit media-dst.mount
entered failed state.
мар 24 15:41:56 itregion-gavrilov mount[701]: mount error(101): Network
is unreachable
мар 24 15:41:56 itregion-gavrilov mount[701]: Refer to the mount.cifs(8)
manual page (e.g. man mount.cifs)
I also read this thread here (
https://lists.debian.org/debian-user/2015/06/msg01545.html )
I found that the error only occurs if the configured network interface
systemd dhcp.
Adding a script solves the problem, but it's clumsy solution.
[Unit]
Description=Waiting for CIFS server
DefaultDependencies=no
Conflicts=shutdown.target
Wants=network-online.target
Before=network-online.target shutdown.target
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sh -c "while ! ping -c 1 gw_ip >/dev/null; do sleep 1; done"
# Modify this timeout to your heart's content.
TimeoutStartSec=10
[Install]
WantedBy=network.target
I formed the opinion that Systemd not wait Dhcp-client when the network
interfaces are configured through it.
--
Sincerely, Gavrilov Aleksey
System Administrator
Ltd. "Hearst Shkulev Digital Rugion"
tel .: 8 (351) 729-94-90, ext. 345
mob. +7 999 581 7934
gavrilov at info74.ru
Chelyabinsk, st. Melkombinat February 1st Precinct, 18, office 208
for TRC `Rodnik`
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20160325/675d9d37/attachment.html>
More information about the Pkg-systemd-maintainers
mailing list