ipvs: check for existence of scheduler module and fail if not found

Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
This commit is contained in:
Christopher M. Luciano
2020-10-05 12:08:48 -04:00
parent 65ff4e8227
commit 51ed242194
5 changed files with 14 additions and 95 deletions

View File

@@ -711,10 +711,11 @@ func CanUseIPVSProxier(handle KernelHandler, ipsetver IPSetVersioner, scheduler
}
mods = utilipvs.GetRequiredIPVSModules(kernelVersion)
wantModules := sets.NewString()
schedulerMod, modNotFound := utilipvs.GetRequiredSchedulerModules(scheduler)
if modNotFound != nil {
klog.Error(modNotFound)
// We check for the existence of the scheduler mod and will trigger a missingMods error if not found
if scheduler == "" {
scheduler = DefaultScheduler
}
schedulerMod := "ip_vs_" + scheduler
mods = append(mods, schedulerMod)
wantModules.Insert(mods...)