Hello community,

here is the log from the commit of package ceph-csi for openSUSE:Factory 
checked in at 2019-10-05 16:20:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ceph-csi (Old)
 and      /work/SRC/openSUSE:Factory/.ceph-csi.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ceph-csi"

Sat Oct  5 16:20:08 2019 rev:5 rq:734629 version:1.2.0+git0.gc420ee6d

Changes:
--------
--- /work/SRC/openSUSE:Factory/ceph-csi/ceph-csi.changes        2019-09-26 
20:38:55.814911825 +0200
+++ /work/SRC/openSUSE:Factory/.ceph-csi.new.2352/ceph-csi.changes      
2019-10-05 16:20:12.889451347 +0200
@@ -0,0 +1,11 @@
+-------------------------------------------------------------------
+Wed Oct  2 13:38:40 UTC 2019 - Kristoffer Gronlund <kgronl...@suse.com>
+
+- Set Version when building (bsc#1152690)
+
+-------------------------------------------------------------------
+Tue Oct  1 15:24:36 UTC 2019 - Stefan Haas <stefan.h...@suse.com>
+
+- Add forcecephkernelclient as startup parameter (bsc#1152690)
+  * Add 0001-Added-forcecephkernelclient-as-startup-parameter-to-.patch
+

New:
----
  0001-Added-forcecephkernelclient-as-startup-parameter-to-.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ceph-csi.spec ++++++
--- /var/tmp/diff_new_pack.q167Ju/_old  2019-10-05 16:20:14.437447316 +0200
+++ /var/tmp/diff_new_pack.q167Ju/_new  2019-10-05 16:20:14.437447316 +0200
@@ -27,9 +27,13 @@
 Source0:        %{name}-%{version}.tar.xz
 Source98:       README
 Source99:       update-tarball.sh
+
+# bsc#1152690 - Added forcecephkernelclient as startup parameter
+Patch1:         0001-Added-forcecephkernelclient-as-startup-parameter-to-.patch
+
 %if 0%{?suse_version}
 # _insert_obs_source_lines_here
-ExclusiveArch:  x86_64 aarch64 ppc64le s390x
+ExclusiveArch:  x86_64 aarch64 ppc64 ppc64le
 %endif
 
 # Go and spec requirements
@@ -51,16 +55,33 @@
 
################################################################################
 # The tasty, meaty build section
 
################################################################################
+
+%define _buildshell /bin/bash
+
 %{go_nostrip}
 %{go_provides}
 
 %prep
 %setup -q -n %{name}
 
+%patch1 -p1
+
 %build
 %goprep github.com/ceph/ceph-csi
 export CGO_ENABLED=0
-%gobuild cmd  # builds a binary called 'cmd'
+
+# Make sure version contains parseable symbols
+version_parsed=%{version}
+version_parsed="${version_parsed//[+]/-}"
+git_commit_parsed="$(echo $version_parsed | sed 's/.*\.g\(.*\).*/\1/')"
+linker_flags=(
+    "-X" "github.com/ceph/ceph-csi/pkg/util.GitCommit=$git_commit_parsed"
+    "-X" "github.com/ceph/ceph-csi/pkg/util.DriverVersion=$version_parsed"
+)
+build_flags=("-ldflags" "${linker_flags[*]}")
+
+# builds a binary called 'cmd'
+%gobuild "${build_flags[@]}" cmd
 
 %install
 

++++++ 0001-Added-forcecephkernelclient-as-startup-parameter-to-.patch ++++++
>From 3bd68641812e24891a603e0cea1f25a60435a4c9 Mon Sep 17 00:00:00 2001
From: Stefan Haas <sh...@suse.com>
Date: Tue, 1 Oct 2019 16:23:40 +0200
Subject: [PATCH] Added forcecephkernelclient as startup parameter to force
 enabling ceph kernel clients for kernels < 4.17

Signed-off-by: Stefan Haas <sh...@suse.com>
---
 cmd/cephcsi.go              | 1 +
 pkg/cephfs/driver.go        | 2 +-
 pkg/cephfs/volumemounter.go | 4 ++--
 pkg/util/util.go            | 3 ++-
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/cmd/cephcsi.go b/cmd/cephcsi.go
index 82638b74..a9458c06 100644
--- a/cmd/cephcsi.go
+++ b/cmd/cephcsi.go
@@ -63,6 +63,7 @@ func init() {
 
        // cephfs related flags
        flag.StringVar(&conf.MountCacheDir, "mountcachedir", "", "mount info 
cache save dir")
+       flag.BoolVar(&conf.ForceKernelClient, "forcecephkernelclient", false, 
"enable Ceph Kernel clients on kernel < 4.17 which support quotas")
 
        // liveness/grpc metrics related flags
        flag.IntVar(&conf.MetricsPort, "metricsport", 8080, "TCP port for 
liveness/grpc metrics requests")
diff --git a/pkg/cephfs/driver.go b/pkg/cephfs/driver.go
index 56396507..260c49a9 100644
--- a/pkg/cephfs/driver.go
+++ b/pkg/cephfs/driver.go
@@ -95,7 +95,7 @@ func (fs *Driver) Run(conf *util.Config, cachePersister 
util.CachePersister) {
        // Configuration
        PluginFolder = conf.PluginPath
 
-       if err := loadAvailableMounters(); err != nil {
+       if err := loadAvailableMounters(conf); err != nil {
                klog.Fatalf("cephfs: failed to load ceph mounters: %v", err)
        }
 
diff --git a/pkg/cephfs/volumemounter.go b/pkg/cephfs/volumemounter.go
index a4833101..31845c20 100644
--- a/pkg/cephfs/volumemounter.go
+++ b/pkg/cephfs/volumemounter.go
@@ -49,7 +49,7 @@ var (
 
 // Load available ceph mounters installed on system into availableMounters
 // Called from driver.go's Run()
-func loadAvailableMounters() error {
+func loadAvailableMounters(conf *util.Config) error {
        // #nosec
        fuseMounterProbe := exec.Command("ceph-fuse", "--version")
        // #nosec
@@ -70,7 +70,7 @@ func loadAvailableMounters() error {
                if err != nil {
                        return err
                }
-               if majorVers >= 4 && minorVers >= 17 {
+               if conf.ForceKernelClient == true || majorVers >= 4 && 
minorVers >= 17 {
                        klog.Infof("loaded mounter: %s", volumeMounterKernel)
                        availableMounters = append(availableMounters, 
volumeMounterKernel)
                } else {
diff --git a/pkg/util/util.go b/pkg/util/util.go
index 08dc6e39..c7c1c832 100644
--- a/pkg/util/util.go
+++ b/pkg/util/util.go
@@ -63,7 +63,8 @@ type Config struct {
        PluginPath      string // location of cephcsi plugin
 
        // cephfs related flags
-       MountCacheDir string // mount info cache save dir
+       MountCacheDir     string // mount info cache save dir
+       ForceKernelClient bool   // force to use the ceph kernel client even if 
the kernel is < 4.17
 
        // metrics related flags
        MetricsPath       string        // path of prometheus endpoint where 
metrics will be available
-- 
2.23.0


Reply via email to