ipvs: log error if scheduler does not exist and fallback to rr

Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
This commit is contained in:
Christopher M. Luciano
2020-07-23 13:58:02 -04:00
parent e2a0eddaf0
commit 65ff4e8227
5 changed files with 82 additions and 9 deletions

View File

@@ -151,6 +151,14 @@ func Test_getProxyMode(t *testing.T) {
expected: proxyModeIPVS,
scheduler: "sed",
},
{ // flag says ipvs, ipset version ok, non-existent scheduler
flag: "ipvs",
kmods: []string{"ip_vs", "ip_vs_rr", "ip_vs_wrr", "ip_vs_sh", "nf_conntrack", "ip_vs_sed"},
kernelVersion: "4.19",
ipsetVersion: ipvs.MinIPSetCheckVersion,
expected: proxyModeIPVS,
scheduler: "foobar",
},
}
for i, c := range cases {
kcompater := &fakeKernelCompatTester{c.kernelCompat}