Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update linstor server 1292 without patch #198

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions images/drbd-reactor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ ARG BASE_UBUNTU=registry.deckhouse.io/base_images/ubuntu:jammy-20240808@sha256:e
FROM $BASE_UBUNTU as utils-builder

ARG UTILS_GITREPO=https://github.com/LINBIT/drbd-utils
ARG UTILS_VERSION=9.28.0
ARG UTILS_VERSION=9.29.0

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get -y install build-essential debhelper git flex clitest xsltproc locales libxml2-utils po4a bash-completion docbook-xsl udev asciidoctor libkeyutils-dev \
&& apt-get -y install build-essential debhelper git flex clitest xsltproc locales libxml2-utils po4a bash-completion docbook-xsl udev asciidoctor libkeyutils-dev jq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -34,7 +34,7 @@ RUN dpkg-buildpackage -us -uc
FROM $BASE_UBUNTU as reactor-builder

ARG REACTOR_GITREPO=https://github.com/LINBIT/drbd-reactor
ARG REACTOR_VERSION=1.4.0
ARG REACTOR_VERSION=1.5.0

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
Expand Down
2 changes: 1 addition & 1 deletion images/linstor-affinity-controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG BASE_GOLANG_BULLSEYE=registry.deckhouse.io/base_images/golang:1.22.6-bullsey

FROM $BASE_GOLANG_BULLSEYE as builder
ARG LINSTOR_AFFINITY_CONTROLLER_GITREPO=https://github.com/piraeusdatastore/linstor-affinity-controller
ARG LINSTOR_AFFINITY_CONTROLLER_VERSION=0.3.0
ARG LINSTOR_AFFINITY_CONTROLLER_VERSION=1.1.0

RUN git clone ${LINSTOR_AFFINITY_CONTROLLER_GITREPO} /usr/local/go/linstor-affinity-controller \
&& cd /usr/local/go/linstor-affinity-controller \
Expand Down
4 changes: 2 additions & 2 deletions images/linstor-csi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ ARG BASE_GOLANG_BULLSEYE=registry.deckhouse.io/base_images/golang:1.22.6-bullsey

FROM $BASE_GOLANG_BULLSEYE as builder
ARG LINSTOR_CSI_GITREPO=https://github.com/linbit/linstor-csi
ARG LINSTOR_CSI_VERSION=98544cadb6d111d27a86a11ec07de91b99704b82
ARG LINSTOR_CSI_VERSION=1.6.3

# Copy patches
COPY ./patches /patches

RUN git clone ${LINSTOR_CSI_GITREPO} /usr/local/go/linstor-csi/ \
&& cd /usr/local/go/linstor-csi \
&& git reset --hard ${LINSTOR_CSI_VERSION} \
&& git reset --hard v${LINSTOR_CSI_VERSION} \
&& git apply /patches/*.patch \
&& cd cmd/linstor-csi \
&& go build -ldflags="-X github.com/piraeusdatastore/linstor-csi/pkg/driver.Version=v${LINSTOR_CSI_VERSION}" \
Expand Down
34 changes: 22 additions & 12 deletions images/linstor-csi/patches/new-csi-path.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
Subject: [PATCH] Fix csi path
---
Index: cmd/linstor-csi/linstor-csi.go
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/cmd/linstor-csi/linstor-csi.go b/cmd/linstor-csi/linstor-csi.go
index 20b09f5..8dac370 100644
--- a/cmd/linstor-csi/linstor-csi.go
+++ b/cmd/linstor-csi/linstor-csi.go
@@ -40,7 +40,7 @@ func main() {
--- a/cmd/linstor-csi/linstor-csi.go (revision 24ffba67ea151a0276bb418e65fd795b91779428)
+++ b/cmd/linstor-csi/linstor-csi.go (revision a0322d71ce98d92bdd4c357c9a366e149985dc5f)
@@ -42,7 +42,7 @@
var (
lsEndpoint = flag.String("linstor-endpoint", "", "Controller API endpoint for LINSTOR")
lsSkipTLSVerification = flag.Bool("linstor-skip-tls-verification", false, "If true, do not verify tls")
Expand All @@ -11,16 +17,20 @@ index 20b09f5..8dac370 100644
node = flag.String("node", "", "Node ID to pass to node service")
logLevel = flag.String("log-level", "info", "Enable debug log output. Choose from: panic, fatal, error, warn, info, debug")
rps = flag.Float64("linstor-api-requests-per-second", 0, "Maximum allowed number of LINSTOR API requests per second. Default: Unlimited")
Index: pkg/linstor/const.go
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/pkg/linstor/const.go b/pkg/linstor/const.go
index 8b732ec..d18e968 100644
--- a/pkg/linstor/const.go
+++ b/pkg/linstor/const.go
@@ -24,7 +24,7 @@ import (

--- a/pkg/linstor/const.go (revision 24ffba67ea151a0276bb418e65fd795b91779428)
+++ b/pkg/linstor/const.go (revision a0322d71ce98d92bdd4c357c9a366e149985dc5f)
@@ -24,7 +24,7 @@

const (
// DriverName is the name used in CSI calls for this driver.
- DriverName = "linstor.csi.linbit.com"
+ DriverName = "replicated.csi.storage.deckhouse.io"
// LegacyParameterPassKey is the Aux props key in linstor where serialized CSI parameters
// are stored.

// LinstorBackupKVName is the name of the KV store used to map L2L backups to local snapshot names
LinstorBackupKVName = "csi-backup-mapping"
29 changes: 11 additions & 18 deletions images/linstor-csi/patches/rename-linbit-labels.patch
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
From 110038fac54abe8f9d097d540c185a2a25eebb01 Mon Sep 17 00:00:00 2001
From: Viktor Kramarenko <[email protected]>
Date: Tue, 16 Apr 2024 14:33:47 +0300
Subject: [PATCH] Changed LinstorNodeKey and LinstorStoragePoolKeyPrefix
consts. Signed-off-by: Viktor Kramarenko <[email protected]>

Subject: [PATCH] linbit labels changes
---
pkg/topology/topology.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: pkg/topology/topology.go
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/pkg/topology/topology.go b/pkg/topology/topology.go
index c50d012..6dd92c5 100644
--- a/pkg/topology/topology.go
+++ b/pkg/topology/topology.go
@@ -47,11 +47,11 @@ const (
--- a/pkg/topology/topology.go (revision a0322d71ce98d92bdd4c357c9a366e149985dc5f)
+++ b/pkg/topology/topology.go (revision 4e4be7921b9e42f5f2ed155fc99014ac565e7f21)
@@ -47,11 +47,11 @@
const (
// LinstorNodeKey refers to a node running the LINSTOR csi node service
// and the linstor Satellite and is therefore capable of hosting LINSTOR volumes.
- LinstorNodeKey = "linbit.com/hostname"
+ LinstorNodeKey = "storage.deckhouse.io/sds-replicated-volume-hostname"

// LinstorStoragePoolKeyPrefix is the prefix used when specifying the available storage
// pools on a node via CSI topology keys.
- LinstorStoragePoolKeyPrefix = "linbit.com/sp-"
+ LinstorStoragePoolKeyPrefix = "storage.deckhouse.io/sds-replicated-volume-sp-"

// LinstorStoragePoolValue is the value assigned to the storage pool label, given that the node has access to the
// storage pool.
--
2.39.3 (Apple Git-145)

18 changes: 12 additions & 6 deletions images/linstor-csi/patches/requisites.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
Subject: [PATCH] Fix requisites
---
Index: pkg/linstor/highlevelclient/high_level_client.go
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/pkg/linstor/highlevelclient/high_level_client.go b/pkg/linstor/highlevelclient/high_level_client.go
index 645599c..2f7c3f9 100644
--- a/pkg/linstor/highlevelclient/high_level_client.go
+++ b/pkg/linstor/highlevelclient/high_level_client.go
@@ -27,7 +27,6 @@ import (
--- a/pkg/linstor/highlevelclient/high_level_client.go (revision 4e4be7921b9e42f5f2ed155fc99014ac565e7f21)
+++ b/pkg/linstor/highlevelclient/high_level_client.go (revision e825055f725e000f3630c26808d042a17bc47cfb)
@@ -27,7 +27,6 @@
"github.com/container-storage-interface/spec/lib/go/csi"

"github.com/piraeusdatastore/linstor-csi/pkg/linstor/util"
- "github.com/piraeusdatastore/linstor-csi/pkg/slice"
"github.com/piraeusdatastore/linstor-csi/pkg/topology"
"github.com/piraeusdatastore/linstor-csi/pkg/volume"
)
@@ -104,18 +103,8 @@ func (c *HighLevelClient) GetAllTopologyNodes(ctx context.Context, remoteAccessP
@@ -104,18 +103,8 @@
accessibleSegments = []map[string]string{{}}
}

Expand Down
23 changes: 10 additions & 13 deletions images/linstor-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG BASE_GOLANG_BULLSEYE=registry.deckhouse.io/base_images/golang:1.22.6-bullsey
FROM $BASE_UBUNTU as linstor-builder

ARG LINSTOR_GITREPO=https://github.com/LINBIT/linstor-server
ARG LINSTOR_VERSION=1.24.2
ARG LINSTOR_VERSION=1.29.2

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
Expand Down Expand Up @@ -43,9 +43,9 @@ RUN dpkg-buildpackage -us -uc
FROM $BASE_UBUNTU as client-builder

ARG API_GITREPO=https://github.com/LINBIT/linstor-api-py
ARG API_VERSION=1.19.0
ARG API_VERSION=1.23.1
ARG CLIENT_GITREPO=https://github.com/LINBIT/linstor-client
ARG CLIENT_VERSION=1.19.0
ARG CLIENT_VERSION=1.23.2
ARG LINSTOR_COMMON_SUBMODULE_COMMIT=999c3c0793376f88b891eb7ef3dc8f8bc9aa26ec

ENV DEBIAN_FRONTEND noninteractive
Expand All @@ -56,10 +56,7 @@ RUN apt-get update \

RUN git clone --recurse-submodules ${API_GITREPO} /linstor-api-py
WORKDIR /linstor-api-py
RUN git checkout v${API_VERSION}
WORKDIR /linstor-api-py/linstor-common
RUN git checkout ${LINSTOR_COMMON_SUBMODULE_COMMIT}
WORKDIR /linstor-api-py
RUN git checkout v${API_VERSION} && git submodule update --init --recursive
RUN make debrelease \
&& mv ./dist/python-linstor-${API_VERSION}.tar.gz ../python-linstor_$(echo ${API_VERSION} | tr '-' '~').orig.tar.gz \
&& tar -C / -xvf /python-linstor_$(echo ${API_VERSION} | tr '-' '~').orig.tar.gz
Expand All @@ -83,7 +80,7 @@ RUN dpkg-buildpackage -us -uc
FROM $BASE_GOLANG_BULLSEYE as k8s-await-election-builder

ARG K8S_AWAIT_ELECTION_GITREPO=https://github.com/LINBIT/k8s-await-election
ARG K8S_AWAIT_ELECTION_VERSION=0.3.1
ARG K8S_AWAIT_ELECTION_VERSION=0.4.1

RUN git clone ${K8S_AWAIT_ELECTION_GITREPO} /usr/local/go/k8s-await-election/ \
&& cd /usr/local/go/k8s-await-election \
Expand All @@ -96,11 +93,11 @@ RUN git clone ${K8S_AWAIT_ELECTION_GITREPO} /usr/local/go/k8s-await-election/ \
FROM $BASE_UBUNTU as utils-builder

ARG UTILS_GITREPO=https://github.com/LINBIT/drbd-utils
ARG UTILS_VERSION=9.28.0
ARG UTILS_VERSION=9.29.0

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get -y install build-essential debhelper git flex clitest xsltproc locales libxml2-utils po4a bash-completion docbook-xsl udev asciidoctor libkeyutils-dev \
&& apt-get -y install build-essential debhelper git flex clitest xsltproc locales libxml2-utils po4a bash-completion docbook-xsl udev asciidoctor libkeyutils-dev jq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -123,7 +120,7 @@ WORKDIR /drbd-utils-${UTILS_VERSION}
RUN dpkg-buildpackage -us -uc

ARG THIN_SEND_RECV_GITREPO=https://github.com/LINBIT/thin-send-recv
ARG THIN_SEND_RECV_VERSION=1.0.1
ARG THIN_SEND_RECV_VERSION=1.1.2

RUN git clone --recurse-submodules ${THIN_SEND_RECV_GITREPO} /thin-send-recv
WORKDIR /thin-send-recv
Expand All @@ -138,7 +135,7 @@ RUN dpkg-buildpackage -us -uc

FROM $BASE_UBUNTU
ARG PIRAEUS_GITREPO=https://github.com/piraeusdatastore/piraeus
ARG PIRAEUS_COMMIT_REF=20e96f83f52631dc06d011b7f96293d4026236a1
ARG PIRAEUS_COMMIT_REF=3bae14e03be62a756a7f1b767406e7e94f6d3bf3

COPY --from=linstor-builder /linstor-common_*.deb /linstor-controller_*.deb /linstor-satellite_*.deb /packages/
COPY --from=client-builder /python-linstor_*.deb /linstor-client_*.deb /packages/
Expand Down Expand Up @@ -189,7 +186,7 @@ RUN { echo 'APT::Install-Recommends "false";' ; echo 'APT::Install-Suggests "fal

# Install linstor-server
RUN apt-get update \
&& apt-get install -y default-jre-headless thin-provisioning-tools python3-all python3-natsort \
&& apt-get install -y default-jre-headless thin-provisioning-tools python3-all python3-natsort python3-setuptools \
&& dpkg -i packages/*.deb \
&& sed -i 's/usage-count yes;/usage-count no;/' /etc/drbd.d/global_common.conf \
&& apt-get clean \
Expand Down
2 changes: 1 addition & 1 deletion images/linstor-server/patches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ which lead to the disappearance of symlinks for LVM devices on a working system.
These issues commonly manifest during device resizing and deactivation,
causing LINSTOR exceptions when accessing DRBD super-block of volume.

- Upstream: https://github.com/LINBIT/linstor-server/pull/370
- Upstream: https://github.com/LINBIT/linstor-server/pull/370
Loading
Loading