ndctl, monitor: use type=simple instead of type=forking
PATCH 1/1 ndctl, monitor: use type=simple instead of type=forking
There is no need to use Type=forking for 'ndctl monitor', Type=simple is sufficient.
When we use Type=forking and try to run ndctl monitor on a machine without pmem we even get the following error in the journal:
Jan 07 13:34:54 bragi systemd[1]: Starting Ndctl Monitor Daemon... Jan 07 13:34:54 bragi ndctl[13776]: custom logging function 0x55ea57d60250 registered Jan 07 13:34:54 bragi systemd[1]: Started Ndctl Monitor Daemon. Jan 07 13:34:54 bragi ndctl[13777]: ndctl monitor daemon started Jan 07 13:34:54 bragi kill[13778]: kill: cannot find process "" Jan 07 13:34:54 bragi systemd[1]: ndctl-monitor.service: Control process exited, code=exited status=1 Jan 07 13:34:54 bragi systemd[1]: ndctl-monitor.service: Unit entered failed state. Jan 07 13:34:54 bragi systemd[1]: ndctl-monitor.service: Failed with result 'exit-code'.
This is because the daemon exits and systemd is not able to determine $MAINPID anymore.
--- ndctl/ndctl-monitor.service | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
ndctl/ndctl-monitor.service +2 -3
@@ -2,9 +2,8 @@ Description=Ndctl Monitor Daemon [Service] -Type=forking -ExecStart=/usr/bin/ndctl monitor --daemon -ExecStop=/bin/kill ${MAINPID} +Type=simple +ExecStart=/usr/bin/ndctl monitor [Install] WantedBy=multi-user.target
Signature · 6 lines
2.16.4 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 16 lines · Johannes Thumshirn
There is no need to use Type=forking for 'ndctl monitor', Type=simple is sufficient.
When we use Type=forking and try to run ndctl monitor on a machine without pmem we even get the following error in the journal:
Jan 07 13:34:54 bragi systemd[1]: Starting Ndctl Monitor Daemon... Jan 07 13:34:54 bragi ndctl[13776]: custom logging function 0x55ea57d60250 registered Jan 07 13:34:54 bragi systemd[1]: Started Ndctl Monitor Daemon. Jan 07 13:34:54 bragi ndctl[13777]: ndctl monitor daemon started Jan 07 13:34:54 bragi kill[13778]: kill: cannot find process "" Jan 07 13:34:54 bragi systemd[1]: ndctl-monitor.service: Control process exited, code=exited status=1 Jan 07 13:34:54 bragi systemd[1]: ndctl-monitor.service: Unit entered failed state. Jan 07 13:34:54 bragi systemd[1]: ndctl-monitor.service: Failed with result 'exit-code'.
Quoted 4 lines
This is because the daemon exits and systemd is not able to determine $MAINPID anymore.
Signed-off-by Johannes Thumshirn <[email protected]>
Looks good to me.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 15 lines · Johannes Thumshirn
There is no need to use Type=forking for 'ndctl monitor', Type=simple is sufficient.
When we use Type=forking and try to run ndctl monitor on a machine without pmem we even get the following error in the journal:
Jan 07 13:34:54 bragi systemd[1]: Starting Ndctl Monitor Daemon... Jan 07 13:34:54 bragi ndctl[13776]: custom logging function 0x55ea57d60250 registered Jan 07 13:34:54 bragi systemd[1]: Started Ndctl Monitor Daemon. Jan 07 13:34:54 bragi ndctl[13777]: ndctl monitor daemon started Jan 07 13:34:54 bragi kill[13778]: kill: cannot find process "" Jan 07 13:34:54 bragi systemd[1]: ndctl-monitor.service: Control process exited, code=exited status=1 Jan 07 13:34:54 bragi systemd[1]: ndctl-monitor.service: Unit entered failed state. Jan 07 13:34:54 bragi systemd[1]: ndctl-monitor.service: Failed with result 'exit-code'.
Quoted 7 lines
This is because the daemon exits and systemd is not able to determine $MAINPID anymore.
Signed-off-by Johannes Thumshirn <[email protected]>--- ndctl/ndctl-monitor.service | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Thanks, applied.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm