-
Notifications
You must be signed in to change notification settings - Fork 76
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
Noticing new symlinks in service directories #211
Comments
See also #202 |
Yeah, we can ammend this, but is that really what you want? inotify is async, so there is not guarantee that the bus reloaded the configuration at any time. Moreover, I think even the kernel part of fsnotify is async, so not even prioritizing the inotify-fd in epoll-dispatching would help. IOW, cant we use ReloadConfig on the bus instead? This is an unprivileged call, if I am not mistaken, and will properly provide a barrier, no? |
I am closing this, as there does not seem to be any update on this. Feel free to reopen this, if there is interest again. But please be ready to explain how you avoid races with inotify. |
I'm interested in this being fixed. For its part, flatpak has worked around this issue by creating the symlink with a temporary name and renaming it into place (which is an event that dbus-broker notices). Your argument about inotify being async the service being (not) available at any point in the future could also apply to the existing events that you watch for, and yet you still watch for them... it seems pretty reasonable to expect to be able to install something and then, at some point after a few seconds, expect it to be working... if you wanted to be really strict, you could wait until the name becomes activatable on the bus... |
Heyho Allison!
Configuration handling in
If I was to decide, I would rip out the entire configuration handling and replace it with proper IPC calls. Modifying file-systems is just never atomic (what if you need to install multiple names? What if you need to synchronize configuration updates into multiple different system services?). I know you can make things work with If you feel like this is the way forward, I am in no way stopping you. Thanks! |
I will close this for now, as there seems to be no followup to my previous comment. We follow what dbus-daemon does, but I will gladly join a discussion about extending the capabilities, if you are willing to discuss it. |
If you symlink a service into a service directory, the directory watch does not trigger, since a new symlink is IN_CREATE - and the watch added on the service directory doesn't look for that.
From reading the code, dbus-daemon seems to have the same behavior - but I think it's still pretty clearly a bug. May be tricky to fix without causing double reloads for common cases.
Ref: flatpak/flatpak#3145
The text was updated successfully, but these errors were encountered: