Skip to content

Commit

Permalink
Merge pull request #1459 from 0x5d/rpk-tune-mode-notice
Browse files Browse the repository at this point in the history
rpk tune: Print warning when all tuners are disabled
  • Loading branch information
0x5d authored May 27, 2021
2 parents 30b57b2 + 004babd commit 200c19a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/go/rpk/pkg/cli/cmd/redpanda/tune.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,10 @@ func tune(

results := []result{}
includeErr := false
allDisabled := true
for _, tunerName := range tunerNames {
enabled := factory.IsTunerEnabled(tunerName, conf.Rpk)
allDisabled = allDisabled && !enabled
tuner := tunersFactory.CreateTuner(tunerName, params)
supported, reason := tuner.CheckIfSupported()
if !enabled || !supported {
Expand All @@ -234,6 +236,14 @@ func tune(
results = append(results, result{tunerName, !res.IsFailed(), enabled, supported, errMsg})
}

if allDisabled {
log.Warn(
"All tuners were disabled, so none were applied. You may run " +
" `rpk mode prod` to enable the recommended set of tuners " +
" for non-containerized production use.",
)
}

printTuneResult(results, includeErr)

if rebootRequired {
Expand Down

0 comments on commit 200c19a

Please sign in to comment.