Skip to content

Commit b399ec0

Browse files
committed
style: log the kernel version
Signed-off-by: Hunter Gregory <[email protected]>
1 parent 85dc587 commit b399ec0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

npm/pkg/dataplane/policies/chain-management_linux.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,16 +282,16 @@ func (pMgr *PolicyManager) detectIptablesVersion() error {
282282
}
283283

284284
if majorVersion >= 5 {
285-
msg := "detected iptables version on third attempt. found kernel version >= 5. NPM will use iptables-nft"
286-
klog.Info(msg)
287-
metrics.SendLog(util.IptmID, msg, metrics.DonotPrint)
285+
msg := "detected iptables version on third attempt. found kernel version >= 5. NPM will use iptables-nft. kernel version: %d"
286+
klog.Infof(msg, majorVersion)
287+
metrics.SendLog(util.IptmID, fmt.Sprintf(msg, majorVersion), metrics.DonotPrint)
288288
util.SetIptablesToNft()
289289
return nil
290290
}
291291

292-
msg := "detected iptables version on third attempt. found kernel version < 5. NPM will use iptables-legacy"
293-
klog.Info(msg)
294-
metrics.SendLog(util.IptmID, msg, metrics.DonotPrint)
292+
msg := "detected iptables version on third attempt. found kernel version < 5. NPM will use iptables-legacy. kernel version: %d"
293+
klog.Infof(msg, majorVersion)
294+
metrics.SendLog(util.IptmID, fmt.Sprintf(msg, majorVersion), metrics.DonotPrint)
295295
util.SetIptablesToLegacy()
296296
return nil
297297
}

0 commit comments

Comments
 (0)