From patchwork Thu Dec 1 19:13:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1711127 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::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (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 4NNQzJ2ZFQz23nC for ; Fri, 2 Dec 2022 06:26:04 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 3175A82101; Thu, 1 Dec 2022 19:26:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3175A82101 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 yEG9PmrOyPSo; Thu, 1 Dec 2022 19:26:01 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 34FEF820F9; Thu, 1 Dec 2022 19:26:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 34FEF820F9 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0681EC0032; Thu, 1 Dec 2022 19:26:00 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4A2EAC002D for ; Thu, 1 Dec 2022 19:25:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 25CE161044 for ; Thu, 1 Dec 2022 19:25:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 25CE161044 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0z4t6GRvS-dJ for ; Thu, 1 Dec 2022 19:25:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 88DC760E42 Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [217.70.178.240]) by smtp3.osuosl.org (Postfix) with ESMTPS id 88DC760E42 for ; Thu, 1 Dec 2022 19:25:56 +0000 (UTC) Received: from relay11.mail.gandi.net (unknown [217.70.178.231]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 76104C5941 for ; Thu, 1 Dec 2022 19:13:11 +0000 (UTC) Received: (Authenticated sender: numans@ovn.org) by mail.gandi.net (Postfix) with ESMTPSA id 3602D100003; Thu, 1 Dec 2022 19:13:04 +0000 (UTC) From: numans@ovn.org To: dev@openvswitch.org Date: Thu, 1 Dec 2022 14:13:00 -0500 Message-Id: <20221201191300.1916743-1-numans@ovn.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221201191238.1916669-1-numans@ovn.org> References: <20221201191238.1916669-1-numans@ovn.org> MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn 1/2] CI: Add a couple of jobs using ovn-fake-multinode. 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" From: Numan Siddique This patch adds a couple of jobs using ovn-fake-multinode. It first builds 2 ovn-fake-multinode container images - one with OVN 22.03 - one with present main. The first job deploys ovn-fake-multinode with the main OVN and runs simple tests provided by ovn-fake-multinode [1]. The second job deploys ovn-fake-multinode setup with the central image using OVN 22.03 and chassis image using main OVN. This job tests the scenario - ovn-northd and OVN dbs are running the most recent LTS. - ovn-controller is running the latest commit from the branch. [1] - https://github.com/ovn-org/ovn-fake-multinode/blob/main/.ci/test_basic.sh Signed-off-by: Numan Siddique --- .../workflows/ovn-fake-multinode-tests.yml | 151 ++++++++++++++++++ Makefile.am | 1 + 2 files changed, 152 insertions(+) create mode 100644 .github/workflows/ovn-fake-multinode-tests.yml diff --git a/.github/workflows/ovn-fake-multinode-tests.yml b/.github/workflows/ovn-fake-multinode-tests.yml new file mode 100644 index 000000000..3727b9835 --- /dev/null +++ b/.github/workflows/ovn-fake-multinode-tests.yml @@ -0,0 +1,151 @@ +name: System tests using ovn-fake-multinode + +on: + push: + pull_request: + schedule: + # Run Sunday at midnight + - cron: '0 0 * * 0' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: true + +jobs: + build: + env: + RUNC_CMD: podman + OS_IMAGE: "fedora:36" + # https://github.com/actions/runner-images/issues/6282 + XDG_RUNTIME_DIR: '' + + name: Build ovn-fake-multinode image + runs-on: ubuntu-20.04 + steps: + - name: Check out ovn-fake-multi-node + uses: actions/checkout@v3 + with: + repository: 'ovn-org/ovn-fake-multinode' + path: 'ovn-fake-multinode' + ref: 'v0.1' + + - name: Check out ovn + uses: actions/checkout@v3 + with: + path: 'ovn-fake-multinode/ovn' + submodules: recursive + + - name: Check out ovs master + uses: actions/checkout@v3 + with: + path: 'ovn-fake-multinode/ovs' + repository: 'openvswitch/ovs' + ref: 'master' + + - name: Install dependencies + run: | + sudo apt update + sudo apt-get install -y podman + + - name: Build ovn-fake-multi-node main image + run: | + set -x + cd ovn-fake-multinode + sudo -E ./ovn_cluster.sh build + mkdir -p /tmp/_output + sudo podman save ovn/ovn-multi-node:latest > /tmp/_output/ovn_main_image.tar + + - name: Build ovn-fake-multi-node 22.03 image + run: | + set -x + cd ovn-fake-multinode/ovn + git fetch origin + git checkout -b branch-22.03 origin/branch-22.03 + git status + cd .. + sudo -E ./ovn_cluster.sh build + mkdir -p /tmp/_output + sudo podman tag ovn/ovn-multi-node:latest ovn/ovn-multi-node:22.03 + sudo podman save ovn/ovn-multi-node:22.03 > /tmp/_output/ovn_22_03_image.tar + + - uses: actions/upload-artifact@v3 + with: + name: test-main-image + path: /tmp/_output/ovn_main_image.tar + + - uses: actions/upload-artifact@v3 + with: + name: test-22-03-image + path: /tmp/_output/ovn_22_03_image.tar + + multinode-tests: + runs-on: ubuntu-20.04 + timeout-minutes: 120 + env: + RUNC_CMD: podman + OS_IMAGE: "fedora:36" + CENTRAL_IMAGE: ${{ matrix.cfg.central_image }} + ENABLE_SSL: no + # https://github.com/actions/runner-images/issues/6282 + XDG_RUNTIME_DIR: '' + + name: multinode tests ${{ join(matrix.cfg.*, ' ') }} + needs: [build] + strategy: + fail-fast: false + matrix: + cfg: + - { central_image: "ovn/ovn-multi-node:latest" } + - { central_image: "ovn/ovn-multi-node:22.03" } + + steps: + + - name: Free up disk space + run: sudo eatmydata apt-get remove --auto-remove -y aspnetcore-* dotnet-* libmono-* mono-* msbuild php-* php7* ghc-* zulu-* + + - uses: actions/download-artifact@v3 + with: + name: test-main-image + + - uses: actions/download-artifact@v3 + with: + name: test-22-03-image + + - name: Load podman image + run: | + sudo podman load --input ovn_main_image.tar + sudo podman load --input ovn_22_03_image.tar + + - name: Check out ovn-fake-multi-node + uses: actions/checkout@v3 + with: + repository: 'ovn-org/ovn-fake-multinode' + path: 'ovn-fake-multinode' + ref: 'v0.1' + + - name: Install dependencies + run: | + sudo apt update + sudo apt-get install -y podman openvswitch-switch + sudo systemctl start openvswitch-switch + sudo ovs-vsctl show + + - name: Start basic cluster + run: | + pwd + ls -l + cd ovn-fake-multinode + sudo -E ./ovn_cluster.sh start + sudo podman exec -it ovn-central ovn-nbctl show + sudo podman exec -it ovn-central ovn-appctl -t ovn-northd version + sudo podman exec -it ovn-chassis-1 ovn-appctl -t ovn-controller version + + - name: Run basic test script + run: | + cd ovn-fake-multinode + sudo ./.ci/test_basic.sh + + - name: Stop cluster + run: | + cd ovn-fake-multinode + sudo -E ./ovn_cluster.sh stop diff --git a/Makefile.am b/Makefile.am index 3b0df8393..6c3baa21c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -93,6 +93,7 @@ EXTRA_DIST = \ .ci/ovn-kubernetes/Dockerfile \ .github/workflows/test.yml \ .github/workflows/ovn-kubernetes.yml \ + .github/workflows/ovn-fake-multinode-tests.yml \ boot.sh \ $(MAN_FRAGMENTS) \ $(MAN_ROOTS) \