Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 2d20ce97c268389c492c4057e7d5c851d33928dc Mon Sep 17 00:00:00 2001
From: Samuel Verschelde <stormi@laposte.net>
Date: Thu, 13 Aug 2020 15:22:17 +0200
Subject: [PATCH 01/25] Update xs-sm.service's description for XCP-ng
Subject: [PATCH 01/26] 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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 47cc3de5c552a7fb57286f9262b779a932757f48 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@vates.fr>
Date: Mon, 20 Jul 2020 16:26:42 +0200
Subject: [PATCH 02/25] feat(drivers): add CephFS and GlusterFS drivers
Subject: [PATCH 02/26] feat(drivers): add CephFS and GlusterFS drivers

---
Makefile | 2 +
Expand Down
2 changes: 1 addition & 1 deletion SOURCES/0003-feat-drivers-add-XFS-driver.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From cc4bf4a758744668e940f20383c993b25f547e0e Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@vates.fr>
Date: Mon, 20 Jul 2020 16:26:42 +0200
Subject: [PATCH 03/25] feat(drivers): add XFS driver
Subject: [PATCH 03/26] feat(drivers): add XFS driver

Originally-by: Ronan Abhamon <ronan.abhamon@vates.fr>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From b0bf49a4284c22da590c8a9062a93d34bba4b2ac Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@vates.fr>
Date: Wed, 12 Aug 2020 11:14:33 +0200
Subject: [PATCH 04/25] feat(drivers): add ZFS driver to avoid losing VDI
Subject: [PATCH 04/26] feat(drivers): add ZFS driver to avoid losing VDI
metadata (xcp-ng/xcp#401)

---
Expand Down
2 changes: 1 addition & 1 deletion SOURCES/0005-feat-drivers-add-LinstorSR-driver.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 78f392f433a9f88aa02bd9b4502b449e4cebab86 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@vates.fr>
Date: Mon, 16 Mar 2020 15:39:44 +0100
Subject: [PATCH 05/25] feat(drivers): add LinstorSR driver
Subject: [PATCH 05/26] 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 79d91294c7c0ba02c86b39152e9fe139b1606568 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@vates.fr>
Date: Tue, 27 Oct 2020 15:04:36 +0100
Subject: [PATCH 06/25] feat(tests): add unit tests concerning ZFS (close
Subject: [PATCH 06/26] 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/0007-Added-SM-Driver-for-MooseFS.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 060e96695be354e133a04c826e134ba2ee68b56a Mon Sep 17 00:00:00 2001
From: Aleksander Wieliczko <aleksander.wieliczko@moosefs.pro>
Date: Fri, 29 Jan 2021 15:21:23 +0100
Subject: [PATCH 07/25] Added SM Driver for MooseFS
Subject: [PATCH 07/26] Added SM Driver for MooseFS

Co-authored-by: Piotr Robert Konopelko <piotr.konopelko@moosefs.pro>
Signed-off-by: Aleksander Wieliczko <aleksander.wieliczko@moosefs.pro>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From fdd8e6a066fe06c5cec9c8f1b2e9e8e606ad6b93 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@vates.fr>
Date: Thu, 2 Dec 2021 09:28:37 +0100
Subject: [PATCH 08/25] Avoid usage of `umount` in `ISOSR` when `legacy_mode`
Subject: [PATCH 08/26] 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 d5d805ff65fb9a48c8dc75b9b6a7ef70b48230c2 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@vates.fr>
Date: Wed, 18 May 2022 17:28:09 +0200
Subject: [PATCH 09/25] MooseFS SR uses now UUID subdirs for each SR
Subject: [PATCH 09/26] 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/0010-Fix-is_open-call-for-many-drivers-25.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 7f0be4bd602b200012bff8d7b9ff4be6d1d6ce56 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@gmail.com>
Date: Thu, 23 Jun 2022 10:36:36 +0200
Subject: [PATCH 10/25] Fix is_open call for many drivers (#25)
Subject: [PATCH 10/26] 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 a6ba7842cba998b57e4775d4ef1296b72d9a6994 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@gmail.com>
Date: Thu, 23 Jun 2022 10:37:07 +0200
Subject: [PATCH 11/25] Remove SR_CACHING capability for many SR types (#24)
Subject: [PATCH 11/26] 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 1d75e7b46a035fdb79a03ae370f8c3aea2d8e5a2 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@vates.fr>
Date: Mon, 19 Sep 2022 10:31:00 +0200
Subject: [PATCH 12/25] Fix code coverage regarding MooseFSSR and ZFSSR (#29)
Subject: [PATCH 12/26] Fix code coverage regarding MooseFSSR and ZFSSR (#29)

Signed-off-by: Ronan Abhamon <ronan.abhamon@vates.fr>
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From dc143642451d3e12bad2e2cc07f58907052c0ada Mon Sep 17 00:00:00 2001
From: Yann Dirson <yann.dirson@vates.fr>
Date: Wed, 8 Mar 2023 10:13:18 +0100
Subject: [PATCH 13/25] py3: simple changes from futurize on XCP-ng drivers
Subject: [PATCH 13/26] py3: simple changes from futurize on XCP-ng drivers

* `except` syntax fixes
* drop `has_key()` usage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From a82fcedc749b046f7a7c6d7898011294180d7659 Mon Sep 17 00:00:00 2001
From: Yann Dirson <yann.dirson@vates.fr>
Date: Wed, 8 Mar 2023 10:28:10 +0100
Subject: [PATCH 14/25] py3: futurize fix of xmlrpc calls for CephFS,
Subject: [PATCH 14/26] py3: futurize fix of xmlrpc calls for CephFS,
GlusterFS, MooseFS, Linstore

Signed-off-by: Yann Dirson <yann.dirson@vates.fr>
Expand Down
2 changes: 1 addition & 1 deletion SOURCES/0015-py3-use-of-integer-division-operator.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From e4503ac458166e9be4dae69fce8c4c3ea16c2639 Mon Sep 17 00:00:00 2001
From: Yann Dirson <yann.dirson@vates.fr>
Date: Wed, 8 Mar 2023 10:32:37 +0100
Subject: [PATCH 15/25] py3: use of integer division operator
Subject: [PATCH 15/26] py3: use of integer division operator

Guided by futurize's "old_div" use

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 3264fe0d1d0e4448e9709125cc99255c53be1fa6 Mon Sep 17 00:00:00 2001
From: Yann Dirson <yann.dirson@vates.fr>
Date: Wed, 8 Mar 2023 13:53:21 +0100
Subject: [PATCH 16/25] test_on_slave: allow to work with SR using absolute
Subject: [PATCH 16/26] test_on_slave: allow to work with SR using absolute
PROBE_MOUNTPOINT

PROBE_MOUNTPOINT in a some drivers is a relative path, which is resolved
Expand Down
2 changes: 1 addition & 1 deletion SOURCES/0017-py3-switch-interpreter-to-python3.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 222ebd7c6056486b9607221787f08c6b45f8bdd1 Mon Sep 17 00:00:00 2001
From: Yann Dirson <yann.dirson@vates.fr>
Date: Mon, 27 Mar 2023 15:30:46 +0200
Subject: [PATCH 17/25] py3: switch interpreter to python3
Subject: [PATCH 17/26] py3: switch interpreter to python3

---
drivers/CephFSSR.py | 2 +-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From c40ab02a286dac8bacec4b767f06455aaa1d4ca9 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@vates.fr>
Date: Thu, 4 May 2023 10:24:22 +0200
Subject: [PATCH 18/25] Support recent version of coverage tool (coverage
Subject: [PATCH 18/26] Support recent version of coverage tool (coverage
7.2.5)

Without these changes many warns/errors are emitted:
Expand Down
2 changes: 1 addition & 1 deletion SOURCES/0019-feat-LinstorSR-import-all-8.2-changes.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 505db9115ea8bf7e690e1ee2a2dd34e86f58bbab Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@vates.fr>
Date: Fri, 20 Nov 2020 16:42:52 +0100
Subject: [PATCH 19/25] feat(LinstorSR): import all 8.2 changes
Subject: [PATCH 19/26] feat(LinstorSR): import all 8.2 changes

Signed-off-by: Ronan Abhamon <ronan.abhamon@vates.fr>
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 0313ce69cc0359d8f092735ffe96db85b26a69f6 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@vates.fr>
Date: Fri, 30 Jun 2023 12:41:43 +0200
Subject: [PATCH 20/25] feat(LinstorSR): is now compatible with python 3
Subject: [PATCH 20/26] feat(LinstorSR): is now compatible with python 3

Signed-off-by: Ronan Abhamon <ronan.abhamon@vates.fr>
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 6c5fb067eff3d4c72f766655c4a20998f72ab516 Mon Sep 17 00:00:00 2001
From: BenjiReis <benjamin.reis@vates.fr>
Date: Fri, 4 Aug 2023 12:10:37 +0200
Subject: [PATCH 21/25] Remove `SR_PROBE` from ZFS capabilities (#36)
Subject: [PATCH 21/26] Remove `SR_PROBE` from ZFS capabilities (#36)

The probe method is not implemented so we
shouldn't advertise it.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 546aed24efdb8bcc1d0f641447f4c1a3ed5a2549 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@vates.fr>
Date: Fri, 22 Sep 2023 11:11:27 +0200
Subject: [PATCH 22/25] Repair coverage to be compatible with 8.3 test env
Subject: [PATCH 22/26] Repair coverage to be compatible with 8.3 test env

Impacted drivers: LINSTOR, MooseFS and ZFS.
- Ignore all linstor.* members during coverage,
Expand Down
2 changes: 1 addition & 1 deletion SOURCES/0023-Support-IPv6-in-Ceph-Driver.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From f53aacf74d9e4ca5517653e872081ec63e18f9c0 Mon Sep 17 00:00:00 2001
From: BenjiReis <benjamin.reis@vates.fr>
Date: Mon, 25 Sep 2023 16:13:13 +0200
Subject: [PATCH 23/25] Support IPv6 in Ceph Driver
Subject: [PATCH 23/26] Support IPv6 in Ceph Driver

Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From a3dbbe1756addedb03c33fbb4c521708b3214c32 Mon Sep 17 00:00:00 2001
From: Yann Dirson <yann.dirson@vates.fr>
Date: Wed, 5 Jul 2023 16:57:26 +0200
Subject: [PATCH 24/25] lvutil: use wipefs not dd to clear existing signatures
Subject: [PATCH 24/26] lvutil: use wipefs not dd to clear existing signatures
(xapi-project#624)

Signed-off-by: Yann Dirson <yann.dirson@vates.fr>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 59dc1023e9c0cc1cf06031bb92b8699dd691823a Mon Sep 17 00:00:00 2001
From: Damien Thenot <damien.thenot@vates.tech>
Date: Fri, 12 Apr 2024 15:08:59 +0200
Subject: [PATCH 25/25] feat(LargeBlock): introduce largeblocksr (#51)
Subject: [PATCH 25/26] feat(LargeBlock): introduce largeblocksr (#51)

A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Expand Down
109 changes: 109 additions & 0 deletions SOURCES/0026-feat-LVHDSR-add-a-way-to-modify-config-of-LVMs-60.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
From 132d2b4426177813331e04d32d37a47c23e097c7 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@vates.fr>
Date: Tue, 30 Jul 2024 15:31:23 +0200
Subject: [PATCH 26/26] feat(LVHDSR): add a way to modify config of LVMs (#60)

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.

Example to issue discards after a lvremove command:

> xe sr-param-set uuid=<SR_UUID> other-config:lvm-conf=issue_discards=1

And to remove the param:

> xe sr-param-remove uuid=<SR_UUID> param-name=other-config param-key=lvm-conf

Signed-off-by: Ronan Abhamon <ronan.abhamon@vates.fr>
---
drivers/LVHDSR.py | 15 ++++++++++++---
drivers/cleanup.py | 7 ++++++-
drivers/lvmcache.py | 5 +++--
3 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/drivers/LVHDSR.py b/drivers/LVHDSR.py
index f15c92d..a2dac77 100755
--- a/drivers/LVHDSR.py
+++ b/drivers/LVHDSR.py
@@ -161,14 +161,24 @@ class LVHDSR(SR.SR):
self.path = os.path.join(lvhdutil.VG_LOCATION, self.vgname)
self.mdpath = os.path.join(self.path, self.MDVOLUME_NAME)
self.provision = self.PROVISIONING_DEFAULT
+
+ self.other_conf = None
+ has_sr_ref = self.srcmd.params.get("sr_ref")
+ if has_sr_ref:
+ self.other_conf = self.session.xenapi.SR.get_other_config(self.sr_ref)
+
+ self.lvm_conf = None
+ if self.other_conf:
+ self.lvm_conf = self.other_conf.get('lvm-conf')
+
try:
- self.lvmCache = lvmcache.LVMCache(self.vgname)
+ self.lvmCache = lvmcache.LVMCache(self.vgname, self.lvm_conf)
except:
raise xs_errors.XenError('SRUnavailable', \
opterr='Failed to initialise the LVMCache')
self.lvActivator = LVActivator(self.uuid, self.lvmCache)
self.journaler = Journaler(self.lvmCache)
- if not self.srcmd.params.get("sr_ref"):
+ if not has_sr_ref:
return # must be a probe call
# Test for thick vs thin provisioning conf parameter
if 'allocation' in self.dconf:
@@ -178,7 +188,6 @@ class LVHDSR(SR.SR):
raise xs_errors.XenError('InvalidArg', \
opterr='Allocation parameter must be one of %s' % self.PROVISIONING_TYPES)

- self.other_conf = self.session.xenapi.SR.get_other_config(self.sr_ref)
if self.other_conf.get(self.TEST_MODE_KEY):
self.testMode = self.other_conf[self.TEST_MODE_KEY]
self._prepareTestMode()
diff --git a/drivers/cleanup.py b/drivers/cleanup.py
index 9dfbf42..6f7f1e1 100755
--- a/drivers/cleanup.py
+++ b/drivers/cleanup.py
@@ -2835,7 +2835,12 @@ class LVHDSR(SR):
SR.__init__(self, uuid, xapi, createLock, force)
self.vgName = "%s%s" % (lvhdutil.VG_PREFIX, self.uuid)
self.path = os.path.join(lvhdutil.VG_LOCATION, self.vgName)
- self.lvmCache = lvmcache.LVMCache(self.vgName)
+
+ sr_ref = self.xapi.session.xenapi.SR.get_by_uuid(self.uuid)
+ other_conf = self.xapi.session.xenapi.SR.get_other_config(sr_ref)
+ lvm_conf = other_conf.get('lvm-conf') if other_conf else None
+ self.lvmCache = lvmcache.LVMCache(self.vgName, lvm_conf)
+
self.lvActivator = LVActivator(self.uuid, self.lvmCache)
self.journaler = journaler.Journaler(self.lvmCache)

diff --git a/drivers/lvmcache.py b/drivers/lvmcache.py
index 8c63d45..6e21568 100644
--- a/drivers/lvmcache.py
+++ b/drivers/lvmcache.py
@@ -59,10 +59,11 @@ class LVMCache:
"""Per-VG object to store LV information. Can be queried for cached LVM
information and refreshed"""

- def __init__(self, vgName):
+ def __init__(self, vgName, config=None):
"""Create a cache for VG vgName, but don't scan the VG yet"""
self.vgName = vgName
self.vgPath = "/dev/%s" % self.vgName
+ self.config = config
self.lvs = dict()
self.tags = dict()
self.initialized = False
@@ -115,7 +116,7 @@ class LVMCache:
@lazyInit
def remove(self, lvName):
path = self._getPath(lvName)
- lvutil.remove(path)
+ lvutil.remove(path, self.config)
for tag in self.lvs[lvName].tags:
self._removeTag(lvName, tag)
del self.lvs[lvName]
--
2.45.2

6 changes: 5 additions & 1 deletion SPECS/sm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Summary: sm - XCP storage managers
Name: sm
Version: 3.2.0
Release: 1.3%{?xsrel}%{?dist}
Release: 1.4%{?xsrel}%{?dist}
License: LGPL
URL: https://github.com/xapi-project/sm
Source0: sm-3.2.0.tar.gz
Expand Down Expand Up @@ -70,6 +70,7 @@ Patch1022: 0022-Repair-coverage-to-be-compatible-with-8.3-test-env.patch
Patch1023: 0023-Support-IPv6-in-Ceph-Driver.patch
Patch1024: 0024-lvutil-use-wipefs-not-dd-to-clear-existing-signature.patch
Patch1025: 0025-feat-LargeBlock-introduce-largeblocksr-51.patch
Patch0026: 0026-feat-LVHDSR-add-a-way-to-modify-config-of-LVMs-60.patch

%description
This package contains storage backends used in XCP
Expand Down Expand Up @@ -368,6 +369,9 @@ Manager and some other packages


%changelog
* Tue Jul 30 2024 Ronan Abhamon <ronan.abhamon@vates.fr> - 3.2.0-1.4
- Add 0026-feat-LVHDSR-add-a-way-to-modify-config-of-LVMs-60.patch

* Tue Jul 30 2024 Ronan Abhamon <ronan.abhamon@vates.fr> - 3.2.0-1.3
- Reload automatically multipathd config after each update

Expand Down