-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
tuned: Rework logic to gracefully handle the service starting #20748
base: main
Are you sure you want to change the base?
tuned: Rework logic to gracefully handle the service starting #20748
Conversation
Previously starting the service would lead to a server disconnected message, these changes allow us to instead fully wait until the service has started before showing the profile selection, meaning we no longer encounter that error
de9ab3e
to
466b3dc
Compare
Hello @SludgeGirl !
This sounds like a bug in tuned? The card already explicitly starts This PR introduces a lot of extra UI (a whole dialog, etc) but doesn't really address the race other than by "slowing down" the user. I'd like to first understand what's going on. Thanks! |
Hey @martinpitt!! Alright so, I've had another dig through just to refresh myself (sorry for the wait). There's a couple things this aimed to handle First is that the current behavior feels undefined and unexpected. From everything I've seen of cockpit so far, it's very explicit and asks permission for every action it wants to do that's extra from the intended user action, this is a stance I have alot of respect for. Clicking "performance: None" isn't clear that it would start tuned. The extra dialog I've added aimed to make this clearer along with helping to handle the issue (Sorry I forgot to make this clear in my initial explanation) In terms of the technical issue, let me prefix this by saying please let me know if anything I say doesn't make sense or is wrong. I've done my best here but with all the react state changes, systemd service status changes and dbus then everything changing alot through it's execution, it's been a nightmare to try and get my head around. But I believe as this executes and we start tuned inside the dialog, the some of the references like poll, and tunedDbus don't get updated inside the dialog because it's not re-rendered: cockpit/pkg/systemd/overview-cards/tuned-dialog.jsx Lines 127 to 132 in 626b74c
So when we then go to call those once the cockpit/pkg/systemd/overview-cards/tuned-dialog.jsx Lines 269 to 273 in 626b74c
|
The problem seems to be that tuned just takes too long these days to start, times out and reports an error. So I guess we have two options:
@martinpitt alternative ideas welcome :) |
Previously starting the service would lead to a server disconnected message, these changes allow us to instead fully wait until the service has started before showing the profile selection, meaning we no longer encounter that error