From 139586d92af48b66ca41c1b7b086f38813056d56 Mon Sep 17 00:00:00 2001 From: Dean Roehrich Date: Wed, 11 Oct 2023 14:23:29 -0500 Subject: [PATCH 1/9] Update DWS for controller-runtime 0.16.2 (#51) Signed-off-by: Dean Roehrich --- .gitmodules | 6 +++--- testsuite/submodules/dws | 2 +- testsuite/submodules/dws-test-driver | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index 2997528..0544560 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ [submodule "testsuite/submodules/slurm-docker-cluster"] path = testsuite/submodules/slurm-docker-cluster url = git@github.com:DataWorkflowServices/slurm-docker-cluster.git -[submodule "testsuite/submodules/dws-test-driver"] - path = testsuite/submodules/dws-test-driver - url = git@github.com:DataWorkflowServices/dws-test-driver.git [submodule "testsuite/submodules/dws"] path = testsuite/submodules/dws url = git@github.com:DataWorkflowServices/dws.git +[submodule "testsuite/submodules/dws-test-driver"] + path = testsuite/submodules/dws-test-driver + url = git@github.com:DataWorkflowServices/dws-test-driver.git diff --git a/testsuite/submodules/dws b/testsuite/submodules/dws index 8aa0d9d..b6d65b0 160000 --- a/testsuite/submodules/dws +++ b/testsuite/submodules/dws @@ -1 +1 @@ -Subproject commit 8aa0d9dd2c6942f1c3588d5bb758358083886ca2 +Subproject commit b6d65b00cad695f91e319d55cd8d8f0b26455329 diff --git a/testsuite/submodules/dws-test-driver b/testsuite/submodules/dws-test-driver index 96d2a0e..e0ada95 160000 --- a/testsuite/submodules/dws-test-driver +++ b/testsuite/submodules/dws-test-driver @@ -1 +1 @@ -Subproject commit 96d2a0e548efd40d63d0cfb6fe14c394863827b6 +Subproject commit e0ada95fe6364690b4361b57be3fff23b0d2199a From e3485e77695167599bb6469258d6b78e7657013a Mon Sep 17 00:00:00 2001 From: Dean Roehrich Date: Mon, 23 Oct 2023 13:54:25 -0500 Subject: [PATCH 2/9] Move to cert-manager 1.13.1 (#52) Cert-manager 1.12.0 and 1.13.0 were big releases. It's time to catch up. Signed-off-by: Dean Roehrich --- testsuite/integration/kind/kind.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/integration/kind/kind.sh b/testsuite/integration/kind/kind.sh index d27fe89..adcfb11 100755 --- a/testsuite/integration/kind/kind.sh +++ b/testsuite/integration/kind/kind.sh @@ -52,7 +52,7 @@ install_dependencies () { # Pull cert-manager into the local cache and push into KIND. Sometimes # the KIND env cannot pull it from upstream. - CERTVER=v1.11.1 + CERTVER=v1.13.1 for part in controller webhook cainjector do image=quay.io/jetstack/cert-manager-$part:$CERTVER From ce2ad32a2692231dae79c03701f5410dc645971c Mon Sep 17 00:00:00 2001 From: Kevin Pelzel Date: Wed, 1 Nov 2023 09:56:44 -0600 Subject: [PATCH 3/9] Check for nil home directory (#53) If the slurm users home directory is nil then the dir_exists function will fail. We encountered this while running slurmctl as root. log output: `error: /etc/slurm/burst_buffer.lua: /etc/slurm/burst_buffer.lua:407: attempt to concatenate a nil value (local 'dname')` Signed-off-by: Kevin Pelzel --- src/burst_buffer/burst_buffer.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/burst_buffer/burst_buffer.lua b/src/burst_buffer/burst_buffer.lua index 3667547..7b2d74e 100644 --- a/src/burst_buffer/burst_buffer.lua +++ b/src/burst_buffer/burst_buffer.lua @@ -406,6 +406,9 @@ end function DWS:kubectl_cache_home() local dir_exists = function(dname) + if dname == nil or dname == '' then + return false + end local cmd = "test -d " .. dname local done, _ = self:io_popen(cmd) return done From e4f73f1f0e755ff7b795d1e27495c41830d70382 Mon Sep 17 00:00:00 2001 From: Dean Roehrich Date: Wed, 1 Nov 2023 15:28:46 -0500 Subject: [PATCH 4/9] Update the project for kubebuilder go/v4 layout (#54) Change the layout to follow the Standard Go Project Layout, as described in https://book.kubebuilder.io/migration/v3vsv4. This allows newer releases of kubebuilder to be used with this repo Signed-off-by: Dean Roehrich --- testsuite/submodules/dws | 2 +- testsuite/submodules/dws-test-driver | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/submodules/dws b/testsuite/submodules/dws index b6d65b0..13a5a69 160000 --- a/testsuite/submodules/dws +++ b/testsuite/submodules/dws @@ -1 +1 @@ -Subproject commit b6d65b00cad695f91e319d55cd8d8f0b26455329 +Subproject commit 13a5a69a969e165650de6bce7a2cb4a0cac0c55c diff --git a/testsuite/submodules/dws-test-driver b/testsuite/submodules/dws-test-driver index e0ada95..22613e5 160000 --- a/testsuite/submodules/dws-test-driver +++ b/testsuite/submodules/dws-test-driver @@ -1 +1 @@ -Subproject commit e0ada95fe6364690b4361b57be3fff23b0d2199a +Subproject commit 22613e5caf4d8bc9e65b1a2f0fb39a5cfe82ed31 From 75041a1a2b7bf0e27be07730e262282e76a0300e Mon Sep 17 00:00:00 2001 From: Kevin Pelzel Date: Thu, 14 Mar 2024 12:25:53 -0500 Subject: [PATCH 5/9] add targetarch and targetos to dockerfile --- testsuite/integration/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testsuite/integration/Dockerfile b/testsuite/integration/Dockerfile index d400ad9..96fcbc2 100644 --- a/testsuite/integration/Dockerfile +++ b/testsuite/integration/Dockerfile @@ -2,6 +2,9 @@ FROM rockylinux:9 AS testbase COPY requirements.txt /requirements.txt +ARG TARGETARCH +ARG TARGETOS + RUN sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/rocky* && \ sed -i 's|^#baseurl=|baseurl=|' /etc/yum.repos.d/rocky* @@ -13,7 +16,7 @@ RUN yum update -y && \ dnf check-update && \ dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo && \ dnf install -y docker-ce-cli && \ - curl -k -LO "https://dl.k8s.io/release/$(curl -k -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \ + curl -k -LO "https://dl.k8s.io/release/$(curl -k -L -s https://dl.k8s.io/release/stable.txt)/bin/${TARGETOS}/${TARGETARCH}/kubectl" && \ install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \ pip install -r requirements.txt From d417fd769e796285588d315be00037a87a5fd4da Mon Sep 17 00:00:00 2001 From: Dean Roehrich Date: Fri, 15 Mar 2024 16:45:45 -0500 Subject: [PATCH 6/9] Use 'kubectl config' to edit kubeconfig file Edit the server line in the kubeconfig file by using the `kubectl config set-server` command. I recently updated my yq(1) and the new one no longer works as this code expected. So, switch to kubectl for this work; it specifically has a function to do this anyway. Signed-off-by: Dean Roehrich --- testsuite/integration/kind/kind.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/integration/kind/kind.sh b/testsuite/integration/kind/kind.sh index adcfb11..e529c38 100755 --- a/testsuite/integration/kind/kind.sh +++ b/testsuite/integration/kind/kind.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -# Copyright 2022-2023 Hewlett Packard Enterprise Development LP +# Copyright 2022-2024 Hewlett Packard Enterprise Development LP # Other additional copyright holders may be indicated within. # # The entirety of this work is licensed under the Apache License, @@ -71,7 +71,7 @@ install_dependencies () { prep_kubeconfig () { set -e cp ~/.kube/config kubeconfig - yq -i e '(.clusters | map(select(.name=="kind-dws")))[0].cluster.server |= "https://dws-control-plane:6443"' kubeconfig + KUBECONFIG=kubeconfig kubectl config set-cluster kind-dws --server https://dws-control-plane:6443 chmod a+r kubeconfig KUBECONFIG=kubeconfig kubectl config use-context kind-dws KUBECONFIG=kubeconfig kubectl config set-context --current --namespace=slurm From 8ce225c262e16213ccd1f24e0578ec9bf5fe45a8 Mon Sep 17 00:00:00 2001 From: Dean Roehrich Date: Mon, 18 Mar 2024 15:49:18 -0500 Subject: [PATCH 7/9] Upgrade the python docker library Upgrade the python docker library to address some bit rot that has been preventing the Integration Test workflow from succeeding. Upgrade a few other libs while I'm here. Remove the incorrect use of cache_from in the docker-compose.yml files. Signed-off-by: Dean Roehrich --- testsuite/integration/docker-compose.yml | 8 ++++---- testsuite/integration/requirements.txt | 8 ++++---- testsuite/integration/slurm/docker-compose.yml | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/testsuite/integration/docker-compose.yml b/testsuite/integration/docker-compose.yml index 463e1f5..3715a69 100644 --- a/testsuite/integration/docker-compose.yml +++ b/testsuite/integration/docker-compose.yml @@ -1,5 +1,5 @@ # -# Copyright 2022 Hewlett Packard Enterprise Development LP +# Copyright 2022-2024 Hewlett Packard Enterprise Development LP # Other additional copyright holders may be indicated within. # # The entirety of this work is licensed under the Apache License, @@ -24,8 +24,8 @@ services: image: local/integration-test:${TAG:-test} build: context: . - cache_from: - - "/tmp/.buildx-cache" + # cache_from: + # - local/integration-test:test container_name: integration-test privileged: true hostname: integration-test @@ -40,4 +40,4 @@ services: networks: default: name: slurm_default - external: true \ No newline at end of file + external: true diff --git a/testsuite/integration/requirements.txt b/testsuite/integration/requirements.txt index 3411ce5..a9d705a 100644 --- a/testsuite/integration/requirements.txt +++ b/testsuite/integration/requirements.txt @@ -1,6 +1,6 @@ pytest == 7 pytest-bdd == 6 -pytest-html == 3 -docker == 6 -kubernetes >= 25.3 -tenacity == 8 \ No newline at end of file +pytest-html == 4 +docker == 7 +kubernetes >= 27.2 +tenacity == 8 diff --git a/testsuite/integration/slurm/docker-compose.yml b/testsuite/integration/slurm/docker-compose.yml index 1d378b6..c66e57c 100644 --- a/testsuite/integration/slurm/docker-compose.yml +++ b/testsuite/integration/slurm/docker-compose.yml @@ -1,5 +1,5 @@ # -# Copyright 2022 Hewlett Packard Enterprise Development LP +# Copyright 2022-2024 Hewlett Packard Enterprise Development LP # Other additional copyright holders may be indicated within. # # The entirety of this work is licensed under the Apache License, @@ -57,8 +57,8 @@ services: context: ../../submodules/slurm-docker-cluster args: SLURM_TAG: ${SLURM_TAG:-slurm-22-05-4-1} - cache_from: - - "/tmp/.buildx-cache" + #cache_from: + # - slurm-bb:slurm-22-05-4-1 command: ["slurmctld"] container_name: slurmctld hostname: slurmctld From 11141ce1850084d547affb7e882ad32ada23a146 Mon Sep 17 00:00:00 2001 From: Dean Roehrich Date: Thu, 21 Mar 2024 14:59:36 -0500 Subject: [PATCH 8/9] Update submodules (#59) Update the submodules to their latest master/main. Fix the build of dws-test-driver. The resulting pod, with the new docker desktop, was sensitive to its container URL. (I did not dig deeper.) Signed-off-by: Dean Roehrich --- testsuite/integration/Makefile | 6 +++--- testsuite/submodules/dws | 2 +- testsuite/submodules/dws-test-driver | 2 +- testsuite/submodules/slurm-docker-cluster | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/testsuite/integration/Makefile b/testsuite/integration/Makefile index 3c7cb6b..8f6b351 100644 --- a/testsuite/integration/Makefile +++ b/testsuite/integration/Makefile @@ -1,5 +1,5 @@ # -# Copyright 2022-2023 Hewlett Packard Enterprise Development LP +# Copyright 2022-2024 Hewlett Packard Enterprise Development LP # Other additional copyright holders may be indicated within. # # The entirety of this work is licensed under the Apache License, @@ -50,8 +50,8 @@ setup-dws-test-driver: @{\ set -e ; \ cd ../submodules/dws-test-driver ; \ - docker buildx build -t local/dws-test-driver:test --load . ; \ - IMAGE_TAG_BASE=local/dws-test-driver VERSION=test KIND_CLUSTER=dws make kind-push deploy ; \ + docker buildx build -t ghcr.io/dataworkflowservices/dws-test-driver:local-test --load . ; \ + VERSION=local-test KIND_CLUSTER=dws make kind-push deploy ; \ kubectl wait deployment --timeout=60s -n dws-test-system dws-test-driver-controller-manager --for condition=Available=True ; \ } diff --git a/testsuite/submodules/dws b/testsuite/submodules/dws index 13a5a69..a7bbb79 160000 --- a/testsuite/submodules/dws +++ b/testsuite/submodules/dws @@ -1 +1 @@ -Subproject commit 13a5a69a969e165650de6bce7a2cb4a0cac0c55c +Subproject commit a7bbb79f5e4c5e299d7ddf8ccc17e18def06432f diff --git a/testsuite/submodules/dws-test-driver b/testsuite/submodules/dws-test-driver index 22613e5..fbb2944 160000 --- a/testsuite/submodules/dws-test-driver +++ b/testsuite/submodules/dws-test-driver @@ -1 +1 @@ -Subproject commit 22613e5caf4d8bc9e65b1a2f0fb39a5cfe82ed31 +Subproject commit fbb29445712444a363a3800655807ce8f202add1 diff --git a/testsuite/submodules/slurm-docker-cluster b/testsuite/submodules/slurm-docker-cluster index 4539462..0523947 160000 --- a/testsuite/submodules/slurm-docker-cluster +++ b/testsuite/submodules/slurm-docker-cluster @@ -1 +1 @@ -Subproject commit 453946243abac3b780e5fd1684107f7c12e2f863 +Subproject commit 052394799207641c5e4a83255e844de80210a80a From 0fc8d09e8d58e36c1b106826b5054675648e4314 Mon Sep 17 00:00:00 2001 From: Dean Roehrich Date: Thu, 21 Mar 2024 16:54:48 -0500 Subject: [PATCH 9/9] Update to DWS v0.0.19 and dws-test-driver v0.0.4 Signed-off-by: Dean Roehrich --- testsuite/submodules/dws | 2 +- testsuite/submodules/dws-test-driver | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/submodules/dws b/testsuite/submodules/dws index a7bbb79..2a48f6b 160000 --- a/testsuite/submodules/dws +++ b/testsuite/submodules/dws @@ -1 +1 @@ -Subproject commit a7bbb79f5e4c5e299d7ddf8ccc17e18def06432f +Subproject commit 2a48f6be482d01cf8f0efe6e8f60644c2f8620a7 diff --git a/testsuite/submodules/dws-test-driver b/testsuite/submodules/dws-test-driver index fbb2944..4af9238 160000 --- a/testsuite/submodules/dws-test-driver +++ b/testsuite/submodules/dws-test-driver @@ -1 +1 @@ -Subproject commit fbb29445712444a363a3800655807ce8f202add1 +Subproject commit 4af9238df42a8b217279e9fe773119779abb9e76