File tree 1 file changed +25
-0
lines changed 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -313,6 +313,25 @@ function disable-selinux() {
313
313
fi
314
314
}
315
315
316
+ function kernel-supports-networkpolicy() {
317
+ # There's really no good way to test this "correctly" if OVS isn't installed.
318
+ # The mainline kernel got support for OVS conntrack in 4.3. RHEL kernels have
319
+ # it in 3.10.0-514 and later.
320
+ version=" $( uname -r) "
321
+ case " ${version} " in
322
+ 3.10.0-* .el7.* )
323
+ build=$( sed -e ' s/.*-\([0-9]*\)\..*/\1/' <<< " ${version}" )
324
+ if [[ " ${build} " -lt 514 ]]; then
325
+ return 1
326
+ fi
327
+ ;;
328
+ [0-3].* |4.[0-2].* )
329
+ return 1
330
+ ;;
331
+ esac
332
+ return 0
333
+ }
334
+
316
335
os::log::info " Starting 'networking' extended tests"
317
336
if [[ -n " ${CONFIG_ROOT} " ]]; then
318
337
KUBECONFIG=" $( get-kubeconfig-from-root " ${CONFIG_ROOT} " ) "
@@ -382,6 +401,12 @@ else
382
401
# Ignore deployment errors for a given plugin to allow other plugins
383
402
# to be tested.
384
403
test-osdn-plugin " subnet" " redhat/openshift-ovs-subnet" " false" " false" || true
404
+
405
+ if kernel-supports-networkpolicy; then
406
+ test-osdn-plugin " networkpolicy" " redhat/openshift-ovs-networkpolicy" " false" " buggy" || true
407
+ else
408
+ os::log::warning " Skipping networkpolicy tests due to kernel version"
409
+ fi
385
410
fi
386
411
387
412
test-osdn-plugin " multitenant" " redhat/openshift-ovs-multitenant" " true" " false" || true
You can’t perform that action at this time.
0 commit comments