]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/transaction.h
core: introduce UNIT_ATOM_PROPAGATE_STOP_GRACEFUL for PropagatesStopTo=
authorMike Yuan <me@yhndnzj.com>
Mon, 3 Jul 2023 23:28:33 +0000 (07:28 +0800)
committerMike Yuan <me@yhndnzj.com>
Wed, 5 Jul 2023 00:15:35 +0000 (08:15 +0800)
commit48cb073db81fa73f64bc5aa9a1b81ebf627235fa
tree63508f8633b5df67ef25a4b2660bf97470d77f95
parent87d17581af0a27cbcd093d5506e73232c7e2c5b9
core: introduce UNIT_ATOM_PROPAGATE_STOP_GRACEFUL for PropagatesStopTo=

Follow-up for 017a7ba4f406adcf69d6b3ec15b9f2d9ed5ad853

Before this commit, when a unit that is restarting propagates stop
to other units, it can also depend on them, which results in
job type conflict and thus failure to pull in the dependencies.

So, let's introduce a new dependency atom UNIT_ATOM_PROPAGATE_STOP_GRACEFUL,
and use it for PropagatesStopTo=. It will enqueue a restart job if
there's already a start job, which meets the ultimate goal and avoids
job type conflict.

Fixes #26839
src/core/transaction.c
src/core/transaction.h
src/core/unit-dependency-atom.c
src/core/unit-dependency-atom.h