We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a7702cb + b811af4 commit 359b9baCopy full SHA for 359b9ba
pkg/kubelet/util/swap/swap_util.go
@@ -110,8 +110,12 @@ func isSwapOnAccordingToProcSwaps(procSwapsContent []byte) bool {
110
procSwapsLines := strings.Split(procSwapsStr, "\n")
111
112
// If there is more than one line (table headers) in /proc/swaps then swap is enabled
113
- klog.InfoS("Swap is on", "/proc/swaps contents", procSwapsStr)
114
- return len(procSwapsLines) > 1
+ isSwapOn := len(procSwapsLines) > 1
+ if isSwapOn {
115
+ klog.InfoS("Swap is on", "/proc/swaps contents", procSwapsStr)
116
+ }
117
+
118
+ return isSwapOn
119
}
120
121
// IsSwapOn detects whether swap in enabled on the system by inspecting
0 commit comments