Systemd on vivid beta
Colin Law
clanlaw at gmail.com
Thu Mar 12 11:51:32 UTC 2015
On 9 March 2015 at 20:36, Colin Law <clanlaw at gmail.com> wrote:
> On 9 March 2015 at 13:34, Colin Law <clanlaw at gmail.com> wrote:
>> ...
>> That is what I hoped. The problem is with shutdown, but only on power
>> down. I can run
>> systemctl stop myservice.service
>> and it functions correctly, and I can start it again. But if I
>> shutdown it does not seem to be getting the timing right. My init.d
>> script starts
>
> More info, I booted with systemd.log_level=debug. The startup
> sequence for my script is there in gory detail (and is successful) but
> there is absolutely no mention of stopping my script at all before
> rsyslogd is terminated (signal 15), though on other occasions it has
> logged at least the start of my script.
>
> The last few lines of the log are
> Mar 9 13:45:29 tigger systemd[1]: About to execute: /etc/init.d/mysql stop
> Mar 9 13:45:29 tigger systemd[2875]: Executing: /etc/init.d/mysql stop
> Mar 9 13:45:29 tigger rsyslogd: [origin software="rsyslogd"
> swVersion="7.4.4" x-pid="696" x-info="http://www.rsyslog.com"] exiting
> on signal 15.
>
> Looking at init.d/mysql I see that it also has
> # Required-Stop: $remote_fs $syslog
> and also that the first executable line inside the stop section is
> log_daemon_msg "Stopping MySQL database server" "mysqld"
> and that message does not appear, neither do any other messages from
> there or the Stopped message that I would expect to see when it
> finishes. So perhaps there is (at least on my system) a basic problem
> with the timing of the killing of rsyslogd.
The plot thickens!
Having worked around the fact that syslog closes down too soon by
adding diy logging to a file from the script I find that the culprit
is a line of the form
umount -l /path/to/mountpoint
where this was orginally mounted using something like
mount -t cifs -o credentials=***,user,rw,uid=1000 //192.168.1.nnn/path
/path/to/mountpoint
The umount command takes anything up to 2 minutes to complete.
If I use systemctl stop to stop the service it runs straight through
without delay. I wonder whether some networking service has also been
stopped too soon and umount is timing out waiting for a response.
Colin
More information about the ubuntu-users
mailing list