From patchwork Tue Dec 20 15:30:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dumitru Ceara X-Patchwork-Id: 1717943 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VkFxKdIa; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Nc0sR6mqCz23dG for ; Wed, 21 Dec 2022 02:31:07 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 2513C409D5; Tue, 20 Dec 2022 15:31:06 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2513C409D5 Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VkFxKdIa X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vj9af68OQP8Z; Tue, 20 Dec 2022 15:31:05 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 2E5A3409E9; Tue, 20 Dec 2022 15:31:04 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2E5A3409E9 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id DDA3DC0087; Tue, 20 Dec 2022 15:31:03 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3E5E9C0032 for ; Tue, 20 Dec 2022 15:31:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 5EC4481E82 for ; Tue, 20 Dec 2022 15:30:59 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5EC4481E82 Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VkFxKdIa X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S2wVle49lBZN for ; Tue, 20 Dec 2022 15:30:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 43A7F81CEF Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 43A7F81CEF for ; Tue, 20 Dec 2022 15:30:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671550257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2aWviixvNLdkWt4IaYlPEOGGZAQLxmsY/ae8v8wOo2o=; b=VkFxKdIa1yRNZOdTLSfLDekbE0c8PT2SMLkJejmctQpDpbid1QIEgFM/dn+JCBZ6OLGSXM xmzfiovtjO0BPt/xyOt/jAiwMw70NytdDkKPWggaf1E/oQ/i7oPpNSLwKwxXsXgjGJnZO4 4DKEAZaYbZF6wD+8vGdcHj4dvI1LMTE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-400-Qegi1HgvOvamaOSyGPFRsw-1; Tue, 20 Dec 2022 10:30:55 -0500 X-MC-Unique: Qegi1HgvOvamaOSyGPFRsw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 95CCD101A52E for ; Tue, 20 Dec 2022 15:30:55 +0000 (UTC) Received: from dceara.remote.csb (unknown [10.39.193.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1666F2026D4B for ; Tue, 20 Dec 2022 15:30:54 +0000 (UTC) From: Dumitru Ceara To: ovs-dev@openvswitch.org Date: Tue, 20 Dec 2022 16:30:51 +0100 Message-Id: <167155025006.1303384.5921929500779571556.stgit@dceara.remote.csb> In-Reply-To: <167155023961.1303384.11785606495489368108.stgit@dceara.remote.csb> References: <167155023961.1303384.11785606495489368108.stgit@dceara.remote.csb> User-Agent: StGit/0.23 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 1/2] .ci: ovn-kubernetes: Add a "prepare" stage to allow for custom actions. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" One example is to allow us to change the ovn-kubernetes code that decides what e2e tests are run. That's needed on older stable branches that don't support all the features that newer OVN versions do. Currently, on the main branch, there's no custom change required but on older branches (branch-22.09 -> branch-22.03) the affinity timeout related tests should be disabled because the OVN feature didn't exist there. An upcoming patch does that. Signed-off-by: Dumitru Ceara Acked-by: Ales Musil --- .ci/ovn-kubernetes/Dockerfile | 10 +++++++++- .ci/ovn-kubernetes/custom.patch | 0 .ci/ovn-kubernetes/prepare.sh | 20 ++++++++++++++++++++ .github/workflows/ovn-kubernetes.yml | 7 +++++++ Makefile.am | 2 ++ 5 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .ci/ovn-kubernetes/custom.patch create mode 100755 .ci/ovn-kubernetes/prepare.sh diff --git a/.ci/ovn-kubernetes/Dockerfile b/.ci/ovn-kubernetes/Dockerfile index e74b620be8..7edf86a13a 100644 --- a/.ci/ovn-kubernetes/Dockerfile +++ b/.ci/ovn-kubernetes/Dockerfile @@ -47,9 +47,17 @@ RUN GO111MODULE=on go install github.com/ovn-org/libovsdb/cmd/modelgen@${LIBOVSD # Clone OVN Kubernetes and build the binary based on the commit passed as argument WORKDIR /root RUN git clone https://github.com/ovn-org/ovn-kubernetes.git -WORKDIR /root/ovn-kubernetes/go-controller +WORKDIR /root/ovn-kubernetes RUN git checkout ${OVNKUBE_COMMIT} && git log -n 1 +# Copy the ovn-kubernetes scripts from the OVN sources and apply any +# custom changes if needed. +RUN mkdir -p /tmp/ovn/.ci/ovn-kubernetes +COPY .ci/ovn-kubernetes /tmp/ovn/.ci/ovn-kubernetes +WORKDIR /tmp/ovn +RUN .ci/ovn-kubernetes/prepare.sh /root/ovn-kubernetes + +WORKDIR /root/ovn-kubernetes/go-controller # Make sure we use the OVN NB/SB schema from the local code. COPY --from=ovnbuilder /tmp/ovn/ovn-nb.ovsschema pkg/nbdb/ovn-nb.ovsschema COPY --from=ovnbuilder /tmp/ovn/ovn-sb.ovsschema pkg/sbdb/ovn-sb.ovsschema diff --git a/.ci/ovn-kubernetes/custom.patch b/.ci/ovn-kubernetes/custom.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.ci/ovn-kubernetes/prepare.sh b/.ci/ovn-kubernetes/prepare.sh new file mode 100755 index 0000000000..8fc9652afd --- /dev/null +++ b/.ci/ovn-kubernetes/prepare.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -ev + +ovnk8s_path=$1 +topdir=$PWD + +pushd ${ovnk8s_path} + +# Add here any custom operations that need to performed on the +# ovn-kubernetes cloned repo, e.g., custom patches. + +# 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 +# before applying it. +[ -s ${topdir}/.ci/ovn-kubernetes/custom.patch ] && \ + git apply -v ${topdir}/.ci/ovn-kubernetes/custom.patch + +popd # ${ovnk8s_path} +exit 0 diff --git a/.github/workflows/ovn-kubernetes.yml b/.github/workflows/ovn-kubernetes.yml index 344937e53a..070d96bcb3 100644 --- a/.github/workflows/ovn-kubernetes.yml +++ b/.github/workflows/ovn-kubernetes.yml @@ -91,12 +91,19 @@ jobs: go-version: ${{ env.GO_VERSION }} id: go + - name: Check out ovn + uses: actions/checkout@v2 + - name: Check out ovn-kubernetes uses: actions/checkout@v3 with: path: src/github.com/ovn-org/ovn-kubernetes repository: ovn-org/ovn-kubernetes + - name: Prepare + run: | + .ci/ovn-kubernetes/prepare.sh src/github.com/ovn-org/ovn-kubernetes + - name: Set up environment run: | export GOPATH=$(go env GOPATH) diff --git a/Makefile.am b/Makefile.am index 3b0df83938..8c60d4a719 100644 --- a/Makefile.am +++ b/Makefile.am @@ -91,6 +91,8 @@ EXTRA_DIST = \ .ci/osx-build.sh \ .ci/osx-prepare.sh \ .ci/ovn-kubernetes/Dockerfile \ + .ci/ovn-kubernetes/prepare.sh \ + .ci/ovn-kubernetes/custom.patch \ .github/workflows/test.yml \ .github/workflows/ovn-kubernetes.yml \ boot.sh \