core: when a unit state changes only propagate to jobs after reloading is complete
Previously, we'd immediately propagate unit state changes into any jobs pending for them, always. With this we only do this if the manager is out of the "reload" state. This fixes the problem #8803 tried to address, by simply not completing jobs until after the reload (and thus reestablishment of the dbus connection) is complete. Note that there's no need to later on explicitly catch up with the missed job state changes (i.e. there's no need to call unit_process_job() later one explicitly). That's because for jobs in JOB_WAITING state on deserialization all jobs are requeued into the run queue anyway, and thus checked again if they can complete now. And for JOB_RUNNING jobs unit_catchup() phase is going to trigger missed out state changes *after* the reload complete anyway (after all that's what distinguishes from unit_coldplug()). Replaces: #8803
Loading
Please register or sign in to comment