Hello community, here is the log from the commit of package rook for openSUSE:Factory checked in at 2019-10-05 16:19:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rook (Old) and /work/SRC/openSUSE:Factory/.rook.new.2352 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rook" Sat Oct 5 16:19:33 2019 rev:8 rq:734599 version:1.1.1+git0.g9a2641a6 Changes: -------- --- /work/SRC/openSUSE:Factory/rook/rook.changes 2019-09-27 14:45:34.229213780 +0200 +++ /work/SRC/openSUSE:Factory/.rook.new.2352/rook.changes 2019-10-05 16:19:34.937550172 +0200 @@ -0,0 +1,18 @@ +------------------------------------------------------------------- +Wed Oct 2 09:03:08 UTC 2019 - Kristoffer Gronlund <[email protected]> + +- Force use of ceph kernel client driver (bsc#1152690) +- Add 0001-bsc-1152690-ceph-csi-Driver-will-fail-with-error.patch + +------------------------------------------------------------------------------- +Tue Oct 1 16:22:32 UTC 2019 - Blaine Gardner <[email protected]> + +- Define build shell as /bin/bash for usage of `=~` conditional (bsc#1152559) + +------------------------------------------------------------------------------- +Mon Sep 30 18:36:53 UTC 2019 - Blaine Gardner <[email protected]> + +- Fix csi-dummy-images.patch to work with Go linker's -X flag (bsc#1152559) + + update linker flags themselves to remove comments from flags + + add test to spec file to verify linker flags are working in future + @@ -4 +22 @@ -- Fix 2 improper RPM spec variable references in specfile +- Fix 2 improper RPM spec variable references in specfile (bsc#1151909) New: ---- 0001-bsc-1152690-ceph-csi-Driver-will-fail-with-error.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rook.spec ++++++ --- /var/tmp/diff_new_pack.lnR7aS/_old 2019-10-05 16:19:36.201546881 +0200 +++ /var/tmp/diff_new_pack.lnR7aS/_new 2019-10-05 16:19:36.213546850 +0200 @@ -40,6 +40,8 @@ Patch1: csi-template-paths.patch # Change the default FlexVolume dir path to support Kubic. Patch2: flexvolume-dir.patch +# Set option to force kernel driver usage in ceph-csi (bsc#1152690) +Patch3: 0001-bsc-1152690-ceph-csi-Driver-will-fail-with-error.patch %if 0%{?suse_version} # _insert_obs_source_lines_here @@ -54,6 +56,7 @@ # Rook requirements BuildRequires: curl BuildRequires: git +BuildRequires: grep # Ceph version is needed to set correct container tag in manifests BuildRequires: ceph @@ -124,6 +127,8 @@ ################################################################################ # The tasty, meaty build section ################################################################################ +%define _buildshell /bin/bash + %{go_nostrip} %{go_provides} @@ -134,6 +139,7 @@ %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 # determine image names to use in manifests depending on the base os type # %CEPH_VERSION% is replaced at build time by the _service @@ -150,14 +156,15 @@ %build -#we need to remove unsupported by Rook symbols from version +# we need to remove unsupported by Rook symbols from version version_parsed=%{version} +version_parsed="${version_parsed//[+]/-}" -linker_flags=( \ - \ # Set Rook version - absolutely required - "-X" "github.com/rook/rook/pkg/version.Version=${version_parsed//[+]/-}" \ - \ # CSI images only known at build time, so use a linker flag instead of patch - "-X" "github.com/rook/rook/pkg/operator/ceph/csi.DefaultCSIPluginImage=%{ceph_csi_image}" \ +linker_flags=( + # Set Rook version - absolutely required + "-X" "github.com/rook/rook/pkg/version.Version=$version_parsed" + # CSI images only known at build time, so use a linker flag instead of patch + "-X" "github.com/rook/rook/pkg/operator/ceph/csi.DefaultCSIPluginImage=%{ceph_csi_image}" ) build_flags=("-ldflags" "${linker_flags[*]}") @@ -206,6 +213,30 @@ cp -pr cluster/examples/kubernetes/ceph/* %{buildroot}%{_datadir}/k8s-yaml/rook/ceph/ ################################################################################ +# Check that linker flags are applied +################################################################################ +rook_bin="$rook_bin_location"rook + +# Check Rook version is set +bin_version="$("$rook_bin" version)" +version_parsed=%{version} +version_parsed="${version_parsed//[+]/-}" +if [[ ! "$bin_version" =~ "$version_parsed" ]]; then + echo "Rook version not set correctly!" + exit 1 +fi + +# Check Ceph CSI default image is set +if grep --binary --text dummy-value-that-should-be-replaced-at-link-time "$rook_bin"; then + echo "Default CSI image was not set!" + exit 1 +fi +if ! grep --binary --text "%{ceph_csi_image}" "$rook_bin"; then + echo "Default CSI image was set to wrong value!" + exit 1 +fi + +################################################################################ # Update manifests with images coming from Build Service ################################################################################ # set rook, ceph and ceph-csi container versions ++++++ 0001-bsc-1152690-ceph-csi-Driver-will-fail-with-error.patch ++++++ >From 2e3c909f525cffe9dd2c81bdc27b00fc95c71cac Mon Sep 17 00:00:00 2001 From: Stefan Haas <[email protected]> Date: Wed, 2 Oct 2019 10:42:57 +0200 Subject: [PATCH] bsc#1152690 - ceph-csi: Driver will fail with error Signed-off-by: Stefan Haas <[email protected]> (cherry picked from commit 5d52d65915eb73c94a8b2ad922b97ce609ca2d37) --- .../csi/template/cephfs/csi-cephfsplugin-provisioner-dep.yaml | 2 ++ .../csi/template/cephfs/csi-cephfsplugin-provisioner-sts.yaml | 2 ++ .../kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin.yaml | 2 ++ .../ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml | 2 ++ .../ceph/csi/template/rbd/csi-rbdplugin-provisioner-sts.yaml | 2 ++ .../kubernetes/ceph/csi/template/rbd/csi-rbdplugin.yaml | 2 ++ 6 files changed, 12 insertions(+) diff --git a/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner-dep.yaml b/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner-dep.yaml index fdba6063..85a7f987 100644 --- a/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner-dep.yaml +++ b/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner-dep.yaml @@ -67,6 +67,7 @@ spec: - "--metricsport=9091" - "--metricspath=/metrics" - "--enablegrpcmetrics={{ .EnableCSIGRPCMetrics }}" + - "--forcecephkernelclient=true" env: - name: POD_IP valueFrom: @@ -106,6 +107,7 @@ spec: - "--metricspath=/metrics" - "--polltime=60s" - "--timeout=3s" + - "--forcecephkernelclient=true" env: - name: CSI_ENDPOINT value: unix:///csi/csi-provisioner.sock diff --git a/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner-sts.yaml b/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner-sts.yaml index 9bef3f6d..9e72f044 100644 --- a/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner-sts.yaml +++ b/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner-sts.yaml @@ -62,6 +62,7 @@ spec: - "--metricsport=9091" - "--metricspath=/metrics" - "--enablegrpcmetrics={{ .EnableCSIGRPCMetrics }}" + - "--forcecephkernelclient=true" env: - name: POD_IP valueFrom: @@ -101,6 +102,7 @@ spec: - "--metricspath=/metrics" - "--polltime=60s" - "--timeout=3s" + - "--forcecephkernelclient=true" env: - name: CSI_ENDPOINT value: unix:///csi/csi-provisioner.sock diff --git a/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin.yaml b/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin.yaml index e6b2f168..f80195e4 100644 --- a/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin.yaml +++ b/cluster/examples/kubernetes/ceph/csi/template/cephfs/csi-cephfsplugin.yaml @@ -59,6 +59,7 @@ spec: - "--metricsport=9091" - "--metricspath=/metrics" - "--enablegrpcmetrics={{ .EnableCSIGRPCMetrics }}" + - "--forcecephkernelclient=true" env: - name: POD_IP valueFrom: @@ -106,6 +107,7 @@ spec: - "--metricspath=/metrics" - "--polltime=60s" - "--timeout=3s" + - "--forcecephkernelclient=true" env: - name: CSI_ENDPOINT value: unix:///csi/csi.sock diff --git a/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml b/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml index a49d86f7..b9d2bf8e 100644 --- a/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml +++ b/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml @@ -84,6 +84,7 @@ spec: - "--metricsport=9090" - "--metricspath=/metrics" - "--enablegrpcmetrics={{ .EnableCSIGRPCMetrics }}" + - "--forcecephkernelclient=true" env: - name: POD_IP valueFrom: @@ -127,6 +128,7 @@ spec: - "--metricspath=/metrics" - "--polltime=60s" - "--timeout=3s" + - "--forcecephkernelclient=true" env: - name: CSI_ENDPOINT value: unix:///csi/csi-provisioner.sock diff --git a/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin-provisioner-sts.yaml b/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin-provisioner-sts.yaml index 83cdb64d..06a2b185 100644 --- a/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin-provisioner-sts.yaml +++ b/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin-provisioner-sts.yaml @@ -77,6 +77,7 @@ spec: - "--metricsport=9090" - "--metricspath=/metrics" - "--enablegrpcmetrics={{ .EnableCSIGRPCMetrics }}" + - "--forcecephkernelclient=true" env: - name: POD_IP valueFrom: @@ -120,6 +121,7 @@ spec: - "--metricspath=/metrics" - "--polltime=60s" - "--timeout=3s" + - "--forcecephkernelclient=true" env: - name: CSI_ENDPOINT value: unix:///csi/csi-provisioner.sock diff --git a/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin.yaml b/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin.yaml index 932c2b18..4af4ff83 100644 --- a/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin.yaml +++ b/cluster/examples/kubernetes/ceph/csi/template/rbd/csi-rbdplugin.yaml @@ -59,6 +59,7 @@ spec: - "--metricsport=9090" - "--metricspath=/metrics" - "--enablegrpcmetrics={{ .EnableCSIGRPCMetrics }}" + - "--forcecephkernelclient=true" env: - name: POD_IP valueFrom: @@ -108,6 +109,7 @@ spec: - "--metricspath=/metrics" - "--polltime=60s" - "--timeout=3s" + - "--forcecephkernelclient=true" env: - name: CSI_ENDPOINT value: unix:///csi/csi.sock -- 2.23.0 ++++++ csi-dummy-images.patch ++++++ --- /var/tmp/diff_new_pack.lnR7aS/_old 2019-10-05 16:19:36.285546661 +0200 +++ /var/tmp/diff_new_pack.lnR7aS/_new 2019-10-05 16:19:36.285546661 +0200 @@ -1,13 +1,34 @@ diff --git a/pkg/operator/ceph/csi/spec.go b/pkg/operator/ceph/csi/spec.go -index 44f07f7e..bfdcd409 100644 +index 81491fde..327bd139 100644 --- a/pkg/operator/ceph/csi/spec.go +++ b/pkg/operator/ceph/csi/spec.go -@@ -72,7 +72,7 @@ const ( - provDeploymentSuppVersion = "14" - +@@ -66,17 +66,23 @@ var ( + ConfigKey = "csi-cluster-config-json" + ) + +-const ( +- KubeMinMajor = "1" +- KubeMinMinor = "13" +- provDeploymentSuppVersion = "14" +- ++// Specify default images as var instead of const so that they can be overridden with the Go ++// linker's -X flag. This allows users to easily build images with a different opinionated set of ++// images without having to specify them manually in charts/manifests which can make upgrades more ++// manually challenging. ++var ( // image names - DefaultCSIPluginImage = "quay.io/cephcsi/cephcsi:v1.2.0" + DefaultCSIPluginImage = "dummy-value-that-should-be-replaced-at-link-time" DefaultRegistrarImage = "quay.io/k8scsi/csi-node-driver-registrar:v1.1.0" DefaultProvisionerImage = "quay.io/k8scsi/csi-provisioner:v1.3.0" DefaultAttacherImage = "quay.io/k8scsi/csi-attacher:v1.2.0" + DefaultSnapshotterImage = "quay.io/k8scsi/csi-snapshotter:v1.2.0" ++) ++ ++const ( ++ KubeMinMajor = "1" ++ KubeMinMinor = "13" ++ provDeploymentSuppVersion = "14" + + // kubelet directory path + DefaultKubeletDirPath = "/var/lib/kubelet"
