From d54293f7bf8402d8464a2f52ac94cd88d469a958 Mon Sep 17 00:00:00 2001 From: Sebastian Sch Date: Mon, 2 Oct 2023 16:19:35 +0300 Subject: [PATCH] add networkManager to disable dhcp on vfs disable dhcp on vfs for vanilly k8s CI. if we don't disable it the device plugin will not use this devices Signed-off-by: Sebastian Sch --- hack/run-e2e-conformance-virtual-cluster.sh | 38 +++++++++++++++------ 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/hack/run-e2e-conformance-virtual-cluster.sh b/hack/run-e2e-conformance-virtual-cluster.sh index fe4f6ccd3..063841e71 100755 --- a/hack/run-e2e-conformance-virtual-cluster.sh +++ b/hack/run-e2e-conformance-virtual-cluster.sh @@ -126,24 +126,38 @@ cat << EOF > /etc/containers/registries.conf.d/003-${cluster_name}.conf $insecure_registry EOF -kcli ssh $cluster_name-ctlplane-0 << EOF +function update_host() { + node_name=$1 + kcli ssh $node_name << EOF sudo su echo '$insecure_registry' > /etc/containers/registries.conf.d/003-internal.conf systemctl restart crio -EOF -kcli ssh $cluster_name-worker-0 << EOF -sudo su -echo '$insecure_registry' > /etc/containers/registries.conf.d/003-internal.conf -systemctl restart crio -EOF +echo '[connection] +id=multi +type=ethernet +[ethernet] +[match] +driver=igbvf; +[ipv4] +method=disabled +[ipv6] +addr-gen-mode=default +method=disabled +[proxy]' > /etc/NetworkManager/system-connections/multi.nmconnection + +chmod 600 /etc/NetworkManager/system-connections/multi.nmconnection +systemctl restart NetworkManager -kcli ssh $cluster_name-worker-1 << EOF -sudo su -echo '$insecure_registry' > /etc/containers/registries.conf.d/003-internal.conf -systemctl restart crio EOF +} + +update_host $cluster_name-ctlplane-0 +update_host $cluster_name-worker-0 +update_host $cluster_name-worker-1 + + kubectl create namespace container-registry echo "## deploy internal registry" @@ -349,3 +363,5 @@ if [ -z $SKIP_TEST ]; then echo "## run sriov e2e conformance tests" SUITE=./test/conformance JUNIT_OUTPUT=`pwd`/k8s-artifacts hack/run-e2e-conformance.sh fi + +} \ No newline at end of file