Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DownStream Merge Sync from 4.19 [01-08-2025] #2413

Open
wants to merge 45 commits into
base: release-4.18
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
9a6ecf2
Update nad controller type names
jcaamano Nov 15, 2024
2f860b9
Remove BasicNetInfo, add MutableNetInfo and ReconcilableNetInfo
jcaamano Jul 16, 2024
6137284
Zone & node network controllers reconcile NetInfo changes
jcaamano Jul 16, 2024
1b7a6c2
Get route advertisement information in network manager
jcaamano Jul 16, 2024
3f5189b
nit: fix kind export logs warning
flavio-fernandes Nov 25, 2024
ec23ccd
Add support for ocp-traffic-flow-tests in GitHub workflows
flavio-fernandes Nov 25, 2024
18c0211
fix flaky VM live migration e2e case
Dec 12, 2024
eee9142
Merge pull request #4533 from jcaamano/racontroller
trozet Dec 13, 2024
bae7288
Statically set GH runner image to ubuntu 22.04 for tests
martinkennelly Dec 15, 2024
893bab6
Merge pull request #4916 from martinkennelly/statically-set-ubuntu-image
tssurya Dec 16, 2024
7f7f8a4
Fix for unexistent package msbuild in latest ubuntu images
jcaamano Dec 16, 2024
604072e
Revert "Statically set GH runner image to ubuntu 22.04 for tests"
jcaamano Dec 16, 2024
3353498
Fixes pkt larger dispatch flows for UDNs
trozet Dec 13, 2024
79bf093
EIP multi NIC: fix selection of mgmt port IP in dualstack mode
martinkennelly Dec 15, 2024
a787d51
EIP E2E: fixup e2es to run in dualstack environment
martinkennelly Dec 15, 2024
c6fb7fd
Merge pull request #4920 from jcaamano/ci-msbuild-fix
trozet Dec 16, 2024
0c77abd
Merge pull request #4907 from martinkennelly/test
trozet Dec 16, 2024
c7bd1eb
kind: Pin metallb to a dev-env fixded version
qinqon Sep 9, 2024
a886c57
ci,network-segmentation: Install metallb
qinqon Sep 9, 2024
9bf22f9
udn,e2e,service: Bind to ovn-udn1 interface
qinqon Sep 10, 2024
94c6f24
udn, e2e, services: Don't delete fr namespace
qinqon Sep 10, 2024
70356c2
udn, e2e, svc: external client and load balancer
qinqon Sep 10, 2024
dd18b94
Merge pull request #4702 from qinqon/primary-udn-external-to-nodePort…
tssurya Dec 17, 2024
fcb3df9
Don't SNAT to node IP in LGW mode if pod network advertised
jcaamano Jul 23, 2024
3a3e2f9
Send ingress to kernel in LGW mode if pod network advertised
jcaamano Jul 24, 2024
36422b4
helper_linux: Set mtu_request for ovs-doca ports
aserdean Dec 17, 2024
1e7084e
Ensure only ginkgo v2 for DescribeTable support
martinkennelly Dec 18, 2024
78974ad
Revert "Fix for unexistent package msbuild in latest ubuntu images"
tssurya Dec 18, 2024
2f947c8
Support reconciliation for management port
jcaamano Jul 24, 2024
cdac0bd
Don't SNAT to mgmt port if pod network advertised
jcaamano Jul 26, 2024
5709bac
Update DefaultNodeNetworkController Reconcile to return error on failure
jcaamano Dec 17, 2024
dcdc720
Make node gw Reconcile -> updateSNATRules thread safe
jcaamano Dec 18, 2024
19931e2
Fix ESVC parameter & EIP tests following change to ginkgo v2
martinkennelly Dec 18, 2024
55e1fed
Merge pull request #4927 from ovn-kubernetes/revert-4920-ci-msbuild-fix
trozet Dec 18, 2024
4d3411e
Do not log skipped services on delete
kyrtapz Dec 16, 2024
60eaa60
Remove service from cache on add failure
kyrtapz Dec 16, 2024
5e6160d
EIP e2es: for host network pods, block until fully deleted
martinkennelly Dec 18, 2024
706435b
Merge pull request #4572 from jcaamano/advertise-lgw
trozet Dec 18, 2024
75499ab
Merge pull request #4924 from martinkennelly/revert-usage-gv1-dsc-table
trozet Dec 18, 2024
b722f85
Test for go mod or go vendor inconsistencies
martinkennelly Dec 18, 2024
4b94351
Merge pull request #4925 from martinkennelly/detect-stable-mod-vendor
trozet Dec 19, 2024
2393416
Merge pull request #4918 from kyrtapz/svc_gw_fix
tssurya Dec 19, 2024
2e03a16
Merge remote-tracking branch 'ovn-org/master' into d/s-merge-12-19-2024
jluhrsen Dec 19, 2024
d8e16ec
Merge pull request #2402 from jluhrsen/d/s-merge-12-19-2024
openshift-merge-bot[bot] Jan 8, 2025
745492d
Merge remote-tracking branch 'upstream/master' into 4.18-sync-from-4.…
jluhrsen Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 41 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
# separate job for parallelism
lint:
name: Lint
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand All @@ -57,7 +57,7 @@ jobs:

