core: re-sync bus name list after deserializing during daemon-reload#2216
Merged
poettering merged 1 commit intosystemd:masterfrom Dec 23, 2015
Merged
core: re-sync bus name list after deserializing during daemon-reload#2216poettering merged 1 commit intosystemd:masterfrom
poettering merged 1 commit intosystemd:masterfrom
Conversation
|
Big thanks for tracking this down. Can you give an estimate about when this will land in a release? The issue solved by this PR severely affects service development work in recent CoreOS versions. |
Member
Author
|
I doubt there will be another release this year. If you want to deploy it nevertheless downstream, you can just cherry-pick d8ccf5f and this one. Both are needed to fix the bug. |
Member
|
Conceptually looks good to me, but needs an extra check i think, see above. |
When the daemon reloads, it doesn not actually give up its DBus connection, as wrongly stated in an earlier commit. However, even though the bus connection stays open, the daemon flushes out all its internal state. Hence, if there is a NameOwnerChanged signal after the flush and before the deserialization, it cannot be matched against any pending unit. To fix this, rename bus_list_names() to manager_sync_bus_names() and call it explicitly at the end of the daemon reload operation.
6535340 to
8936a5e
Compare
Member
Author
|
Right, thanks for spotting. I force-pushed an amended version. |
poettering
added a commit
that referenced
this pull request
Dec 23, 2015
core: re-sync bus name list after deserializing during daemon-reload
Member
|
Thanks for fixing this! Merged! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the daemon reloads, it does not actually give up its DBus connection,
as wrongly stated in an earlier commit. However, even though the bus
connection stays open, the daemon flushes out all its internal state.
Hence, if there is a
NameOwnerChangedsignal after the flush and before thedeserialization, it cannot be matched against any pending unit.
To fix this, rename
bus_list_names()tomanager_sync_bus_names()and callit explicitly at the end of the daemon reload operation.
Fixes #2136