Recently ovn-kubernetes released a new stable version 1.1.0 [0]. A new stable release-1.1 branch was also created. In order to make sure recent OVN versions don't break the newest (stable) ovn-kubernetes versions use this new stable branch in our CI.
Due to the fact that ovn-kubernetes doesn't explicitly define a GO_VERSION variable (since [1]), some changes had to be made in the prepare.sh script we run before building the ovn-kubernetes image in our CI. We also had to: - install nftables in the container image as the newer version of ovn-kubernetes requires it - change the KIND_IPVx_SUPPORT variables with new ovn-kubernetes supported PLATFORM_IPVx_SUPPORT ones - explicitly disable interconnect mode (it became default in 1.1.0) to maintain the same tests we used to run before the bump (it's out of the scope of this patch to add new types of tests) - update the log collection step [0] https://github.com/orgs/ovn-kubernetes/discussions/5476 [1] https://github.com/ovn-kubernetes/ovn-kubernetes/commit/8025dac Signed-off-by: Dumitru Ceara <dce...@redhat.com> --- .ci/ovn-kubernetes/Dockerfile | 3 ++- .ci/ovn-kubernetes/prepare.sh | 13 ++++++++----- .github/workflows/ovn-kubernetes.yml | 11 +++++++---- TODO.rst | 7 +++++++ 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.ci/ovn-kubernetes/Dockerfile b/.ci/ovn-kubernetes/Dockerfile index 866272cfd6..4a7a41c79d 100644 --- a/.ci/ovn-kubernetes/Dockerfile +++ b/.ci/ovn-kubernetes/Dockerfile @@ -71,7 +71,8 @@ FROM fedora:$FEDORA_VERSION # install needed dependencies RUN INSTALL_PKGS=" \ - iptables iproute iputils hostname unbound-libs kubernetes-client kmod socat" && \ + iptables nftables iproute iputils hostname unbound-libs \ + kubernetes-client kmod socat" && \ dnf install --best --refresh -y --setopt=tsflags=nodocs $INSTALL_PKGS RUN mkdir -p /var/run/openvswitch diff --git a/.ci/ovn-kubernetes/prepare.sh b/.ci/ovn-kubernetes/prepare.sh index e0cc722ede..89ba1c5942 100755 --- a/.ci/ovn-kubernetes/prepare.sh +++ b/.ci/ovn-kubernetes/prepare.sh @@ -6,10 +6,13 @@ ovnk8s_path=$1 env_path=$2 topdir=$PWD -function extract_ci_var() { - local name=$1 +function extract_go_version() { + go mod edit -json go-controller/go.mod | jq -r .Go +} - grep "$name:" .github/workflows/test.yml | awk '{print $2}' | tr -d '"' +function extract_k8s_version() { + grep -E 'K8S_VERSION: v[0-9]\.[0-9\.]*$' .github/workflows/test.yml \ + | awk '{print $2}' | tr -d '"' } pushd ${ovnk8s_path} @@ -18,8 +21,8 @@ pushd ${ovnk8s_path} # ovn-kubernetes cloned repo, e.g., custom patches. # Set up the right GO_VERSION and K8S_VERSION. -echo "GO_VERSION=$(extract_ci_var GO_VERSION)" >> $env_path -echo "K8S_VERSION=$(extract_ci_var K8S_VERSION)" >> $env_path +echo "GO_VERSION=$(extract_go_version)" >> $env_path +echo "K8S_VERSION=$(extract_k8s_version)" >> $env_path # git apply --allow-empty is too new so not all git versions from major # distros support it, just check if the custom patch file is not empty diff --git a/.github/workflows/ovn-kubernetes.yml b/.github/workflows/ovn-kubernetes.yml index f061347bd9..66fcdae013 100644 --- a/.github/workflows/ovn-kubernetes.yml +++ b/.github/workflows/ovn-kubernetes.yml @@ -13,7 +13,7 @@ concurrency: cancel-in-progress: true env: - OVNKUBE_COMMIT: "release-1.0" + OVNKUBE_COMMIT: "release-1.1" KIND_CLUSTER_NAME: ovn KIND_INSTALL_INGRESS: true KIND_ALLOW_SYSTEM_WRITES: true @@ -96,11 +96,14 @@ jobs: KIND_INSTALL_METALLB: "${{ matrix.target == 'control-plane' }}" OVN_MULTICAST_ENABLE: "${{ matrix.target == 'control-plane' }}" OVN_EMPTY_LB_EVENTS: "${{ matrix.target == 'control-plane' }}" + # TODO: We have been testing only non-interconnect ovn-k8s jobs until + # now. Both modes should be tested in the future. + OVN_ENABLE_INTERCONNECT: "false" OVN_HA: "true" OVN_DISABLE_SNAT_MULTIPLE_GWS: "${{ matrix.disable-snat-multiple-gws == 'noSnatGW' }}" OVN_GATEWAY_MODE: "${{ matrix.gateway-mode }}" - KIND_IPV4_SUPPORT: "${{ matrix.ipfamily == 'IPv4' || matrix.ipfamily == 'dualstack' }}" - KIND_IPV6_SUPPORT: "${{ matrix.ipfamily == 'IPv6' || matrix.ipfamily == 'dualstack' }}" + PLATFORM_IPV4_SUPPORT: "${{ matrix.ipfamily == 'IPv4' || matrix.ipfamily == 'dualstack' }}" + PLATFORM_IPV6_SUPPORT: "${{ matrix.ipfamily == 'IPv6' || matrix.ipfamily == 'dualstack' }}" steps: - name: Check out ovn @@ -179,7 +182,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 working-directory: src/github.com/ovn-kubernetes/ovn-kubernetes - name: Upload logs diff --git a/TODO.rst b/TODO.rst index c50c666535..a9fe3ec4e8 100644 --- a/TODO.rst +++ b/TODO.rst @@ -170,3 +170,10 @@ OVN To-do List ovn\_synced\_logical_router and ovn\_synced\_logical\_switch. This will allow for the eventual removal of the ovn\_datapath structure from the codebase. + +* CI + + * ovn-kubernetes: Only a subset of the ovn-kubernetes features is currently + tested in GitHub CI. We should extend our testing to support + OVN_ENABLE_INTERCONNECT=true and potentially more of the CI lanes + ovn-kubernetes/ovn-kubernetes defines in its GitHub project. -- 2.50.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev