Skip to content

Commit

Permalink
LINSTOR release
Browse files Browse the repository at this point in the history
Signed-off-by: Ronan Abhamon <[email protected]>
  • Loading branch information
Wescoeur committed Oct 3, 2024
1 parent d602e15 commit 1ce9275
Show file tree
Hide file tree
Showing 178 changed files with 20,148 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 705a6d9deed2ba862577681fc54df144060f3816 Mon Sep 17 00:00:00 2001
From: Mark Syms <[email protected]>
Date: Thu, 20 May 2021 17:40:06 +0100
Subject: [PATCH 01/23] backport of ccd121cc248d79b749a63d4ad099e6d5f4b8b588:
Subject: [PATCH 001/177] backport of ccd121cc248d79b749a63d4ad099e6d5f4b8b588:
CA-354692: check for device parameter in create/probe calls

Signed-off-by: Mark Syms <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From fd898b82d880619f0acd9d1b8f1d55b3967bc339 Mon Sep 17 00:00:00 2001
From: Samuel Verschelde <[email protected]>
Date: Thu, 13 Aug 2020 15:22:17 +0200
Subject: [PATCH 02/23] Update xs-sm.service's description for XCP-ng
Subject: [PATCH 002/177] Update xs-sm.service's description for XCP-ng

This was a patch added to the sm RPM git repo before we had this
forked git repo for sm in the xcp-ng github organisation.
Expand Down
2 changes: 1 addition & 1 deletion SOURCES/0003-Add-TrueNAS-multipath-config.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From bd709621897bda8d9f14820fb3d52eecfe51facb Mon Sep 17 00:00:00 2001
From: Samuel Verschelde <[email protected]>
Date: Thu, 13 Aug 2020 15:26:43 +0200
Subject: [PATCH 03/23] Add TrueNAS multipath config
Subject: [PATCH 003/177] Add TrueNAS multipath config

This was a patch added to the sm RPM git repo before we had this
forked git repo for sm in the xcp-ng github organisation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 574897552a11af6fc92e145df0bacb42a2ac6b53 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <[email protected]>
Date: Mon, 20 Jul 2020 16:26:42 +0200
Subject: [PATCH 04/23] feat(drivers): add CephFS, GlusterFS and XFS drivers
Subject: [PATCH 004/177] feat(drivers): add CephFS, GlusterFS and XFS drivers

---
Makefile | 3 +
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 3a948fe3ff75146c3a9c960768ca4791c109a6b6 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <[email protected]>
Date: Wed, 12 Aug 2020 11:14:33 +0200
Subject: [PATCH 05/23] feat(drivers): add ZFS driver to avoid losing VDI
Subject: [PATCH 005/177] feat(drivers): add ZFS driver to avoid losing VDI
metadata (xcp-ng/xcp#401)

---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
From 8b1962f5d6d8b092525e94241df033e4a78872b1 Mon Sep 17 00:00:00 2001
From: Samuel Verschelde <[email protected]>
Date: Thu, 13 Aug 2020 17:10:12 +0200
Subject: [PATCH 06/23] Re-add the ext4 driver for users who need to transition
Subject: [PATCH 006/177] Re-add the ext4 driver for users who need to
transition

The driver is needed to transition to the ext driver.
Users who upgrade from XCP-ng <= 8.0 need a working driver so that they
Expand Down
2 changes: 1 addition & 1 deletion SOURCES/0007-feat-drivers-add-LinstorSR-driver.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 9b836e9e503354796a7f975bb44f10a0920f33e3 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <[email protected]>
Date: Mon, 16 Mar 2020 15:39:44 +0100
Subject: [PATCH 07/23] feat(drivers): add LinstorSR driver
Subject: [PATCH 007/177] feat(drivers): add LinstorSR driver

Some important points:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From c756b29ce80da0cd38f88bbaaddf4e1130962af9 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <[email protected]>
Date: Tue, 27 Oct 2020 15:04:36 +0100
Subject: [PATCH 08/23] feat(tests): add unit tests concerning ZFS (close
Subject: [PATCH 008/177] feat(tests): add unit tests concerning ZFS (close
xcp-ng/xcp#425)

- Check if "create" doesn't succeed without zfs packages
Expand Down
2 changes: 1 addition & 1 deletion SOURCES/0009-If-no-NFS-ACLs-provided-assume-everyone.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From c4402ded6d0dd748435c621c7d7840cb7886bc3f Mon Sep 17 00:00:00 2001
From: BenjiReis <[email protected]>
Date: Thu, 25 Feb 2021 09:54:52 +0100
Subject: [PATCH 09/23] If no NFS ACLs provided, assume everyone:
Subject: [PATCH 009/177] If no NFS ACLs provided, assume everyone:

Some QNAP devices do not provide ACL when fetching NFS mounts.
In this case the assumed ACL should be: "*".
Expand Down
2 changes: 1 addition & 1 deletion SOURCES/0010-Added-SM-Driver-for-MooseFS.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From ba6e2bace64965d7d9f89e6dd9a94bf22ae075a2 Mon Sep 17 00:00:00 2001
From: Aleksander Wieliczko <[email protected]>
Date: Fri, 29 Jan 2021 15:21:23 +0100
Subject: [PATCH 10/23] Added SM Driver for MooseFS
Subject: [PATCH 010/177] Added SM Driver for MooseFS

Co-authored-by: Piotr Robert Konopelko <[email protected]>
Signed-off-by: Aleksander Wieliczko <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From dc7619735961b1fc0b7075cdc02ba375b76aa011 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <[email protected]>
Date: Thu, 2 Dec 2021 09:28:37 +0100
Subject: [PATCH 11/23] Avoid usage of `umount` in `ISOSR` when `legacy_mode`
Subject: [PATCH 011/177] Avoid usage of `umount` in `ISOSR` when `legacy_mode`
is used

`umount` should not be called when `legacy_mode` is enabled, otherwise a mounted dir
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From a1341e33251ec40a12e0971ffeda8b935af0be93 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <[email protected]>
Date: Wed, 18 May 2022 17:28:09 +0200
Subject: [PATCH 12/23] MooseFS SR uses now UUID subdirs for each SR
Subject: [PATCH 012/177] MooseFS SR uses now UUID subdirs for each SR

A sm-config boolean param `subdir` is available to configure where to store the VHDs:
- In a subdir with the SR UUID, the new behavior
Expand Down
2 changes: 1 addition & 1 deletion SOURCES/0013-Fix-is_open-call-for-many-drivers-25.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 58c1e5a82d1b943a94a1524e52fd8bf43e916e3e Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <[email protected]>
Date: Thu, 23 Jun 2022 10:36:36 +0200
Subject: [PATCH 13/23] Fix is_open call for many drivers (#25)
Subject: [PATCH 013/177] Fix is_open call for many drivers (#25)

Ensure all shared drivers are imported in `_is_open` definition to register
them in the driver list. Otherwise this function always fails with a SRUnknownType exception.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 9d45a0e68acbcaec82a36c74f91dfa176b4fc7bf Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <[email protected]>
Date: Thu, 23 Jun 2022 10:37:07 +0200
Subject: [PATCH 14/23] Remove SR_CACHING capability for many SR types (#24)
Subject: [PATCH 014/177] Remove SR_CACHING capability for many SR types (#24)

SR_CACHING offers the capacity to use IntelliCache, but this
feature is only available using NFS SR.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From ee2433b00bea733c8ec0d294ffb476e04e7e5bdb Mon Sep 17 00:00:00 2001
From: BenjiReis <[email protected]>
Date: Fri, 4 Aug 2023 12:10:08 +0200
Subject: [PATCH 15/23] Remove `SR_PROBE` from ZFS capabilities (#37)
Subject: [PATCH 015/177] Remove `SR_PROBE` from ZFS capabilities (#37)

The probe method is not implemented so we
shouldn't advertise it.
Expand Down
2 changes: 1 addition & 1 deletion SOURCES/0016-Fix-vdi-ref-when-static-vdis-are-used.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From a14e7dbb656f0c722e85cacf4ad658695e086502 Mon Sep 17 00:00:00 2001
From: Guillaume <[email protected]>
Date: Wed, 16 Aug 2023 13:42:21 +0200
Subject: [PATCH 16/23] Fix vdi-ref when static vdis are used
Subject: [PATCH 016/177] Fix vdi-ref when static vdis are used

When static vdis are used there is no snapshots and we don't want to
call method from XAPI.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 1cf0c93a4e8c1de3688115954a8d4a8d4c25830d Mon Sep 17 00:00:00 2001
From: Samuel Verschelde <[email protected]>
Date: Fri, 27 Jan 2023 12:03:15 +0100
Subject: [PATCH 17/23] Tell users not to edit multipath.conf directly
Subject: [PATCH 017/177] Tell users not to edit multipath.conf directly

This file is meant to remain unchanged and regularly updated along with
the SM component. Users can create a custom configuration file in
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From c8e7d59b6c9b68f9e5ef89d0ad87c157bb35c736 Mon Sep 17 00:00:00 2001
From: Samuel Verschelde <[email protected]>
Date: Fri, 27 Jan 2023 12:23:13 +0100
Subject: [PATCH 18/23] Add custom.conf multipath configuration file
Subject: [PATCH 018/177] Add custom.conf multipath configuration file

Meant to be installed as /etc/multipath/conf.d/custom.conf for users
to have an easy entry point for editing, as well as information on what
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 81b847dca6a48d73936592820a1a7b88ae1ff5cc Mon Sep 17 00:00:00 2001
From: Samuel Verschelde <[email protected]>
Date: Fri, 25 Aug 2023 17:47:34 +0200
Subject: [PATCH 19/23] Install /etc/multipath/conf.d/custom.conf
Subject: [PATCH 019/177] Install /etc/multipath/conf.d/custom.conf

Update Makefile so that the file is installed along with sm.

Expand Down
2 changes: 1 addition & 1 deletion SOURCES/0020-Backport-NFS4-only-support.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From fe5a7b355ea6820036cfeef3847b2bec28567632 Mon Sep 17 00:00:00 2001
From: Benjamin Reis <[email protected]>
Date: Mon, 18 Dec 2023 10:22:26 +0100
Subject: [PATCH 20/23] Backport NFS4 only support
Subject: [PATCH 020/177] Backport NFS4 only support

See: https://github.com/xapi-project/sm/pull/617

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From eea13526d4e202e395d1a4289f837b0171a73b8e Mon Sep 17 00:00:00 2001
From: Benjamin Reis <[email protected]>
Date: Mon, 18 Dec 2023 10:35:46 +0100
Subject: [PATCH 21/23] Backport probe for NFS4 when rpcinfo does not include
Subject: [PATCH 021/177] Backport probe for NFS4 when rpcinfo does not include
it

See: https://github.com/xapi-project/sm/pull/655
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
From 05e5ce03d6fd4523a942345cf49cc41eebaa78f7 Mon Sep 17 00:00:00 2001
From: Damien Thenot <[email protected]>
Date: Tue, 7 May 2024 15:20:22 +0200
Subject: [PATCH 22/23] feat(LargeBlock): backport of largeblocksr (#51) (#55)
Subject: [PATCH 022/177] feat(LargeBlock): backport of largeblocksr (#51)
(#55)

A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
From bc8ee2e18aa6ba1a8923c09ff0d765f931ddc348 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <[email protected]>
Date: Tue, 28 May 2024 15:17:21 +0200
Subject: [PATCH 23/23] feat(LVHDSR): add a way to modify config of LVMs (#56)
Subject: [PATCH 023/177] feat(LVHDSR): add a way to modify config of LVMs
(#56)

With this change the driver supports a "lvm-conf" param on "other-config".
For now The configuration is only used by "remove" calls from LVMCache.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From f76ccb66f769ca352bf1dea9abdaaea5ec1b7942 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <[email protected]>
Date: Wed, 16 Feb 2022 18:24:56 +0100
Subject: [PATCH 024/177] Fix timeout_call: alarm must be reset in case of
success

Otherwise the SIGALRM signal can be emitted after the execution
of the given user function.

Signed-off-by: Ronan Abhamon <[email protected]>
---
drivers/util.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/util.py b/drivers/util.py
index 8bd36351..77f3f190 100755
--- a/drivers/util.py
+++ b/drivers/util.py
@@ -852,9 +852,8 @@ def timeout_call(timeoutseconds, function, *arguments):
signal.alarm(timeoutseconds)
try:
function(*arguments)
- except:
+ finally:
signal.alarm(0)
- raise


def _incr_iscsiSR_refcount(targetIQN, uuid):
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From 3db6e67815f3c85768cf253e3d78d01c416fc16f Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <[email protected]>
Date: Wed, 16 Feb 2022 18:28:06 +0100
Subject: [PATCH 025/177] timeout_call returns the result of user function now

Signed-off-by: Ronan Abhamon <[email protected]>
---
drivers/util.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/util.py b/drivers/util.py
index 77f3f190..54fda469 100755
--- a/drivers/util.py
+++ b/drivers/util.py
@@ -851,7 +851,7 @@ def timeout_call(timeoutseconds, function, *arguments):
signal.signal(signal.SIGALRM, handler)
signal.alarm(timeoutseconds)
try:
- function(*arguments)
+ return function(*arguments)
finally:
signal.alarm(0)

Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
From 7ebdef745b90fe8479555bc44d8d7ce594fc209f Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <[email protected]>
Date: Mon, 5 Feb 2024 23:16:16 +0100
Subject: [PATCH 026/177] Always remove the pause tag from VDIs in case of
failure

During VDI activation in the blktap module and in case of failure
in "sm.VDI.from_uuid" call, the pause tag is never removed.
As a result a VDI can no longer be used correctly: an assert is
triggered each time we try to re-activate this volume because
the tag is still present.

Signed-off-by: Ronan Abhamon <[email protected]>
---
drivers/blktap2.py | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/drivers/blktap2.py b/drivers/blktap2.py
index e1f75e9f..e9305ce9 100755
--- a/drivers/blktap2.py
+++ b/drivers/blktap2.py
@@ -1599,20 +1599,24 @@ class VDI(object):
import VDI as sm

#util.SMlog("VDI.activate %s" % vdi_uuid)
+ refresh = False
if self.tap_wanted():
if not self._add_tag(vdi_uuid, not options["rdonly"]):
return False
- # it is possible that while the VDI was paused some of its
- # attributes have changed (e.g. its size if it was inflated; or its
- # path if it was leaf-coalesced onto a raw LV), so refresh the
- # object completely
- params = self.target.vdi.sr.srcmd.params
- target = sm.VDI.from_uuid(self.target.vdi.session, vdi_uuid)
- target.sr.srcmd.params = params
- driver_info = target.sr.srcmd.driver_info
- self.target = self.TargetDriver(target, driver_info)
+ refresh = True

try:
+ if refresh:
+ # it is possible that while the VDI was paused some of its
+ # attributes have changed (e.g. its size if it was inflated; or its
+ # path if it was leaf-coalesced onto a raw LV), so refresh the
+ # object completely
+ params = self.target.vdi.sr.srcmd.params
+ target = sm.VDI.from_uuid(self.target.vdi.session, vdi_uuid)
+ target.sr.srcmd.params = params
+ driver_info = target.sr.srcmd.driver_info
+ self.target = self.TargetDriver(target, driver_info)
+
util.fistpoint.activate_custom_fn(
"blktap_activate_inject_failure",
lambda: util.inject_failure())
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From e3f11afdfdc43aa871a7d4f8c6d25564150fd0e4 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <[email protected]>
Date: Fri, 20 Nov 2020 16:42:52 +0100
Subject: [PATCH 027/177] fix(LinstorSR): repair volumes only if an exclusive
command is executed

Signed-off-by: Ronan Abhamon <[email protected]>
---
drivers/LinstorSR.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/LinstorSR.py b/drivers/LinstorSR.py
index 8be18367..a5bf5abd 100755
--- a/drivers/LinstorSR.py
+++ b/drivers/LinstorSR.py
@@ -388,10 +388,16 @@ class LinstorSR(SR.SR):

try:
# Try to open SR if exists.
+ # We can repair only if we are on the master AND if
+ # we are trying to execute an exclusive operation.
+ # Otherwise we could try to delete a VDI being created or
+ # during a snapshot. An exclusive op is the guarantee that the
+ # SR is locked.
self._linstor = LinstorVolumeManager(
self._master_uri,
self._group_name,
- repair=self._is_master,
+ repair=self._is_master and
+ self.srcmd.cmd in self.ops_exclusive,
logger=util.SMlog
)
self._vhdutil = LinstorVhdUtil(self.session, self._linstor)
Loading

0 comments on commit 1ce9275

Please sign in to comment.