Re: [systemd-devel] socket / service dependency

2017-03-30 Thread Lennart Poettering
On Mon, 20.03.17 12:38, Ken Bass (kb...@kenbass.com) wrote:

> I thought I followed the instructions (using Centos 7 - I believe
> systemd219) ... I am running a local news server (innd.service).
> 
> I needed to add an additional inetd style daemon for nnrpd to support SSL.
> See files below. Using the BindTo and After seems proper since I never want
> nnrpd running unless innd is already started/running. If innd is stopped, i
> want to be sure nnrpd is stopped. Initially this worked fine. But if I stop
> the innd service, and then start it again, the nnrpd.socket is not started.
> How do I handle this?
> 
> I created a drop in file for innd with a Before/Wants of nnrpd. This
> sometimes works, but normally I get 'Job innd.service/start deleted to break
> ordering cycle starting with nnrpd.socket/start'. What is the proper way to
> do this.

Please provide the full log excerpt around this message, it shows you
exactly what the ordering dep cycle is.

> /etc/systemd/system/innd.d/innd.conf

This path doesn't look right?

> /etc/systemd/system/nnrpd@service

Neither does this one.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] socket / service dependency

2017-03-20 Thread Ken Bass
I thought I followed the instructions (using Centos 7 - I believe 
systemd219) ... I am running a local news server (innd.service).


I needed to add an additional inetd style daemon for nnrpd to support 
SSL. See files below. Using the BindTo and After seems proper since I 
never want nnrpd running unless innd is already started/running. If innd 
is stopped, i want to be sure nnrpd is stopped. Initially this worked 
fine. But if I stop the innd service, and then start it again, the 
nnrpd.socket is not started. How do I handle this?


I created a drop in file for innd with a Before/Wants of nnrpd. This 
sometimes works, but normally I get 'Job innd.service/start deleted to 
break ordering cycle starting with nnrpd.socket/start'. What is the 
proper way to do this.


/etc/systemd/system/innd.d/innd.conf

[Unit]
Before=nnrpd.socket
Wants=nnrpd.socket

Files below:

/etc/systemd/system/nnrpd.socket

[Unit]
Description=nnrpd SSL socket listeners
After=syslog.target network.target
ConditionPathExists=/etc/news/inn.conf
BindsTo=innd.service
After=innd.service

[Socket]
ListenStream=563
Accept=yes

[Install]
WantedBy=multi-user.target

and

/etc/systemd/system/nnrpd@service

[Unit]
Description=nnrpd SSL server

[Service]
User=news
PermissionsStartOnly=true
ExecStart=/usr/libexec/news/nnrpd -p 563 -S
StandardInput=socket
SuccessExitStatus=1

Existing innd.service, as installed from EPEL repo,

[Unit]
Description=InterNet News Daemon
After=syslog.target network.target
ConditionPathExists=/etc/news/inn.conf

[Service]
User=news
PermissionsStartOnly=true
PIDFile=/run/news/innd.pid
Type=forking
ExecStart=/usr/libexec/news/rc.news
ExecStop=/bin/su -m  news -c '/usr/libexec/news/rc.news stop'
KillMode=control-group

[Install]


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel