Age | Commit message (Collapse) | Author |
|
|
|
It is easier to see what job_type_merge() is doing when the merging
rules are written in the form of a table.
job_type_is_superset() contained redundant information. It can be
simplified to a simple rule: Type A is a superset of B iff merging A
with B gives A.
Two job types are conflicting iff they are not mergeable.
Make job_type_lookup_merge() the core function to decide the type
merging. All other job_type_*() are just short wrappers around it.
They can be inline.
test-job-type gives the same results as before.
btw, the systemd binary is smaller by almost 1 KB.
|
|
|
|
Suppose that foo.service/start is a job waiting on other job bar.service/start
to finish. And then foo.service/restart is enqueued (not using
--ignore-dependencies).
Currently this makes foo.service start immediately, forgetting about the
ordering to bar.service.
The runnability check for JOB_RESTART jobs looks only at dependencies for
stopping. That's actually correct, because restart jobs should be treated the
same as stop jobs at first. The bug is that job_run_and_invalidate() does not
treat them exactly the same as stop jobs. unit_start() gets called without
checking for the runnability of the converted JOB_START job.
The fix is to simplify the switch in job_run_and_invalidate(). Handle
JOB_RESTART identically to JOB_STOP.
Also simplify the handling of JOB_TRY_RESTART - just convert it to JOB_RESTART
if the unit is active and let it fall through to the JOB_RESTART case.
Similarly for JOB_RELOAD_OR_START - have a fall through to JOB_START.
In job_finish_and_invalidate() it's not necessary to check for JOB_TRY_RESTART
with JOB_DONE, because JOB_TRY_RESTART jobs will have been converted to
JOB_RESTART already.
Speeding up the restart of services in "auto-restart" state still works as
before.
Improves: https://bugzilla.redhat.com/show_bug.cgi?id=753586
but it's still not perfect. With this fix the try-restart action will wait for
the restart to complete in the right order, but the optimal behaviour would be
to finish quickly (without disturbing the start job).
|
|
Now that objects of all unit types are allocated the exact amount of
memory they need, the Unit union has lost its purpose. Remove it.
"Unit" is a more natural name for the base unit class than "Meta", so
rename Meta to Unit.
Access to members of the base class gets simplified.
|
|
|
|
The lack or green/red status marks on boot has been described by some
users as "critical", "dramatic", "dealbreaker", "showstopper". Seriously.
|
|
HASHMAP_FOREACH is safe against the removal of the current entry, but
not against the removal of other entries. job_finish_and_invalidate()
can recursively remove other entries.
It triggered an assertion failure:
Assertion 'j->installed' failed at src/manager.c:1218, function
transaction_apply(). Aborting.
Fix the crash by iterating from the beginning when there is a
possibility that the iterator could be invalid.
It is O(n^2) in the worst case, but that's better than a crash.
https://bugzilla.redhat.com/show_bug.cgi?id=717325
|
|
When we converted a restart job it's time to look again whether any of
its dependencies are now runnable.
https://bugzilla.redhat.com/show_bug.cgi?id=735013
|
|
|
|
|
|
|
|
job did not apply
https://bugzilla.redhat.com/show_bug.cgi?id=682245
https://bugzilla.redhat.com/show_bug.cgi?id=635780
|
|
|
|
Just some lame spelling corrections with no functionality.
|
|
dependencies, timeout
|
|
|
|
This practically reverses 23e1e0c4a3bc93fb841ac9575953ed5d0ef5282d.
This makes it easier to timeout individual jobs so that this timeout can
be relied on, since blocked dependencies will not influence the timeout.
|
|
|
|
it to the queue of jobs
|
|
|
|
|
|
|
|
|
|
|
|
weaker counterpart of Conflicts=, similar to Wants= vs. Requires=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
remove the one that is "conflicted"
This gives the writer of units control which unit is kept and which is
stopped when two units conflict.
|
|
start jobs
|
|
|
|
|
|
|
|
|
|
|
|
unconditionally, and thus get rid of broadcast signals in most cases
|
|
|
|
|
|
|
|
|
|
|