main - make: generate
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6204fda003804e2bad0...
Commit: 6204fda003804e2bad022347baab510cb845f315
Parent: 49dbeb9b4566df684164f40ca6ebdab3d6696836
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Mar 21 13:33:14 2023 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Mar 21 13:33:14 2023 +0100
make: generate
---
man/vgchange.8_pregen | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/man/vgchange.8_pregen b/man/vgchange.8_pregen
index 5ab59204d..4665e98c8 100644
--- a/man/vgchange.8_pregen
+++ b/man/vgchange.8_pregen
@@ -68,6 +68,8 @@ vgchange \(em Change volume group attributes
\fB-l\fP|\fB--logicalvolume\fP \fINumber\fP
.br
\fB--longhelp\fP
+.br
+ \fB--majoritypvs\fP
.br
\fB-p\fP|\fB--maxphysicalvolumes\fP \fINumber\fP
.br
@@ -348,6 +350,8 @@ Change the system ID of a VG.
.ad l
[ \fB-S\fP|\fB--select\fP \fIString\fP ]
.br
+[ \fB--majoritypvs\fP ]
+.br
[ COMMON_OPTIONS ]
.ad b
.RE
@@ -666,6 +670,12 @@ Sets the maximum number of LVs allowed in a VG.
Display long help text.
.
.HP
+\fB--majoritypvs\fP
+.br
+Change the VG system ID if the majority of PVs in the VG
+are present (one more than half).
+.
+.HP
\fB-p\fP|\fB--maxphysicalvolumes\fP \fINumber\fP
.br
Sets the maximum number of PVs that can belong to the VG.
1 year, 1 month
v2_03_20 annotated tag has been created
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=aba3b33d3778ad28b44...
Commit: aba3b33d3778ad28b445130ebaa8efca4ddba844
Parent: 0000000000000000000000000000000000000000
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: 2023-03-21 12:37 +0000
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: 2023-03-21 12:37 +0000
annotated tag: v2_03_20 has been created
at aba3b33d3778ad28b445130ebaa8efca4ddba844 (tag)
tagging 3e0ee8dbad69b01c63b13f41ba449cba48756968 (commit)
replaces v2_03_19
Release 2.03.20
Bugfix release
-----BEGIN PGP SIGNATURE-----
iQJIBAABCAAyFiEE1QGkeEQK4v0TChvouREkMeUJA58FAmQZpRcUHG1jc29udG9z
QHJlZGhhdC5jb20ACgkQuREkMeUJA5++4w/+NplVlNL5sEU+AkBbKRGsN80A9fEg
0JVeB0x1G/YPzx5n922Umvu3RycoeDTAMg8/HL0ClG6NEgBO60+XRkXU38BmCEFH
bOPLJvmriJbNHYu9a3PD2lLzfwyfoG5Vh8aqoyV9pz2Y4BARVZAc0OH5AQUFbmOL
xCoGcvbYCGgGIbir7J5r6KMVxuiQfGvHPVTi89+Y7pW07fyT6jsSFGXNPsY/iQ4h
ITfYGUud+47HIt5pvm/QvQS6lX6Ck3Z5oYU8x+SkrAbwu9NRYAKlxIU70duynv4Y
SsCPhhPCjdpH+o0F0me/u9xFSG1jZ69EtEit3L0Urq+e/HB0tpY8PzWkom2VGZxI
T9LCVicKNDS5X99XQvE0iG7GPHscLrq+lbyLG1cj5+ASA5osY/lg+7ptnij5qpgG
CnEKBbDmdk8McIYxwGaGewZ3qucs25gNjSvCeoS8aZbjczoz9i4vfRcBEvH67PFI
yHrFOwk3mhC5SDizDxKt7gXCQSy/Pw/t4e/FvvjQkwG22pSk4IXiKL2FoGGGsbV6
j3lukwRY7QkUvPnNQeSjSffsm7cNo9uobrwqvWoLrQ4Z9mq2gu27tqpSLom5LeL6
wc1Hgr+FfyDirHBTd0+wI1burnL2EHHjnGuXYbgiEaU8JYUbndxlBWI7CjK8Yf1x
z526Z8jMsRTr5fg=
=P9Qa
-----END PGP SIGNATURE-----
David Seifert (2):
makefiles: add pthread to libdevmapper pkgconfig
configure.ac: add STATIC_LDFLAGS
David Teigland (8):
vgimport: invalidate hints
lvresize: fix check for mounted and renamed LV to handle spaces
lvmlockd: clean up get_local_nodeid
vgchange: allow changing system ID with majority of PVs
tests: vg-raid-takeover
vg_read: keep MISSING_PV when device with no mda reappears
tests: update missing-pv
tests: nomda-restoremissing
Marian Csontos (3):
post-release
make: generate
pre-release
Peter Rajnoha (1):
toollib: fix segfault if using -S|--select with log/report_command_log=1 setting
Robin H. Johnson (1):
configure.ac: use pkg-config to detect static libs
Tony Asleson (22):
lvmdbustest.py: Remove use of root_dir in glob
lvmdbusd: Add lock to prevent concurrent lvm shell access
lvmdbusd: Remove unused import
lvmdbustest.py: Increase udev timeout
lvmdbustest: Add more output for test_log_file_option
lvmdbustest: Don't hard code to /tmp
lvmdbustest: Add more info on asserts
lvmdbustest: Test duplicate VG rename
lvmdbusd: Move cfg.lvmdebug data init
lvmdbusd: Add needed env. variables
lvmdbusd: Replace assert with exception
lvmdbusd: Handle missing key in get_key
lvmdbustest: open log file with "a"
lvmdbustest: Correctly set up env. for error injection
lvmdbustest: Only inject 1 missing key error
lvmdbustest: Shutdown cleanly with "exit"
lvmdbusd: Add a retries during initial load
lvmdbustest: Don't use hard coded /tmp for error inject log
lvmdbustest: Check for needed env. variables
lvmdbustest: Add env. variable to skip signal testing
lvmdbustest: Add notes on error injection testing
lvmdbustest: Correct env. logic
Vojtech Trefny (1):
lvmdbusd: Add a new 'Shared' property to the Vg interface
Zdenek Kabelac (12):
tests: some skips with 6.2 kernel
tests: add fixme
tests: remove option chunk for mdadm raid1
tests: use aux mdadm wrapper
tests: add missing quotes
aux: lvmdbus checks for JSONDecodeError
makefiles: avoid grep
configure.ac: update dlm check
configure.ac: fail configure for missing libraries
configure.ac: misc
WHATS_NEW: updates
configure: update
1 year, 1 month
main - tests: nomda-restoremissing
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=49dbeb9b4566df68416...
Commit: 49dbeb9b4566df684164f40ca6ebdab3d6696836
Parent: ddfe839dd1aa42e3d2a15a19eaf86c4b6fc65d19
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Mar 20 12:42:50 2023 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Mar 20 12:42:50 2023 -0500
tests: nomda-restoremissing
This test was broken by commit 69ea2e3f9
"vg_read: keep MISSING_PV when device with no mda reappears"
Change the test to match the new behavior.
---
test/shell/nomda-restoremissing.sh | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/test/shell/nomda-restoremissing.sh b/test/shell/nomda-restoremissing.sh
index fb3f93053..d9c544bc4 100644
--- a/test/shell/nomda-restoremissing.sh
+++ b/test/shell/nomda-restoremissing.sh
@@ -31,7 +31,18 @@ not vgck $vg 2>&1 | tee log
grep "missing 1 physical volume" log
not lvcreate -aey --type mirror -m 1 -l 1 -n mirror $vg # write operations fail
aux enable_dev "$dev1"
-lvcreate -aey --type mirror -m 1 -l 1 -n mirror $vg # no MDA => automatically restored
+# Old versions would automatically clear MISSING_PV on a PV that had no mda,
+# but this made no sense; the existence of an mda means nothing for the
+# validity of the data on the device. I suspect that at some point in the
+# past, the MISSING_PV flag was used to decide if metadata could be used
+# from the device, so the flag could be cleared on a PV with no mda.
+# These days lvm knows when to ignore outdated metadata.
+# MISSING_PV probably has little to no value for determining valid data either,
+# so it's likely that we'll begin to automatically clear MISSING_PV in the
+# future (but it will have nothing to do with having mdas.)
+not lvcreate -aey --type mirror -m 1 -l 1 -n mirror $vg
+vgextend --restoremissing $vg "$dev1"
+lvcreate -aey --type mirror -m 1 -l 1 -n mirror $vg
vgck $vg
vgremove -ff $vg
1 year, 1 month
main - lvmdbusd: Add a new 'Shared' property to the Vg interface
by Tony Asleson
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ddfe839dd1aa42e3d2a...
Commit: ddfe839dd1aa42e3d2a15a19eaf86c4b6fc65d19
Parent: 0c73d3545b2c964cea7e74cc022d2bc599ce7739
Author: Vojtech Trefny <vtrefny(a)redhat.com>
AuthorDate: Wed Mar 15 12:31:14 2023 +0100
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Wed Mar 15 09:09:38 2023 -0500
lvmdbusd: Add a new 'Shared' property to the Vg interface
Signed-off-by: Vojtech Trefny <vtrefny(a)redhat.com>
---
daemons/lvmdbusd/vg.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/daemons/lvmdbusd/vg.py b/daemons/lvmdbusd/vg.py
index 6e7d6ec9b..c65d9db2b 100644
--- a/daemons/lvmdbusd/vg.py
+++ b/daemons/lvmdbusd/vg.py
@@ -151,6 +151,7 @@ class Vg(AutomatedProperties):
_AllocNormal_meta = ('b', VG_INTERFACE)
_AllocAnywhere_meta = ('b', VG_INTERFACE)
_Clustered_meta = ('b', VG_INTERFACE)
+ _Shared_meta = ('b', VG_INTERFACE)
_Name_meta = ('s', VG_INTERFACE)
# noinspection PyUnusedLocal,PyPep8Naming
@@ -785,6 +786,10 @@ class Vg(AutomatedProperties):
def Clustered(self):
return self._attribute(5, 'c')
+ @property
+ def Shared(self):
+ return self._attribute(5, 's')
+
class VgVdo(Vg):
1 year, 1 month
main - lvmdbustest: Correct env. logic
by Tony Asleson
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=0c73d3545b2c964cea7...
Commit: 0c73d3545b2c964cea7e74cc022d2bc599ce7739
Parent: baf99ff974b408c59dd4f51db6e006d659c061e7
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Tue Mar 14 08:05:57 2023 -0500
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Tue Mar 14 09:36:38 2023 -0500
lvmdbustest: Correct env. logic
Signed-off-by: Tony Asleson <tasleson(a)redhat.com>
---
test/dbus/lvmdbustest.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index 00d9303b6..8f95757eb 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -2347,8 +2347,8 @@ class TestDbusService(unittest.TestCase):
def test_z_sigint(self):
# Issue SIGINT while daemon is processing work to ensure we shut down.
- if not bool(int(os.getenv("LVM_DBUSD_TEST_SKIP_SIGNAL", "0"))):
- raise unittest.SkipTest("Skipping as env. LVM_DBUSD_TEST_SKIP_SIGNAL is '0'")
+ if bool(int(os.getenv("LVM_DBUSD_TEST_SKIP_SIGNAL", "0"))):
+ raise unittest.SkipTest("Skipping as env. LVM_DBUSD_TEST_SKIP_SIGNAL is '1'")
di = DaemonInfo.get()
self.assertTrue(di is not None)
1 year, 1 month
main - lvmdbustest: Add notes on error injection testing
by Tony Asleson
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=baf99ff974b408c59dd...
Commit: baf99ff974b408c59dd4f51db6e006d659c061e7
Parent: 1c550d7124d4bc1954f7d1d7efc372e1d996b570
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Fri Mar 10 10:44:55 2023 -0600
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Fri Mar 10 12:51:53 2023 -0600
lvmdbustest: Add notes on error injection testing
Not doing this by default for automated build testing as it generates a
lot of output and slows things down by another ~10%.
---
test/dbus/lvmdbustest.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index e1c994e90..00d9303b6 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -2577,6 +2577,12 @@ if __name__ == '__main__':
r = AggregateResults()
mode = int(test_shell)
+ # To test with error injection, simply set the env. variable LVM_BINARY to the error inject script
+ # and the LVM_MAN_IN_MIDDLE variable to the lvm binary to test which defaults to "/usr/sbin/lvm"
+ # An example
+ # export LVM_BINARY=/home/tasleson/projects/lvm2/test/dbus/lvm_error_inject.py
+ # export LVM_MAN_IN_MIDDLE=/home/tasleson/projects/lvm2/tools/lvm
+
if mode == 0:
std_err_print('\n*** Testing only lvm fork & exec test mode ***\n')
elif mode == 1:
1 year, 1 month
main - lvmdbustest: Add env. variable to skip signal testing
by Tony Asleson
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1c550d7124d4bc1954f...
Commit: 1c550d7124d4bc1954f7d1d7efc372e1d996b570
Parent: f8876290bfc8d11400901e9eac32f6d613b0ed70
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Fri Mar 10 10:43:02 2023 -0600
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Fri Mar 10 12:51:53 2023 -0600
lvmdbustest: Add env. variable to skip signal testing
This is currently need if we are collecting code coverage data as we don't
handle this unit test correctly.
---
test/dbus/lvmdbustest.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index b7224df96..e1c994e90 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -2347,6 +2347,9 @@ class TestDbusService(unittest.TestCase):
def test_z_sigint(self):
# Issue SIGINT while daemon is processing work to ensure we shut down.
+ if not bool(int(os.getenv("LVM_DBUSD_TEST_SKIP_SIGNAL", "0"))):
+ raise unittest.SkipTest("Skipping as env. LVM_DBUSD_TEST_SKIP_SIGNAL is '0'")
+
di = DaemonInfo.get()
self.assertTrue(di is not None)
if di:
1 year, 1 month
main - lvmdbustest: Check for needed env. variables
by Tony Asleson
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f8876290bfc8d114009...
Commit: f8876290bfc8d11400901e9eac32f6d613b0ed70
Parent: 568e8c71d7e39da7494a470400d3f9977c13a1c7
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Fri Mar 10 10:41:50 2023 -0600
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Fri Mar 10 12:51:53 2023 -0600
lvmdbustest: Check for needed env. variables
---
test/dbus/lvm_error_inject.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/test/dbus/lvm_error_inject.py b/test/dbus/lvm_error_inject.py
index 2849dd29c..098f87070 100755
--- a/test/dbus/lvm_error_inject.py
+++ b/test/dbus/lvm_error_inject.py
@@ -336,8 +336,12 @@ if __name__ == "__main__":
cmdline.extend(args)
ec = run_one(cmdline)
else:
- SH = LvmShellHandler(cmdline)
- ec = SH.run()
+ if "LVM_REPORT_FD" in os.environ:
+ SH = LvmShellHandler(cmdline)
+ ec = SH.run()
+ else:
+ debug('running as lvm shell requires: LVM_REPORT_FD to be set')
+ ec = 1
sys.exit(ec)
except Exception:
traceback.print_exc(file=d_out)
1 year, 1 month
main - lvmdbustest: Don't use hard coded /tmp for error inject log
by Tony Asleson
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=568e8c71d7e39da7494...
Commit: 568e8c71d7e39da7494a470400d3f9977c13a1c7
Parent: 66e79aab367621cbe76bf1e080d6f8693922ea07
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Fri Mar 10 10:41:20 2023 -0600
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Fri Mar 10 12:51:53 2023 -0600
lvmdbustest: Don't use hard coded /tmp for error inject log
---
test/dbus/lvm_error_inject.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/dbus/lvm_error_inject.py b/test/dbus/lvm_error_inject.py
index d00b79b05..2849dd29c 100755
--- a/test/dbus/lvm_error_inject.py
+++ b/test/dbus/lvm_error_inject.py
@@ -42,7 +42,7 @@ def rs(length, character_set=CS):
RS = rs(512)
-d_out = open("/tmp/mitm_lvm.txt", "a")
+d_out = open(os.path.join(tempfile.gettempdir(), "mitm_lvm.txt"), "a")
def debug(msg):
1 year, 1 month
main - lvmdbusd: Add a retries during initial load
by Tony Asleson
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=66e79aab367621cbe76...
Commit: 66e79aab367621cbe76bf1e080d6f8693922ea07
Parent: 9c3b91a513b70e74f21ca40e73f9ad7e3578ac48
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Thu Mar 9 11:29:58 2023 -0600
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Fri Mar 10 12:51:53 2023 -0600
lvmdbusd: Add a retries during initial load
When the daemon is starting we do an initial fetch of lvm state. If we
happened to get some type of failure with lvm during this time we would
exit. During error injection testing this happened enough that
the unit tests were unable to finish. Add retries to ensure we can get
started during error injection testing.
---
daemons/lvmdbusd/fetch.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/daemons/lvmdbusd/fetch.py b/daemons/lvmdbusd/fetch.py
index 9da62590a..9807da934 100644
--- a/daemons/lvmdbusd/fetch.py
+++ b/daemons/lvmdbusd/fetch.py
@@ -228,8 +228,17 @@ class StateUpdate(object):
self.queue = queue.Queue()
self.deferred = False
- # Do initial load
- load(refresh=False, emit_signal=False, need_main_thread=False)
+ # Do initial load, with retries. During error injection testing we can and do fail here.
+ count = 0
+ need_refresh = False # First attempt we are building from new, any subsequent will be true
+ while count < 5:
+ try:
+ load(refresh=need_refresh, emit_signal=False, need_main_thread=False)
+ break
+ except LvmBug as bug:
+ count += 1
+ need_refresh = True
+ log_error("We encountered an lvm bug on initial load, trying again %s" % str(bug))
self.thread = threading.Thread(target=StateUpdate.update_thread,
args=(self,),
1 year, 1 month