Re: [systemd-devel] Still confused with socket activation

2021-02-06 Thread Andrei Borzenkov
04.02.2021 17:53, Simon McVittie пишет: > On Thu, 04 Feb 2021 at 13:07:33 +0100, Reindl Harald wrote: >> "Requires=a.service" combined with "Before=a.service" is contradictory - >> don't you get that? > > It means what it says: whenever my service is enabled, a.service must > also be enabled, but

Re: [systemd-devel] Still confused with socket activation

2021-02-05 Thread Benjamin Berg
On Thu, 2021-02-04 at 22:16 +0300, Andrei Borzenkov wrote: > 03.02.2021 22:25, Benjamin Berg пишет: > > Requires= actually has the difference that the unit must become > > part of > > the transaction (if it is not active already). So you get a hard > > failure and appropriate logging if the unit

Re: [systemd-devel] Still confused with socket activation

2021-02-04 Thread Andrei Borzenkov
03.02.2021 22:25, Benjamin Berg пишет: > On Wed, 2021-02-03 at 20:47 +0300, Andrei Borzenkov wrote: >> 03.02.2021 00:25, Benjamin Berg пишет: >>> On Tue, 2021-02-02 at 22:50 +0300, Andrei Borzenkov wrote: 02.02.2021 17:59, Lennart Poettering пишет: > > Note that Requires= in almost

Re: [systemd-devel] Still confused with socket activation

2021-02-04 Thread Simon McVittie
On Thu, 04 Feb 2021 at 13:07:33 +0100, Reindl Harald wrote: > "Requires=a.service" combined with "Before=a.service" is contradictory - > don't you get that? It means what it says: whenever my service is enabled, a.service must also be enabled, but my service has to start first (and stop last).

Re: [systemd-devel] Still confused with socket activation

2021-02-04 Thread Benjamin Berg
On Thu, 2021-02-04 at 13:07 +0100, Reindl Harald wrote: > Am 04.02.21 um 12:46 schrieb Benjamin Berg: > > On Wed, 2021-02-03 at 16:43 +0100, Reindl Harald wrote: > > > seriously - explain what you expect to happen in case of > > > > > > Requires=a.service > > > Before=a.service > > > > > >

Re: [systemd-devel] Still confused with socket activation

2021-02-04 Thread Reindl Harald
Am 04.02.21 um 12:46 schrieb Benjamin Berg: On Wed, 2021-02-03 at 16:43 +0100, Reindl Harald wrote: seriously - explain what you expect to happen in case of Requires=a.service Before=a.service except some warning that it's nonsense So, one way I used it is as ExecStartPost= equivalent

Re: [systemd-devel] Still confused with socket activation

2021-02-04 Thread Benjamin Berg
On Wed, 2021-02-03 at 16:43 +0100, Reindl Harald wrote: > seriously - explain what you expect to happen in case of > > Requires=a.service > Before=a.service > > except some warning that it's nonsense So, one way I used it is as ExecStartPost= equivalent for a .target unit. i.e. pull in a

Re: [systemd-devel] Still confused with socket activation

2021-02-03 Thread Benjamin Berg
On Wed, 2021-02-03 at 20:47 +0300, Andrei Borzenkov wrote: > 03.02.2021 00:25, Benjamin Berg пишет: > > On Tue, 2021-02-02 at 22:50 +0300, Andrei Borzenkov wrote: > > > 02.02.2021 17:59, Lennart Poettering пишет: > > > > > > > > Note that Requires= in almost all cases should be combined with > >

Re: [systemd-devel] Still confused with socket activation

2021-02-03 Thread Andrei Borzenkov
03.02.2021 21:13, Andrei Borzenkov пишет: > 02.02.2021 12:43, Ulrich Windl пишет: >> Hi! >> >> Having: >> --- >> # /usr/lib/systemd/system/virtlockd.service >> [Unit] >> Description=Virtual machine lock manager >> Requires=virtlockd.socket >> Requires=virtlockd-admin.socket > > That's always

Re: [systemd-devel] Still confused with socket activation

2021-02-03 Thread Andrei Borzenkov
02.02.2021 12:43, Ulrich Windl пишет: > Hi! > > Having: > --- > # /usr/lib/systemd/system/virtlockd.service > [Unit] > Description=Virtual machine lock manager > Requires=virtlockd.socket > Requires=virtlockd-admin.socket That's always wrong with After for the same units unless you can prove

Re: [systemd-devel] Still confused with socket activation

2021-02-03 Thread Andrei Borzenkov
03.02.2021 00:25, Benjamin Berg пишет: > On Tue, 2021-02-02 at 22:50 +0300, Andrei Borzenkov wrote: >> 02.02.2021 17:59, Lennart Poettering пишет: >>> >>> Note that Requires= in almost all cases should be combined with an >>> order dep of After= onto the same unit. >> >> Years ago I asked for

Re: [systemd-devel] Still confused with socket activation

2021-02-03 Thread Reindl Harald
Am 03.02.21 um 10:43 schrieb Benjamin Berg: On Wed, 2021-02-03 at 08:00 +0100, Reindl Harald wrote: Am 02.02.21 um 22:25 schrieb Benjamin Berg: On Tue, 2021-02-02 at 22:50 +0300, Andrei Borzenkov wrote: 02.02.2021 17:59, Lennart Poettering пишет: Note that Requires= in almost all cases

Re: [systemd-devel] Still confused with socket activation

2021-02-03 Thread Benjamin Berg
On Wed, 2021-02-03 at 08:00 +0100, Reindl Harald wrote: > > > Am 02.02.21 um 22:25 schrieb Benjamin Berg: > > On Tue, 2021-02-02 at 22:50 +0300, Andrei Borzenkov wrote: > > > 02.02.2021 17:59, Lennart Poettering пишет: > > > > > > > > Note that Requires= in almost all cases should be combined

Re: [systemd-devel] Still confused with socket activation

2021-02-02 Thread Reindl Harald
Am 02.02.21 um 22:25 schrieb Benjamin Berg: On Tue, 2021-02-02 at 22:50 +0300, Andrei Borzenkov wrote: 02.02.2021 17:59, Lennart Poettering пишет: Note that Requires= in almost all cases should be combined with an order dep of After= onto the same unit. Years ago I asked for example when

Re: [systemd-devel] Still confused with socket activation

2021-02-02 Thread Benjamin Berg
On Tue, 2021-02-02 at 22:50 +0300, Andrei Borzenkov wrote: > 02.02.2021 17:59, Lennart Poettering пишет: > > > > Note that Requires= in almost all cases should be combined with an > > order dep of After= onto the same unit. > > Years ago I asked for example when Requires makes sense without >

Re: [systemd-devel] Still confused with socket activation

2021-02-02 Thread Lennart Poettering
On Di, 02.02.21 22:50, Andrei Borzenkov (arvidj...@gmail.com) wrote: > 02.02.2021 17:59, Lennart Poettering пишет: > > > > Note that Requires= in almost all cases should be combined with an > > order dep of After= onto the same unit. > > Years ago I asked for example when Requires makes sense

Re: [systemd-devel] Still confused with socket activation

2021-02-02 Thread Andrei Borzenkov
02.02.2021 17:59, Lennart Poettering пишет: > > Note that Requires= in almost all cases should be combined with an > order dep of After= onto the same unit. Years ago I asked for example when Requires makes sense without After. Care to show it? I assume you must have use case if you say "in

Re: [systemd-devel] Still confused with socket activation

2021-02-02 Thread Lennart Poettering
On Di, 02.02.21 10:43, Ulrich Windl (ulrich.wi...@rz.uni-regensburg.de) wrote: > Hi! > > Having: > --- > # /usr/lib/systemd/system/virtlockd.service > [Unit] > Description=Virtual machine lock manager > Requires=virtlockd.socket > Requires=virtlockd-admin.socket > Before=libvirtd.service > ... >

[systemd-devel] Still confused with socket activation

2021-02-02 Thread Ulrich Windl
Hi! Having: --- # /usr/lib/systemd/system/virtlockd.service [Unit] Description=Virtual machine lock manager Requires=virtlockd.socket Requires=virtlockd-admin.socket Before=libvirtd.service ... --- How would I start both sockets successfully unter program control? If I start one socket, I cannot