Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: queue loading transient units after setting their properties #3676

Merged
merged 1 commit into from
Jul 8, 2016
Merged

core: queue loading transient units after setting their properties #3676

merged 1 commit into from
Jul 8, 2016

Conversation

dm0-
Copy link
Contributor

@dm0- dm0- commented Jul 6, 2016

This commit addresses the unexpected behavior posted here:

coreos/bugs#1430
https://bugzilla.redhat.com/show_bug.cgi?id=1350909

In my attempt to reproduce the issues on Fedora 24 (v229) with the commands in the RHBZ comments, both versions of the commands resulted in the failure (i.e. ordering Before/After didn't matter for me). Applying this patch resulted in success for both orderings.

$ sudo busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager StartTransientUnit 'ssa(sv)a(sa(sv))' test7.slice replace 2 Before as 1 fake.target After as 1 other.target 0 
o "/org/freedesktop/systemd1/job/1524"
$ sudo busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager StartTransientUnit 'ssa(sv)a(sa(sv))' test8.slice replace 2 After as 1 other.target Before as 1 fake.target 0 
o "/org/freedesktop/systemd1/job/1527"

Note that this patch removes the load-queuing from unit_make_transient(), so users would need to be aware of it, but there is currently only this one use in the project.

The unit load queue can be processed in the middle of setting the
unit's properties, so its load_state would no longer be UNIT_STUB
for the check in bus_unit_set_properties(), which would cause it to
incorrectly return an error.
@poettering poettering added the pid1 label Jul 8, 2016
@poettering
Copy link
Member

make sense!

@poettering poettering merged commit 4f952a3 into systemd:master Jul 8, 2016
@dm0- dm0- deleted the coreos-1430 branch July 8, 2016 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants