[systemd-devel] Hand when using systemctl in unit files
Lennart Poettering
lennart at poettering.net
Mon Aug 1 15:44:03 PDT 2011
On Wed, 27.07.11 22:05, Warpme (warpme at o2.pl) wrote:
> Hi,
> I really like systemd concept.
> I want to use systemctl to control other unit from given unit.
> I'm on systemd-29
>
> Example:
>
> unit1:
> ExecStartPre=systemctl restart service2.service
This won't work since we only allow absolute file names in ExecXXX=
lines.
Note that this will necessarily deadlock if service2.service is ordered
after unit1, since you synchronously wait for service2 to restart, which
however cannot be started as long as unit1 isn't fully up, which however
won't be up until service2 is finished restarting, which however won't
finish starting since unit1 won't finish and is ordered after it becuase
....
You get the idea I hope.
> Issuing "systemctl restart unit1.service" gives hang on this command
> (I have to terminate manually systemctl)
> While I don't know is this by design behavior or not - I think it
> would be nice to have possibility to control units from other units
systemd provides you with this flexibility. But you need to get your
ordering right.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list