-
Notifications
You must be signed in to change notification settings - Fork 252
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
sbus: move to single sbus server #6971
Conversation
b71b567
to
ddfa69a
Compare
This is ready for review now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a job!
I hope I didn't miss anything, but it looks good to me.
Mistypes in commit messages: availble, individuall, they were changed (chained). |
In the commit |
Even in the unlikely case when multiple of these methods where called in parallel, we must treat them as separate calls and handle them individually to avoid situations like: - SetInconsistent - SetActive - SetInconsistent Here, if chained, it translates to SetInconsistent -> SetActive, which is wrong. Therefore we can not chain these signals.
This allows us to connect to the D-Bus server sooner and remove code duplication in responders and backend. Now we can connect to the bus when we are ready and register the process in the monitor when the process is fully initialized.
We used asynchronous connection because we were also creating a dbus server. Now we do not create the server anymore so we can switch back to a blocking call and simplify the code. Blocking call is alright at this moment, since we can not serve any requests anyway and the backend is not yet fully initialized. Whole initialization was postponed until this call is finished in non-blocking mode as well.
Switching to single dbus server allows us to remove this code since all clients can now be contacted via their own unique dbus name. This code is no longer used since the switch.
So we are able to match the logged messages with particular sender.
Asynchronous connection to D-Bus is only needed when creating a server and that is done by `sbus_server_create_and_connect_send`. Non-blocking connection does not make sense on other places in SSSD because we use D-Bus for IPC therefore if D-Bus connection is not functional, our process can not function as well and therefore the blocking connection actually makes more sense.
Everything should be fixed and addressed now. |
setactive/inconsistent is also build only for files provider. sbus codegen does not support conditional code though and its probably not worth spending time on it. |
Imo, |
These signals are only used by files provider, they are not completely reliable because they are prone to race conditions and should not really be used elsewhere.
Done. |
@aplopez, please take a look at the latest version. |
Thank you, ACK. |
ACK. Thanks. |
Pushed PR: #6971
|
This is a continuation of #6257.
I rebased it and added descriptions to commit messages.
I need to verify functionality since the pull request was opened
for a long time and fix the issue that is currently just mitigated
(probably incorrectly). Therefore this is a draft so far.