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

OCPBUGS-28647: tuned: operand: add support for deferred updates #1019

Merged
merged 19 commits into from
Jul 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/tuned/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,7 @@ func (c *Controller) changeSyncerTuneD(change Change) (synced bool, err error) {
debug := (c.daemon.restart & ctrlDebug) != 0
if debug != change.debug {
// A complete restart of the TuneD daemon is needed due to a debugging request switched on or off.
klog.V(4).Infof("debug control triggering tuned restart")
c.daemon.restart |= ctrlRestart
if change.debug {
c.daemon.restart |= ctrlDebug
Expand All @@ -1039,13 +1040,16 @@ func (c *Controller) changeSyncerTuneD(change Change) (synced bool, err error) {
// Does the current TuneD process have the reapply_sysctl option turned on?
reapplySysctl := c.tunedMainCfg.Section("").Key("reapply_sysctl").MustBool()
if reapplySysctl != change.reapplySysctl {
klog.V(4).Infof("reapplySysctl rewriting configuration file")

ffromani marked this conversation as resolved.
Show resolved Hide resolved
if err = iniCfgSetKey(c.tunedMainCfg, "reapply_sysctl", !reapplySysctl); err != nil {
return false, err
}
err = iniFileSave(tunedMainConfPath, c.tunedMainCfg)
if err != nil {
return false, fmt.Errorf("failed to write global TuneD configuration file: %v", err)
}
klog.V(4).Infof("reapplySysctl triggering tuned restart")
c.daemon.restart |= ctrlRestart // A complete restart of the TuneD daemon is needed due to configuration change in tuned-main.conf file.
}
}
Expand Down