Discussion:
failed to schedule restart job: Transaction is destructive.
(too old to reply)
prashantkumar dhotre
2017-11-28 09:14:57 UTC
Permalink
Hi
Sometimes i see that service restart fails with
systemd[1]: *my.service failed to schedule restart job: Transaction is
destructive.*

above error is very rare.
I have defined ExecStopPost script in my service file.
this problem does not always happen and there is no defined steps to
recreate this.
Any idea what may cause above error ? is it ExecStopPost script.
how to resolve that ?
thanks
Mantas Mikulėnas
2017-11-28 11:04:10 UTC
Permalink
On Tue, Nov 28, 2017 at 11:14 AM, prashantkumar dhotre <
Post by prashantkumar dhotre
Hi
Sometimes i see that service restart fails with
systemd[1]: *my.service failed to schedule restart job: Transaction is
destructive.*
above error is very rare.
I have defined ExecStopPost script in my service file.
this problem does not always happen and there is no defined steps to
recreate this.
Any idea what may cause above error ? is it ExecStopPost script.
What does your ExecStopPost script do?
--
Mantas Mikulėnas <***@gmail.com>
prashantkumar dhotre
2017-11-28 11:52:31 UTC
Permalink
Exec StopPost script writes to log file and writes to zookeeper.
I have checked that , that script takes Max 2 sec to finish.
To recreate issue, I have tried doing mre work in the script so that script
take more than 1 min but I could not recreate issue
Post by Mantas Mikulėnas
On Tue, Nov 28, 2017 at 11:14 AM, prashantkumar dhotre <
Post by prashantkumar dhotre
Hi
Sometimes i see that service restart fails with
systemd[1]: *my.service failed to schedule restart job: Transaction is
destructive.*
above error is very rare.
I have defined ExecStopPost script in my service file.
this problem does not always happen and there is no defined steps to
recreate this.
Any idea what may cause above error ? is it ExecStopPost script.
What does your ExecStopPost script do?
--
Lennart Poettering
2017-11-28 14:12:45 UTC
Permalink
Post by prashantkumar dhotre
Hi
Sometimes i see that service restart fails with
systemd[1]: *my.service failed to schedule restart job: Transaction is
destructive.*
The restart logic of services is very defensive: it won't reverse
already queued jobs: if a stop job for some unit is queued, and
starting the unit the Restart= setting is applied to would pull it
back in then the restart is not done.

In other words: it appears that some unit your unit depends on already
has a contradicting job queued at the moment the restart is supposed
to happen.

Lennart
--
Lennart Poettering, Red Hat
Loading...