From 29f1aba3fc2f56ff62ccd22930a255d198cd3742 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 19 Dec 2023 09:32:16 +0100 Subject: [PATCH 1/3] build: use Go 1.21.5 The package k8s.io/kubernetes/pkg/features requires Go 1.21 now, so let's use that while building. Signed-off-by: Niels de Vos --- build.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.env b/build.env index e6f2f71e7b4..e8ea428d3af 100644 --- a/build.env +++ b/build.env @@ -19,7 +19,7 @@ BASE_IMAGE=quay.io/ceph/ceph:v18 CEPH_VERSION=reef # standard Golang options -GOLANG_VERSION=1.20.4 +GOLANG_VERSION=1.21.5 GO111MODULE=on # commitlint version From 24d6b5fe3fa9aa54a138a6ef91dede253902ee76 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 19 Dec 2023 10:03:45 +0100 Subject: [PATCH 2/3] build: create /etc/selinux/config in case it is missing Sometimes the Ceph container images seem to have a broken scriptlet while installing/updating Ceph packages. It is relatively common for them to fail when `/etc/selinux/config` does not exist. By ensuring the file directory and file exist (even if empty), the package installation or upgrades succeed. Signed-off-by: Niels de Vos --- deploy/cephcsi/image/Dockerfile | 2 ++ scripts/Dockerfile.devel | 2 ++ scripts/Dockerfile.test | 2 ++ 3 files changed, 6 insertions(+) diff --git a/deploy/cephcsi/image/Dockerfile b/deploy/cephcsi/image/Dockerfile index b829e9060d4..52c2462cf2a 100644 --- a/deploy/cephcsi/image/Dockerfile +++ b/deploy/cephcsi/image/Dockerfile @@ -10,6 +10,8 @@ FROM ${BASE_IMAGE} as updated_base RUN dnf config-manager --disable \ tcmu-runner,tcmu-runner-source,tcmu-runner-noarch,ceph-iscsi,ganesha || true +RUN mkdir /etc/selinux || true && touch /etc/selinux/config + RUN dnf -y update --nobest \ && dnf -y install nfs-utils \ && dnf clean all \ diff --git a/scripts/Dockerfile.devel b/scripts/Dockerfile.devel index ba6e9fb71bf..8ecbd243224 100644 --- a/scripts/Dockerfile.devel +++ b/scripts/Dockerfile.devel @@ -23,6 +23,8 @@ RUN source /build.env \ RUN dnf config-manager --disable \ tcmu-runner,tcmu-runner-source,tcmu-runner-noarch,ceph-iscsi,ganesha || true +RUN mkdir /etc/selinux || true && touch /etc/selinux/config + RUN dnf -y install \ git \ make \ diff --git a/scripts/Dockerfile.test b/scripts/Dockerfile.test index d54049e3823..5b03911c730 100644 --- a/scripts/Dockerfile.test +++ b/scripts/Dockerfile.test @@ -23,6 +23,8 @@ ENV \ COPY build.env / +RUN mkdir /etc/selinux || true && touch /etc/selinux/config + RUN source /build.env \ && \ ( test -n "${GOARCH}" && exit 0; echo -e "\n\nMissing GOARCH argument for building image, install Golang or run: make containerized-test GOARCH=amd64\n\n"; exit 1 ) \ From ba9c3d6f9f4053821f68a01e066f82b69da220e3 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 19 Dec 2023 11:25:55 +0100 Subject: [PATCH 3/3] ci: update golangci to 1.54 which supports Go 1.21 Signed-off-by: Niels de Vos --- build.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.env b/build.env index e8ea428d3af..dbce1fdb5e7 100644 --- a/build.env +++ b/build.env @@ -26,7 +26,7 @@ GO111MODULE=on COMMITLINT_VERSION=latest # static checks and linters -GOLANGCI_VERSION=v1.53.0 +GOLANGCI_VERSION=v1.54.1 # external snapshotter version # Refer: https://github.com/kubernetes-csi/external-snapshotter/releases