build-master:
name: Build-master
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
# Create a cache for the built master image
- name: Restore master image cache
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:

build-pr:
name: Build-PR
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
# Create a cache for the build PR image
- name: Restore PR image cache
Expand Down Expand Up @@ -195,8 +195,9 @@ jobs:
run: |
set -x
pushd go-controller
# exit early if there are gofmt issues
# exit early if there are gofmt or go mod / vendor issues
make gofmt
make verify-go-mod-vendor
make
make windows
COVERALLS=1 CONTAINER_RUNNABLE=1 make check
Expand Down Expand Up @@ -256,7 +257,7 @@ jobs:
ovn-upgrade-e2e:
name: Upgrade OVN from Master to PR branch based image
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 120
needs:
- build-master
Expand Down Expand Up @@ -327,7 +328,7 @@ jobs:
if: always()
run: |
mkdir -p /tmp/kind/logs
kind export logs --name ${KIND_CLUSTER_NAME} --loglevel=debug /tmp/kind/logs
kind export logs --name ${KIND_CLUSTER_NAME} --verbosity 4 /tmp/kind/logs
set -x
docker ps -a
docker exec ovn-control-plane crictl images
Expand Down Expand Up @@ -375,7 +376,7 @@ jobs:
if: always()
run: |
mkdir -p /tmp/kind/logs-kind-pr-branch
kind export logs --name ${KIND_CLUSTER_NAME} --loglevel=debug /tmp/kind/logs-kind-pr-branch
kind export logs --name ${KIND_CLUSTER_NAME} --verbosity 4 /tmp/kind/logs-kind-pr-branch

- name: Upload kind logs
if: always()
Expand All @@ -386,7 +387,7 @@ jobs:

