File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -608,7 +608,7 @@ func (handle *LinuxKernelHandler) GetModules() ([]string, error) {
608
608
}
609
609
ipvsModules := utilipvs .GetRequiredIPVSModules (kernelVersion )
610
610
611
- var bmods []string
611
+ var bmods , lmods []string
612
612
613
613
// Find out loaded kernel modules. If this is a full static kernel it will try to verify if the module is compiled using /boot/config-KERNELVERSION
614
614
modulesFile , err := os .Open ("/proc/modules" )
@@ -650,11 +650,15 @@ func (handle *LinuxKernelHandler) GetModules() ([]string, error) {
650
650
if err != nil {
651
651
klog .Warningf ("Failed to load kernel module %v with modprobe. " +
652
652
"You can ignore this message when kube-proxy is running inside container without mounting /lib/modules" , module )
653
+ } else {
654
+ lmods = append (lmods , module )
653
655
}
654
656
}
655
657
}
656
658
657
- return append (mods , bmods ... ), nil
659
+ mods = append (mods , bmods ... )
660
+ mods = append (mods , lmods ... )
661
+ return mods , nil
658
662
}
659
663
660
664
// getFirstColumn reads all the content from r into memory and return a
You can’t perform that action at this time.
0 commit comments