[Ocfs2-tools-devel] [PATCH 05/14] ocfs2-tools: add systemd support

Junxiao Bi junxiao.bi at oracle.com
Sun Apr 17 19:48:20 PDT 2016


Hi Eric,

On 04/02/2016 10:34 AM, Eric Ren wrote:
>> diff --git a/vendor/common/o2cb.service b/vendor/common/o2cb.service
>> new file mode 100644
>> index 000000000000..94e2b1a29993
>> --- /dev/null
>> +++ b/vendor/common/o2cb.service
>> @@ -0,0 +1,14 @@
>> +[Unit]
>> +Description=Load o2cb Modules
>> +Requires=network.service
>> +After=network.service
>> +
>> +[Service]
>> +Type=oneshot
>> +RemainAfterExit=yes
>> +ExecStart=/sbin/o2cb.init enable
>> +ExecStop=/sbin/o2cb.init disable
>> +ExecRestart=/sbin/o2cb.init restart
> 
> Lately, we got this issue:
> ~~~
> o2cb.service failes to start on boot:
> ilias4:~ # journalctl -u o2cb
> -- Logs begin at Do 2016-01-28 11:09:11 CET, end at Do 2016-01-28
> 11:56:40 CET. --
> Jan 28 11:09:28 ilias4 systemd[1]:
> [/usr/lib/systemd/system/o2cb.service:11] Unknown lvalue 'ExecRestart'
> in section 'Service'
> Jan 28 11:09:33 ilias4 o2cb.init[1418]: Writing O2CB configuration: OK
> Jan 28 11:09:33 ilias4 o2cb.init[1418]: checking debugfs...
> Jan 28 11:09:33 ilias4 o2cb.init[1418]: Loading filesystem "configfs": OK
> Jan 28 11:09:33 ilias4 o2cb.init[1418]: Mounting configfs filesystem at
> /sys/kernel/config: mount: configfs is already mounted or
> /sys/kernel/config busy
> Jan 28 11:09:33 ilias4 o2cb.init[1418]: configfs is already mounted on
> /sys/kernel/config
> Jan 28 11:09:33 ilias4 o2cb.init[1418]: Unable to mount configfs filesystem
> Jan 28 11:09:33 ilias4 o2cb.init[1418]: Failed
This failure could be fixed by  [PATCH 12/14] o2cb: fix systemd
o2cb.service failure ?

> ~~~
> 
> 1. Systemd may hasn't "ExecRestart" anymore, for reference:
> [1] https://techdetails.agwego.com/2013/06/07/227/
> 
> 2. Maybe, we should adjust /sbin/o2cb.init for systemd than just a move,
> because SysV init scripts need handling dependency like configfs on
> itself. But systemd just requires adding "After
> sys-kernel-config.mount", for reference:
> [2]
> https://github.com/systemd/systemd/blob/master/units/sys-kernel-config.mount
> 
> [3] http://0pointer.de/blog/projects/systemd-for-admins-3.html
Yes, I agree, we can improve the service to make it more systemd liked
in future, but should also keep it compatible with old non-systemd system.

Thanks,
Junxiao.
> 
> Eric




More information about the Ocfs2-tools-devel mailing list