e2e:
name: e2e
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# 30 mins for kind, 180 mins for control-plane tests, 10 minutes for all other steps
timeout-minutes: 220
strategy:
Expand All @@ -406,13 +407,14 @@ jobs:
# num-nodes-per-zone : "<integer value>"
# forwarding : ["", "disable-forwarding"]
# dns-name-resolver : ["", "enable-dns-name-resolver"]
# traffic-flow-tests : "<tests range. i.e. 1-24>"
include:
- {"target": "shard-conformance", "ha": "HA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-disabled"}
- {"target": "shard-conformance", "ha": "noHA", "gateway-mode": "local", "ipfamily": "dualstack", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"}
- {"target": "shard-conformance", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv6", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"}
- {"target": "shard-conformance", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"}
- {"target": "control-plane", "ha": "HA", "gateway-mode": "shared", "ipfamily": "ipv6", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-disabled", "dns-name-resolver": "enable-dns-name-resolver"}
- {"target": "control-plane", "ha": "HA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-disabled"}
- {"target": "control-plane", "ha": "HA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-disabled", "traffic-flow-tests": "1,2,3"}
- {"target": "control-plane-helm","ha": "HA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-disabled", "dns-name-resolver": "enable-dns-name-resolver"}
- {"target": "control-plane-helm","ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "dns-name-resolver": "enable-dns-name-resolver"}
- {"target": "control-plane", "ha": "noHA", "gateway-mode": "local", "ipfamily": "ipv4", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "dns-name-resolver": "enable-dns-name-resolver"}
Expand All @@ -437,6 +439,7 @@ jobs:
- {"target": "network-segmentation", "ha": "noHA", "gateway-mode": "local", "ipfamily": "dualstack", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"}
- {"target": "network-segmentation", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "dualstack", "disable-snat-multiple-gws": "SnatGW", "second-bridge": "1br", "ic": "ic-disabled"}
- {"target": "network-segmentation", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"}
- {"target": "traffic-flow-test-only","ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "traffic-flow-tests": "1-24"}
- {"target": "tools", "ha": "noHA", "gateway-mode": "local", "ipfamily": "dualstack", "disable-snat-multiple-gws": "SnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"}
needs: [ build-pr ]
env:
Expand All @@ -446,13 +449,13 @@ jobs:
OVN_EMPTY_LB_EVENTS: "${{ matrix.target == 'control-plane' || matrix.target == 'control-plane-helm' }}"
OVN_HA: "${{ matrix.ha == 'HA' }}"
OVN_DISABLE_SNAT_MULTIPLE_GWS: "${{ matrix.disable-snat-multiple-gws == 'noSnatGW' }}"
KIND_INSTALL_METALLB: "${{ matrix.target == 'control-plane' || matrix.target == 'control-plane-helm' }}"
KIND_INSTALL_METALLB: "${{ matrix.target == 'control-plane' || matrix.target == 'control-plane-helm' || matrix.target == 'network-segmentation' }}"
OVN_GATEWAY_MODE: "${{ matrix.gateway-mode }}"
OVN_SECOND_BRIDGE: "${{ matrix.second-bridge == '2br' }}"
KIND_IPV4_SUPPORT: "${{ matrix.ipfamily == 'IPv4' || matrix.ipfamily == 'dualstack' }}"
KIND_IPV6_SUPPORT: "${{ matrix.ipfamily == 'IPv6' || matrix.ipfamily == 'dualstack' }}"
ENABLE_MULTI_NET: "${{ matrix.target == 'multi-homing' || matrix.target == 'kv-live-migration' || matrix.target == 'network-segmentation' || matrix.target == 'tools' || matrix.target == 'multi-homing-helm' }}"
ENABLE_NETWORK_SEGMENTATION: "${{ matrix.target == 'network-segmentation' || matrix.target == 'tools' || matrix.target == 'kv-live-migration'}}"
ENABLE_MULTI_NET: "${{ matrix.target == 'multi-homing' || matrix.target == 'kv-live-migration' || matrix.target == 'network-segmentation' || matrix.target == 'tools' || matrix.target == 'multi-homing-helm' || matrix.target == 'traffic-flow-test-only' }}"
ENABLE_NETWORK_SEGMENTATION: "${{ matrix.target == 'network-segmentation' || matrix.target == 'tools' || matrix.target == 'kv-live-migration' || matrix.target == 'traffic-flow-test-only' }}"
DISABLE_UDN_HOST_ISOLATION: "true"
KIND_INSTALL_KUBEVIRT: "${{ matrix.target == 'kv-live-migration' }}"
OVN_COMPACT_MODE: "${{ matrix.target == 'compact-mode' }}"
Expand All @@ -463,6 +466,7 @@ jobs:
OVN_DISABLE_FORWARDING: "${{ matrix.forwarding == 'disable-forwarding' }}"
USE_HELM: "${{ matrix.target == 'control-plane-helm' || matrix.target == 'multi-homing-helm' }}"
OVN_ENABLE_DNSNAMERESOLVER: "${{ matrix.dns-name-resolver == 'enable-dns-name-resolver' }}"
TRAFFIC_FLOW_TESTS: "${{ matrix.traffic-flow-tests }}"
steps:

- name: Install VRF kernel module
Expand All @@ -482,6 +486,11 @@ jobs:
msbuild mysql-server-core-* php-* php7* \
powershell temurin-* zulu-*

- name: Setup /mnt/runner directory
run: |
sudo mkdir -pv /mnt/runner
sudo chown runner:runner /mnt/runner

- name: Check out code into the Go module directory
uses: actions/checkout@v4

Expand Down Expand Up @@ -523,6 +532,11 @@ jobs:
export OVN_IMAGE="ovn-daemonset-fedora:pr"
make -C test install-kind

- name: traffic-flow-tests setup
timeout-minutes: 5
if: env.TRAFFIC_FLOW_TESTS != ''
run: make -C test traffic-flow-tests WHAT="setup"

- name: Runner Diagnostics
uses: ./.github/actions/diagnostics

Expand Down Expand Up @@ -554,21 +568,33 @@ jobs:
elif [ "${{ matrix.target }}" == "tools" ]; then
make -C go-controller build
make -C test tools
elif [ "${{ matrix.target }}" == "traffic-flow-test-only" ]; then
# Traffic Flow Tests can be ran as part of a target, as an additional
# set of test, set via TRAFFIC_FLOW_TESTS. See below.
:
else
make -C test ${{ matrix.target }}
if [ "${{ matrix.ipfamily }}" != "ipv6" ]; then
make -C test conformance
fi
fi

# If target also specified traffic flow tests to run, do so now
if [ -n "${TRAFFIC_FLOW_TESTS}" ]; then
make -C test traffic-flow-tests WHAT="run"
fi

- name: Runner Diagnostics
uses: ./.github/actions/diagnostics

- name: Export kind logs
if: always()
run: |
mkdir -p /tmp/kind/logs
kind export logs --name ${KIND_CLUSTER_NAME} --loglevel=debug /tmp/kind/logs
kind export logs --name ${KIND_CLUSTER_NAME} --verbosity 4 /tmp/kind/logs
if [ -n "${TRAFFIC_FLOW_TESTS}" ]; then
mv -v /tmp/{,kind/logs/}traffic_flow_test_result.json ||:
fi

- name: Upload kind logs
if: always()
Expand All @@ -580,7 +606,7 @@ jobs:
e2e-dual-conversion:
name: e2e-dual-conversion
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
Expand Down Expand Up @@ -675,7 +701,7 @@ jobs:
if: always()
run: |
mkdir -p /tmp/kind/logs
kind export logs --name ${KIND_CLUSTER_NAME} --loglevel=debug /tmp/kind/logs
kind export logs --name ${KIND_CLUSTER_NAME} --verbosity 4 /tmp/kind/logs

- name: Upload kind logs
if: always()
Expand Down
14 changes: 6 additions & 8 deletions contrib/kind-common
Original file line number Diff line number Diff line change
Expand Up @@ -122,20 +122,18 @@ install_ingress() {

METALLB_DIR="/tmp/metallb"
install_metallb() {
local metallb_version=v0.14.8
# TODO: Pin to a version tag bigger than v0.14.8 when released
# so we can have a metallb dev-env that support dual stack
# and use a proper tag instead of a commit id.
local metallb_version=55f648102b918699da610f20e8d650e76c7561fc
mkdir -p /tmp/metallb
local builddir
builddir=$(mktemp -d "${METALLB_DIR}/XXXXXX")

pushd "${builddir}"
git clone https://github.com/metallb/metallb.git -b $metallb_version
git clone https://github.com/metallb/metallb.git
cd metallb
# Use global IP next hops in IPv6
if [ "$KIND_IPV6_SUPPORT" == true ]; then
sed -i '/address-family PROTOCOL unicast/a \
neighbor NODE0_IP route-map IPV6GLOBAL in\n neighbor NODE1_IP route-map IPV6GLOBAL in\n neighbor NODE2_IP route-map IPV6GLOBAL in' dev-env/bgp/frr/bgpd.conf.tmpl
printf "route-map IPV6GLOBAL permit 10\n set ipv6 next-hop prefer-global" >> dev-env/bgp/frr/bgpd.conf.tmpl
fi
git checkout $metallb_version
pip install -r dev-env/requirements.txt

local ip_family ipv6_network
Expand Down
2 changes: 1 addition & 1 deletion contrib/kind-dual-stack-conversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ convert_cni() {
# restart ovnkube-master
# FIXME: kubectl rollout restart deployment leaves the old pod hanging
# as workaround we delete the master directly. When deployed with
# OVN_INTERCONNECT_ENABLE=true, the db and ncm pods need that too.
# OVN_INTERCONNECT_ENABLE=true, the db and cm pods need that too.
# Depending on how kind was deployed, the pods have different labels.
kubectl -n ovn-kubernetes delete pod -l name=ovnkube-db ||:
kubectl -n ovn-kubernetes delete pod -l name=ovnkube-zone-controller ||:
Expand Down
3 changes: 3 additions & 0 deletions go-controller/.mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ packages:
github.com/containernetworking/plugins/pkg/ns:
interfaces:
NetNS:
github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/client/informers/externalversions/k8s.cni.cncf.io/v1:
interfaces:
NetworkAttachmentDefinitionInformer:
github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/client/listers/k8s.cni.cncf.io/v1:
interfaces:
NetworkAttachmentDefinitionLister:
Expand Down
9 changes: 8 additions & 1 deletion go-controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ clean:
rm -f ./pkg/sbdb/ovn-sb.ovsschema
rm -f ./pkg/vswitchd/vswitch.ovsschema

.PHONY: lint gofmt
.PHONY: lint gofmt verify-go-mod-vendor

lint:
ifeq ($(CONTAINER_RUNNABLE), 0)
Expand All @@ -105,6 +105,13 @@ else
@./hack/verify-gofmt.sh
endif

verify-go-mod-vendor:
ifeq ($(CONTAINER_RUNNABLE), 0)
@GOPATH=${GOPATH} ./hack/verify-go-mod-vendor.sh
else
@./hack/verify-go-mod-vendor.sh
endif

pkg/nbdb/ovn-nb.ovsschema:
curl -sSL https://raw.githubusercontent.com/ovn-org/ovn/$(OVN_SCHEMA_VERSION)/ovn-nb.ovsschema -o $@

Expand Down
18 changes: 9 additions & 9 deletions go-controller/cmd/ovnkube/ovnkube.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (

"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/clustermanager"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/controllermanager"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/libovsdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/metrics"
controllerManager "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/network-controller-manager"
ovnnode "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/routemanager"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"
Expand Down Expand Up @@ -343,7 +343,7 @@ func startOvnKube(ctx *cli.Context, cancel context.CancelFunc) error {
case runMode.ovnkubeController:
metrics.RegisterOVNKubeControllerBase()
haConfig = &config.MasterHA
name = networkControllerManagerLockName()
name = controllerManagerLockName()
case runMode.clusterManager:
metrics.RegisterClusterManagerBase()
haConfig = &config.ClusterMgrHA
Expand Down Expand Up @@ -505,7 +505,7 @@ func runOvnKube(ctx context.Context, runMode *ovnkubeRunMode, ovnClientset *util
return
}

networkControllerManager, err := controllerManager.NewNetworkControllerManager(
controllerManager, err := controllermanager.NewControllerManager(
ovnClientset,
watchFactory,
libovsdbOvnNBClient,
Expand All @@ -517,7 +517,7 @@ func runOvnKube(ctx context.Context, runMode *ovnkubeRunMode, ovnClientset *util
return
}

err = networkControllerManager.Start(ctx)
err = controllerManager.Start(ctx)
if err != nil {
controllerErr = fmt.Errorf("failed to start network controller: %w", err)
return
Expand All @@ -527,7 +527,7 @@ func runOvnKube(ctx context.Context, runMode *ovnkubeRunMode, ovnClientset *util
metrics.MetricOVNKubeControllerReadyDuration.Set(time.Since(startTime).Seconds())

<-ctx.Done()
networkControllerManager.Stop()
controllerManager.Stop()
}()
}

Expand All @@ -545,7 +545,7 @@ func runOvnKube(ctx context.Context, runMode *ovnkubeRunMode, ovnClientset *util
// register ovnkube node specific prometheus metrics exported by the node
metrics.RegisterNodeMetrics(ctx.Done())

nodeNetworkControllerManager, err := controllerManager.NewNodeNetworkControllerManager(
nodeControllerManager, err := controllermanager.NewNodeControllerManager(
ovnClientset,
watchFactory,
runMode.identity,
Expand All @@ -557,7 +557,7 @@ func runOvnKube(ctx context.Context, runMode *ovnkubeRunMode, ovnClientset *util
return
}

err = nodeNetworkControllerManager.Start(ctx)
err = nodeControllerManager.Start(ctx)
if err != nil {
nodeErr = fmt.Errorf("failed to start node network controller: %w", err)
return
Expand All @@ -567,7 +567,7 @@ func runOvnKube(ctx context.Context, runMode *ovnkubeRunMode, ovnClientset *util
metrics.MetricNodeReadyDuration.Set(time.Since(startTime).Seconds())

<-ctx.Done()
nodeNetworkControllerManager.Stop()
nodeControllerManager.Stop()
}()
}

Expand Down Expand Up @@ -656,7 +656,7 @@ func (p ovnkubeMetricsProvider) NewLeaderMetric() leaderelection.LeaderMetric {
return &leaderMetrics{p.runMode}
}

func networkControllerManagerLockName() string {
func controllerManagerLockName() string {
// keep the same old lock name unless we are owners of a specific zone
name := "ovn-kubernetes-master"
if config.Default.Zone != types.OvnDefaultZone {
Expand Down
2 changes: 1 addition & 1 deletion go-controller/hack/test-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function testrun {
}

# These packages requires root for network namespace manipulation in unit tests
root_pkgs=("github.com/ovn-org/ovn-kubernetes/go-controller/pkg/network-controller-manager" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/iptables" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/rulemanager" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/routemanager" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/vrfmanager" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/controllers/egressip")
root_pkgs=("github.com/ovn-org/ovn-kubernetes/go-controller/pkg/controllermanager" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/iptables" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/rulemanager" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/routemanager" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/vrfmanager" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/controllers/egressip")

# These packages are big and require more than the 10m default to run the unit tests
big_pkgs=("github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn")
Expand Down
19 changes: 19 additions & 0 deletions go-controller/hack/verify-go-mod-vendor.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -o errexit # Nozero exit code of any of the commands below will fail the test.
set -o nounset
set -o pipefail

HERE=$(dirname "$(readlink --canonicalize "$BASH_SOURCE")")
ROOT=$(readlink --canonicalize "$HERE/..")

echo "Checking that go mod / sum and vendor/ is correct"
cd "$ROOT/"
go mod tidy
go mod vendor
cd -
CHANGES=$(git status --porcelain)
if [ -n "$CHANGES" ] ; then
echo "ERROR: detected go mod / sum or vendor inconsistency after 'go mod tidy; go mod vendor':"
echo "$CHANGES"
exit 1
fi
Loading