Re: [systemd-devel] help with systemd socket file for programs in the quagga suite
On Sat, 13.09.14 23:04, Andrei Borzenkov (arvidj...@gmail.com) wrote: > В Fri, 12 Sep 2014 19:10:01 +0100 > "lux-integ" пишет: > > > On Friday 12 September 2014 18:28:30 Dave Reisner wrote: > > > I'll stop you here. You can't simply "synthesize" a socket unit for any > > > arbitrary program that uses a socket (regardless of the address family). > > > Socket units are specific to socket-activated services (which requires > > > code changes in the daemon itself) and per-connection spawning. > > > > > > Based on a perusal of the manpage and source, Zebra appears to be > > > neither of these > > > > > > thanks a lot > > > > I too checked the man page I found on the internet and found them to be > > different to doing > > /usr/sbin/zebra --help > > > > I tend to err on the side of trusting the installed more and so > > why does this line :- > > ( -z, --socket Set path of zebra socket ) > > results from > > /usr/sbin/zebra --help > > ( and indeed all the programs in the quagga suite ? ) > > > > Is it in error ? > > > > May be not, but socket activated services in systemd receive socket on > stdin/stdout, not as argument. That's not entirely true. In inetd-style activation the sockets are passed as stdin/stdout. On systemd-style activation they are passed as sockets 3,4,5,..., i.e. the ones immediately following stdin/stderr/stdout. But anyway, the gist of it is true: socket activation requires proper support for it in the daemons. And just being able to set the socket path is not enough. Without patching zebra to support proper systemd-style socket activation (or even inetd-style as we support either) this is not available. Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] help with systemd socket file for programs in the quagga suite
В Fri, 12 Sep 2014 19:10:01 +0100 "lux-integ" пишет: > On Friday 12 September 2014 18:28:30 Dave Reisner wrote: > > I'll stop you here. You can't simply "synthesize" a socket unit for any > > arbitrary program that uses a socket (regardless of the address family). > > Socket units are specific to socket-activated services (which requires > > code changes in the daemon itself) and per-connection spawning. > > > > Based on a perusal of the manpage and source, Zebra appears to be > > neither of these > > > thanks a lot > > I too checked the man page I found on the internet and found them to be > different to doing > /usr/sbin/zebra --help > > I tend to err on the side of trusting the installed more and so > why does this line :- > ( -z, --socket Set path of zebra socket ) > results from > /usr/sbin/zebra --help > ( and indeed all the programs in the quagga suite ? ) > > Is it in error ? > May be not, but socket activated services in systemd receive socket on stdin/stdout, not as argument. > thanks in advance > ___ > systemd-devel mailing list > systemd-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/systemd-devel ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] help with systemd socket file for programs in the quagga suite
On Friday 12 September 2014 18:28:30 Dave Reisner wrote: > I'll stop you here. You can't simply "synthesize" a socket unit for any > arbitrary program that uses a socket (regardless of the address family). > Socket units are specific to socket-activated services (which requires > code changes in the daemon itself) and per-connection spawning. > > Based on a perusal of the manpage and source, Zebra appears to be > neither of these thanks a lot I too checked the man page I found on the internet and found them to be different to doing /usr/sbin/zebra --help I tend to err on the side of trusting the installed more and so why does this line :- ( -z, --socket Set path of zebra socket ) results from /usr/sbin/zebra --help ( and indeed all the programs in the quagga suite ? ) Is it in error ? thanks in advance ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] help with systemd socket file for programs in the quagga suite
On Fri, Sep 12, 2014 at 06:15:32PM +0100, lux-integ wrote: > Greetings, > > I am attempting to learn how to use systemd. I decided to try synthesising a > 'socket file' I'll stop you here. You can't simply "synthesize" a socket unit for any arbitrary program that uses a socket (regardless of the address family). Socket units are specific to socket-activated services (which requires code changes in the daemon itself) and per-connection spawning. Based on a perusal of the manpage and source, Zebra appears to be neither of these. So, you shouldn't be writing a socket unit for this service. Cheers, d ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] help with systemd socket file for programs in the quagga suite
Greetings, I am attempting to learn how to use systemd. I decided to try synthesising a 'socket file' I have programs in the quagga suite installed in /usr and doing /usr/sbin/program --help has this line -z, --socket Set path of zebra socket I read the manpage on systemd sockets ( http://www.freedesktop.org/software/systemd/man/systemd.socket.html ) and tentatively arrived at the following:- # [Socket] ListenStream=PortNumberUsedByZebra BindIPv6Only=both BindToDevice=eth0 SocketUser=quagga SocketGroup=quagga Accept=no MaxConnections=6 KeepAlive=1 Service=/etc/systemd/system/zebra.service ## --firstly: I would like to know from the systemd experts on list whether I amd folllowing the right approach --secondly I would like to know if I can set /path/to/socket for the propgrams in the quagga suite AND the use of the lines ListenStream=PortNumberUsedByZebra BindToDevice=eth0 as /path/to/socket=/proc/sys/net/ipv6/conf/eth0 thanks in advance sincerely lux-integ ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel