ipvs: log err from CanUseIPVSProxier

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
This commit is contained in:
Andrew Sy Kim 2020-04-02 13:48:15 -04:00
parent 8ae26096f7
commit e3656db5bc

View File

@ -108,7 +108,11 @@ func newProxyServer(
iptInterface = utiliptables.New(execer, protocol)
kernelHandler = ipvs.NewLinuxKernelHandler()
ipsetInterface = utilipset.New(execer)
canUseIPVS, _ := ipvs.CanUseIPVSProxier(kernelHandler, ipsetInterface)
canUseIPVS, err := ipvs.CanUseIPVSProxier(kernelHandler, ipsetInterface)
if string(config.Mode) == proxyModeIPVS && err != nil {
klog.Errorf("Can't use the IPVS proxier: %v", err)
}
if canUseIPVS {
ipvsInterface = utilipvs.New(execer)
}