Skip to content

Commit 0215ecc

Browse files
committed
lvm: Require higher version of LVM for lvm.conf parsing
The --valuesonly option we use is not available on LVM < 2.03.17
1 parent de9ecdb commit 0215ecc

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/plugins/lvm-dbus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ static GMutex deps_check_lock;
300300
static const UtilDep deps[DEPS_LAST] = {
301301
{"lvm", LVM_MIN_VERSION, "version", "LVM version:\\s+([\\d\\.]+)"},
302302
{"lvmdevices", NULL, NULL, NULL},
303-
{"lvmconfig", NULL, NULL, NULL},
303+
{"lvmconfig", "2.03.17", "version", "LVM version:\\s+([\\d\\.]+)"},
304304
};
305305

306306
#define DBUS_DEPS_LVMDBUSD 0

src/plugins/lvm.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,14 @@ static GMutex deps_check_lock;
307307
#define DEPS_LVM_MASK (1 << DEPS_LVM)
308308
#define DEPS_LVMDEVICES 1
309309
#define DEPS_LVMDEVICES_MASK (1 << DEPS_LVMDEVICES)
310-
#define DEPS_LAST 2
310+
#define DEPS_LVMCONFIG 2
311+
#define DEPS_LVMCONFIG_MASK (1 << DEPS_LVMCONFIG)
312+
#define DEPS_LAST 3
311313

312314
static const UtilDep deps[DEPS_LAST] = {
313315
{"lvm", LVM_MIN_VERSION, "version", "LVM version:\\s+([\\d\\.]+)"},
314316
{"lvmdevices", NULL, NULL, NULL},
317+
{"lvmconfig", "2.03.17", "version", "LVM version:\\s+([\\d\\.]+)"},
315318
};
316319

317320
#define FEATURES_VDO 0

tests/skip.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,9 @@
5959
- test: lvm_dbus_tests.LvmTestPartialLVs
6060
skip_on:
6161
- reason: "LVM DBus doesn't support LV repair yet"
62+
63+
- test: (lvm_test|lvm_dbus_tests).LvmNoDevTestCase.test_lvm_config
64+
skip_on:
65+
- distro: "debian"
66+
version: "12"
67+
reason: "LVM >= 2.03.17 needed for LVM config parsing with --valuesonly"

0 commit comments

Comments
 (0)