From 9cb3dfb5d3cd524e397363760fb0cb4544c12038 Mon Sep 17 00:00:00 2001 From: Daman Arora Date: Sat, 26 Apr 2025 16:06:18 +0530 Subject: [PATCH] kube-proxy: log errors during proxy boot Signed-off-by: Daman Arora --- pkg/util/iptables/iptables.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/util/iptables/iptables.go b/pkg/util/iptables/iptables.go index d38ab0f9d0e..0e48e75b385 100644 --- a/pkg/util/iptables/iptables.go +++ b/pkg/util/iptables/iptables.go @@ -654,8 +654,12 @@ func (runner *runner) ChainExists(table Table, chain Chain) (bool, error) { trace := utiltrace.New("iptables ChainExists") defer trace.LogIfLong(2 * time.Second) - _, err := runner.run(opListChain, fullArgs) - return err == nil, err + out, err := runner.run(opListChain, fullArgs) + if err != nil { + klog.ErrorS(err, "Failed to list chain", "chain", chain, "table", table, "output", string(out)) + return false, err + } + return true, nil } type operation string