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

Re-check dbus when (re)starting TuneD from tuned-adm profile #627

Merged
merged 1 commit into from
May 23, 2024

Conversation

zacikpa
Copy link
Contributor

@zacikpa zacikpa commented Apr 17, 2024

When TuneD is off, and a profile is applied using tuned-adm profile, the command attempts to start it. Before this change, the profile would always be applied via the active_profile file.

When TuneD supports DBus, we can change the profile via a DBus call instead, and thus get information about the result. After the restart, I therefore added a new check which determines whether TuneD is on the dbus. If it's not, we fallback to the original profile activation.

The only disadvantage of this approach is that TuneD is restarted twice in the unlikely scenario that both enable_dbus and daemon are turned on, but TuneD does not become active on the DBus after a restart. This would, however, signalize some misconfiguration because if the TuneD service unit has type=dbus set, restarting the service hangs until it becomes active on the DBus.

Resolves #623.

If TuneD was simply off before the restart, we can then
switch the profile using the dbus method. Otherwise we
fallback to a profile switch via setting the active_profile
file (where we do not check for success).
@yarda
Copy link
Contributor

yarda commented May 23, 2024

Thanks, LGTM, but the changed output messages will require update of the Beaker tests.

@yarda yarda merged commit de2cf68 into redhat-performance:master May 23, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no error message when failing to apply profile while starting tuned
2 participants