]> sourceware.org Git - lvm2.git/log
lvm2.git
17 months agocov: remove unneeded header file inclusion
Zdenek Kabelac [Wed, 10 May 2023 10:55:38 +0000 (12:55 +0200)]
cov: remove unneeded header file inclusion

17 months agocov: validate dev_get_primary_dev result
Zdenek Kabelac [Wed, 10 May 2023 11:28:38 +0000 (13:28 +0200)]
cov: validate dev_get_primary_dev result

Make sure primary_dev is defined when using it.

17 months agotests: needs to be exported for tracing
Zdenek Kabelac [Sat, 6 May 2023 20:39:16 +0000 (22:39 +0200)]
tests: needs to be exported for tracing

17 months agotests: adapt for xfs 300M min size
Zdenek Kabelac [Sat, 6 May 2023 18:11:32 +0000 (20:11 +0200)]
tests: adapt for xfs 300M min size

Some test still were missed to be converted for XFS 300M min size.

17 months agotests: different check for mounted volume
Zdenek Kabelac [Sat, 6 May 2023 17:39:25 +0000 (19:39 +0200)]
tests: different check for mounted volume

It appears newer mount allows repeated mounting ??
Anyway - do the check with grep.

17 months agotests: check for lvmdbusd running in the system
Zdenek Kabelac [Sat, 6 May 2023 18:35:42 +0000 (20:35 +0200)]
tests: check for lvmdbusd running in the system

Check for running (possibly leftover) lvmdbusd running in the
system - as this daemon may interfere with this test as in this
case both be operating on same  'live' data in /run/lvm.

17 months agotests: update lvextend tests
Zdenek Kabelac [Thu, 4 May 2023 23:43:29 +0000 (01:43 +0200)]
tests: update lvextend tests

Make test faster by agregating sets of operation to work on a single
created filesystem yet checking all the variants of extension and reduction.

Split 'xfs' part into separate test and convert it for use of the
minimal size 300M nowdays required by mkfs.xfs.

17 months agoaux: retry brd removal
Zdenek Kabelac [Sat, 6 May 2023 20:38:58 +0000 (22:38 +0200)]
aux: retry brd removal

Try to remove brd twice if there is some collision with udevd.
Instanciate only 1 ramdisk.
Use just 'eval' for '--nameprefixes' results.

17 months agoaux: wipefs_a takes list of devices
Zdenek Kabelac [Sat, 6 May 2023 18:36:28 +0000 (20:36 +0200)]
aux: wipefs_a takes list of devices

Enhance function to take list of device so set of devices
can be wiped with a single call:

aux wipefs_a  "$dev1" "$dev2"

17 months agovdo: document feature option
Zdenek Kabelac [Thu, 27 Apr 2023 21:17:40 +0000 (23:17 +0200)]
vdo: document feature option

17 months agocov: check syscall result
Zdenek Kabelac [Wed, 26 Apr 2023 14:36:42 +0000 (16:36 +0200)]
cov: check syscall result

17 months agocov: remove unused but set variables
Zdenek Kabelac [Wed, 26 Apr 2023 14:32:23 +0000 (16:32 +0200)]
cov: remove unused but set variables

17 months agocleanup: correcting some log_print
Zdenek Kabelac [Wed, 26 Apr 2023 12:40:11 +0000 (14:40 +0200)]
cleanup: correcting some log_print

Correcting to log_print_unless_silent(),
so -qq can do some work.

17 months agocov: some initializers
Zdenek Kabelac [Wed, 26 Apr 2023 12:15:21 +0000 (14:15 +0200)]
cov: some initializers

17 months agocov: hide problem with 64bit time_t
Zdenek Kabelac [Wed, 26 Apr 2023 12:05:12 +0000 (14:05 +0200)]
cov: hide problem with 64bit time_t

17 months agocov: validata top_lv
Zdenek Kabelac [Wed, 26 Apr 2023 11:44:52 +0000 (13:44 +0200)]
cov: validata top_lv

Add explicit pointer check is never NULL.

17 months agocov: ensure there is either vg or error_vg
Zdenek Kabelac [Wed, 26 Apr 2023 11:38:22 +0000 (13:38 +0200)]
cov: ensure there is either vg or error_vg

Make it explicitely visible to coverity that
_process_pvs_in_vg() is not passing  NULL vg.

17 months agocov: ensure NULL baton is not dereferenced
Zdenek Kabelac [Wed, 26 Apr 2023 11:37:41 +0000 (13:37 +0200)]
cov: ensure NULL baton is not dereferenced

17 months agocov: simplier code
Zdenek Kabelac [Wed, 26 Apr 2023 11:20:56 +0000 (13:20 +0200)]
cov: simplier code

Avoid coverity to contruct some abstract scenarions of 'cft'
modification and simplify the code at the same time.

17 months agoFix "lvconvert -m 0 will always take rimage_0 even if it is out-of-sync"
heinzm [Fri, 5 May 2023 13:00:49 +0000 (15:00 +0200)]
Fix "lvconvert -m 0 will always take rimage_0 even if it is out-of-sync"

Bail out in case first rimage is out-of-sync.
Refresh first, i.e. "lvchange --resync $RaidLV",
then retry downgrade to linear after resynchronization.

17 months agolvreduce: make _lvseg_get_stripes handle integrity layer
David Teigland [Tue, 2 May 2023 21:12:23 +0000 (16:12 -0500)]
lvreduce: make _lvseg_get_stripes handle integrity layer

lvreduce uses _lvseg_get_stripes() which was unable to get raid stripe
info with an integrity layer present.  This caused lvreduce on a
raid+integrity LV to fail prematurely when checking stripe parameters.
An unhelpful error message about stripe size would be printed.

17 months agopvck: improve error for write to existing file
David Teigland [Fri, 28 Apr 2023 18:31:39 +0000 (13:31 -0500)]
pvck: improve error for write to existing file

17 months agolvmcache: fix valgrind error when dropping md duplicate
David Teigland [Tue, 25 Apr 2023 19:46:36 +0000 (14:46 -0500)]
lvmcache: fix valgrind error when dropping md duplicate

When lvmcache info is dropped because it's an md component,
then the lvmcache vginfo can also be dropped, but the list
iterator was still using the list head in vginfo, so break
from the loop earlier to avoid it.

17 months agotests: adapt waiting for pvmove start
Zdenek Kabelac [Tue, 25 Apr 2023 17:51:52 +0000 (19:51 +0200)]
tests: adapt waiting for pvmove start

Previous commit cause the pvmove could actually be started in unexpected
order - so make sure, we are not starting new pvmove in same VG until
the previous one is started.

17 months agotests: utils now print also df_h
Zdenek Kabelac [Tue, 25 Apr 2023 13:07:46 +0000 (15:07 +0200)]
tests: utils now print also df_h

Add info about space usage on devices after the test.

Add some more skipped dirs.

17 months agotests: some aux corrections
Zdenek Kabelac [Tue, 25 Apr 2023 13:07:25 +0000 (15:07 +0200)]
tests: some aux corrections

Keep backups within test_dir instead of dev_dir (so it doesn't
leak large files there if the tests are run over real /dev dir).

Move restoring of dm_mirror throttling before test_dir is removed.

17 months agotests: fix pattern for raid4
Zdenek Kabelac [Mon, 24 Apr 2023 20:41:54 +0000 (22:41 +0200)]
tests: fix pattern for raid4

Since the strip in raid4 might be XOR - we might eventually end
with 2 blocks of 'B' on 2 disks - so will rest of stripe with 'b'.

17 months agotests: use 300M lv size for xfs
Zdenek Kabelac [Mon, 24 Apr 2023 20:18:10 +0000 (22:18 +0200)]
tests: use 300M lv size for xfs

17 months agotests: try to retry remove of scsi_debug
Zdenek Kabelac [Mon, 24 Apr 2023 13:26:40 +0000 (15:26 +0200)]
tests: try to retry remove of scsi_debug

Not quite sure if this helps anything, some of testing
machines can't reliably remove scsi_debug, reporting
they are in use - but it's not easily reproducible...

17 months agotests: handle multiple devs with wait_pvmove_lv_ready
Zdenek Kabelac [Mon, 24 Apr 2023 13:24:20 +0000 (15:24 +0200)]
tests: handle multiple devs with wait_pvmove_lv_ready

aux wait_pvmove_lv_ready() now handles multiple pvmove LVs
at one go - which allows a bit fast checking - although
at some point we may need to switch to use delayed devs
since mirror throttling seems to be no longer working well,
as CPU are getting so fast, that most of data are already
pvmoved before throttling has any chance to do something...

17 months agotests: skip some unneeded test
Zdenek Kabelac [Sun, 23 Apr 2023 17:17:08 +0000 (19:17 +0200)]
tests: skip some unneeded test

Skip irelevant tests for polld & lockd pass.

17 months agoaux: use unused brd device for testing
Zdenek Kabelac [Mon, 24 Apr 2023 21:46:50 +0000 (23:46 +0200)]
aux: use unused brd device for testing

When 'brd' device can be removed (is unused AKA not opened),
remove such device and use again for testing.

Let's assume user has no unused brd device left in the system.

When the 'tests' sometimes fail to cleanup devices, with this
change futher cleanup from some next test may evenually release
brd device and make it available for testing.

17 months agoaux: more efficient lvmlock shutdown
Zdenek Kabelac [Mon, 24 Apr 2023 20:18:57 +0000 (22:18 +0200)]
aux: more efficient lvmlock shutdown

17 months agowipe_lv: use zeroing ioctl only for large sizes
Zdenek Kabelac [Mon, 24 Apr 2023 21:58:21 +0000 (23:58 +0200)]
wipe_lv: use zeroing ioctl only for large sizes

There is no easy way to detect, whether device supports zeroing,
and kernel also zeroes device when it's not directly supported,
but with extra message:

operation not supported error, dev X, sector Y op 0x9:(WRITE_ZEROES)...

So to avoid generating such message with every 'lvcreate', use for
zeroing of upto 8K just standard write of zeroed page.
(maybe we can go with even larger sizes).

17 months agofix dev_name use in add_areas_line
David Teigland [Mon, 24 Apr 2023 20:47:45 +0000 (15:47 -0500)]
fix dev_name use in add_areas_line

This function was relying on dev_name() returning NULL
to indicate no device, but dev_name never returns NULL.

17 months agolvmdbus: preserve PATH envvar
Zdenek Kabelac [Sun, 23 Apr 2023 10:49:37 +0000 (12:49 +0200)]
lvmdbus: preserve PATH envvar

17 months agotests: enforce 4K block for integrity fs
Zdenek Kabelac [Sat, 22 Apr 2023 22:03:43 +0000 (00:03 +0200)]
tests: enforce 4K block for integrity fs

With raid tests it's important we don't get spread of 4K file
across 1K block on a multiple disk stripe - so use 4K block size
for ext4 fs.

17 months agoaux: loop doesn't support zeroing discard
Zdenek Kabelac [Sat, 22 Apr 2023 22:02:33 +0000 (00:02 +0200)]
aux: loop doesn't support zeroing discard

To avoid logging unsupported WRITE_ZEROES with loop,
disable usage for this backend device.

17 months agotests: hide some more file in error trace
Zdenek Kabelac [Sat, 22 Apr 2023 09:23:04 +0000 (11:23 +0200)]
tests: hide some more file in error trace

Hide unneeded dev nodes.

17 months agomakefiles: forgotten to install some test config
Zdenek Kabelac [Sat, 22 Apr 2023 09:21:46 +0000 (11:21 +0200)]
makefiles: forgotten to install some test config

rpm testing missed config files.

17 months agotest: use aux wait_recalc
Zdenek Kabelac [Fri, 21 Apr 2023 20:30:50 +0000 (22:30 +0200)]
test: use aux wait_recalc

Use aux function.

17 months agotest: convert to use ext4
Zdenek Kabelac [Fri, 21 Apr 2023 20:28:32 +0000 (22:28 +0200)]
test: convert to use ext4

Modify test to check same properties with less demanding ext4.

17 months agoaux: don't use to new dd options
Zdenek Kabelac [Fri, 21 Apr 2023 20:01:40 +0000 (22:01 +0200)]
aux: don't use to new dd options

Actually  oseek comes only with rawhide's version,
just use the standard option name.

17 months agotests: add data sync
Zdenek Kabelac [Fri, 21 Apr 2023 12:51:47 +0000 (14:51 +0200)]
tests: add data sync

17 months agoaux: add wait_recalc
Zdenek Kabelac [Thu, 20 Apr 2023 15:08:42 +0000 (17:08 +0200)]
aux: add wait_recalc

Share function across tests.

17 months agotests: convert to use ext4
Zdenek Kabelac [Fri, 21 Apr 2023 11:16:36 +0000 (13:16 +0200)]
tests: convert to use ext4

Convert test to use only ext4 instead of 300M demanding XFS.
Shorten  'B' files to 4K and use 4K strip size with >raid1 arrays
so we do not risk spreading of the file across stripe.

Also use easier 'aux corrupt_dev()' method to introduce a bit
corruption into a block device with integrity.

TODO: shorten _wait_recalc (should't be needed).

17 months agotests: use aux clear_dev
Zdenek Kabelac [Fri, 21 Apr 2023 11:16:22 +0000 (13:16 +0200)]
tests: use aux clear_dev

Use wrapper over 'blkdiscard -z'

17 months agoaux: add corrupt_dev
Zdenek Kabelac [Thu, 20 Apr 2023 23:43:13 +0000 (01:43 +0200)]
aux: add corrupt_dev

Add function to corrupt some bytes in give file path presenting
a device.  1st. patern in just once replaced with 2nd. pattern.

Usable to simulate some bit corruption for integrity devices.

17 months agoaux: add clear_dev
Zdenek Kabelac [Thu, 20 Apr 2023 23:35:31 +0000 (01:35 +0200)]
aux: add clear_dev

Function that will use 'blkdiscard -z' and fallbacks
to 'dd' when such option is not available.

17 months agopost-release
Marian Csontos [Fri, 21 Apr 2023 08:36:06 +0000 (10:36 +0200)]
post-release

17 months agopre-release v2_03_21
Marian Csontos [Fri, 21 Apr 2023 08:35:10 +0000 (10:35 +0200)]
pre-release

18 months agolvmdbusd: Add a flag to activate LVs in shared mode to Lv.Activate
Vojtech Trefny [Thu, 20 Apr 2023 09:49:21 +0000 (11:49 +0200)]
lvmdbusd: Add a flag to activate LVs in shared mode to Lv.Activate

18 months agocache: fix snapshot of cache with cachevol
David Teigland [Mon, 10 Apr 2023 16:41:28 +0000 (11:41 -0500)]
cache: fix snapshot of cache with cachevol

Creating a snapshot of a cache LV with a cachevol would fail
because cache_check was not being skipped.

18 months agoremove extra change from support 16KB page size
David Teigland [Fri, 7 Apr 2023 20:57:28 +0000 (15:57 -0500)]
remove extra change from support 16KB page size

18 months agosupport 16KB page size
David Teigland [Fri, 7 Apr 2023 14:05:07 +0000 (09:05 -0500)]
support 16KB page size

18 months agoWHATS_NEW: update
Zdenek Kabelac [Thu, 6 Apr 2023 11:45:42 +0000 (13:45 +0200)]
WHATS_NEW: update

18 months agotests: use less demanding ext4
Zdenek Kabelac [Thu, 6 Apr 2023 11:40:16 +0000 (13:40 +0200)]
tests: use less demanding ext4

18 months agotests: lower demand for disk resources
Zdenek Kabelac [Tue, 4 Apr 2023 12:44:47 +0000 (14:44 +0200)]
tests: lower demand for disk resources

Convert test to use a single skeleton and only different pieces
keep in separate tests.

Lower raid disk usage to smaller size and switch to ext4
as way less demanding fileystem.

18 months agovdo: use fixed size vdopool wrapper
Zdenek Kabelac [Mon, 6 Mar 2023 13:52:59 +0000 (14:52 +0100)]
vdo: use fixed size vdopool wrapper

Instead of using size of 'empty header' in vdopool use fixed size 4K
for a 'wrappeing' vdo-pool device.

This fixes the issue when user tried to activate vdo-pool after
a conversion from vdo managed device with 'vgchange -ay' - where
this command activated all LVs with 'vdo-pool' wrapping device as well,
but this converted pool uses  0-length header.

This 4k size should usually prevent other tools like 'blkid' recognize
such device as anything - so it shouldn't cause any problems with
duplicate indentification of devices.

18 months agocleanup: rename function
Zdenek Kabelac [Mon, 6 Mar 2023 13:52:28 +0000 (14:52 +0100)]
cleanup: rename function

Rename _thin_lv_has_device_id and use common function naming
with _lv_has_thin_device_id().

18 months agocleanup: simplify
Zdenek Kabelac [Wed, 1 Mar 2023 20:05:47 +0000 (21:05 +0100)]
cleanup: simplify

18 months agoconfigure: update
Zdenek Kabelac [Wed, 1 Mar 2023 08:40:53 +0000 (09:40 +0100)]
configure: update

autoreconf

18 months agoconfigure.ac: print locking dir
Zdenek Kabelac [Tue, 28 Feb 2023 22:13:00 +0000 (23:13 +0100)]
configure.ac: print locking dir

Correcting output results from configure script when
printing locking dir.

Shuffle dmfilemapd close to dmeventd option and tracing.

Couple indent changes.

18 months agointegrity: hide creation of internal LVs
Zdenek Kabelac [Sat, 25 Feb 2023 19:29:05 +0000 (20:29 +0100)]
integrity: hide creation of internal LVs

Creation of 'hidden' local LVs should be visible only in
verbose mode (-v) when creating a raid LV with integrity.

18 months agoraidintegrity: allow writecache and cache
David Teigland [Fri, 17 Mar 2023 21:39:48 +0000 (16:39 -0500)]
raidintegrity: allow writecache and cache

Allow writecache|cache over raid+integrity LV.

18 months agotests: integrity fixes
David Teigland [Thu, 16 Mar 2023 18:59:56 +0000 (13:59 -0500)]
tests: integrity fixes

wait_recalc was mistakenly being called on raid without integrity
wait_recalc loop was exiting without error

18 months agolvmdbusd: Correct seg. fault on s390x ELN
Tony Asleson [Thu, 30 Mar 2023 15:10:23 +0000 (10:10 -0500)]
lvmdbusd: Correct seg. fault on s390x ELN

syscall 186 is specific to x86 64bit.  As this is different from arch
to arch and between same arch different arch size we will only grab
thread ID using built-in python support if it is supported.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2166931

18 months agolvmdbusd: Correct locking for _common_log
Tony Asleson [Thu, 30 Mar 2023 15:07:13 +0000 (10:07 -0500)]
lvmdbusd: Correct locking for _common_log

Reduce the lock time and include the flush in the lock.

Reported by: Zbigniew JÄ™drzejewski-Szmek <zbyszek@in.waw.pl>

18 months agoFix import of utils from lvmdbusd.cfg
Adam Williamson [Tue, 21 Mar 2023 18:46:54 +0000 (11:46 -0700)]
Fix import of utils from lvmdbusd.cfg

Signed-off-by: Adam Williamson <awilliam@redhat.com>
19 months agopost-release
Marian Csontos [Tue, 21 Mar 2023 12:36:36 +0000 (13:36 +0100)]
post-release

19 months agopre-release v2_03_20
Marian Csontos [Tue, 21 Mar 2023 12:35:48 +0000 (13:35 +0100)]
pre-release

19 months agomake: generate
Marian Csontos [Tue, 21 Mar 2023 12:33:14 +0000 (13:33 +0100)]
make: generate

19 months agotests: nomda-restoremissing
David Teigland [Mon, 20 Mar 2023 17:42:50 +0000 (12:42 -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.

19 months agolvmdbusd: Add a new 'Shared' property to the Vg interface
Vojtech Trefny [Wed, 15 Mar 2023 11:31:14 +0000 (12:31 +0100)]
lvmdbusd: Add a new 'Shared' property to the Vg interface

Signed-off-by: Vojtech Trefny <vtrefny@redhat.com>
19 months agolvmdbustest: Correct env. logic
Tony Asleson [Tue, 14 Mar 2023 13:05:57 +0000 (08:05 -0500)]
lvmdbustest: Correct env. logic

Signed-off-by: Tony Asleson <tasleson@redhat.com>
19 months agolvmdbustest: Add notes on error injection testing
Tony Asleson [Fri, 10 Mar 2023 16:44:55 +0000 (10:44 -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%.

19 months agolvmdbustest: Add env. variable to skip signal testing
Tony Asleson [Fri, 10 Mar 2023 16:43:02 +0000 (10:43 -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.

19 months agolvmdbustest: Check for needed env. variables
Tony Asleson [Fri, 10 Mar 2023 16:41:50 +0000 (10:41 -0600)]
lvmdbustest: Check for needed env. variables

19 months agolvmdbustest: Don't use hard coded /tmp for error inject log
Tony Asleson [Fri, 10 Mar 2023 16:41:20 +0000 (10:41 -0600)]
lvmdbustest: Don't use hard coded /tmp for error inject log

19 months agolvmdbusd: Add a retries during initial load
Tony Asleson [Thu, 9 Mar 2023 17:29:58 +0000 (11:29 -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.

19 months agolvmdbustest: Shutdown cleanly with "exit"
Tony Asleson [Thu, 9 Mar 2023 17:27:19 +0000 (11:27 -0600)]
lvmdbustest: Shutdown cleanly with "exit"

Make the error injection wrapper handle the exit case, so that we can
clean up gracefully when instructed to do so.

19 months agolvmdbustest: Only inject 1 missing key error
Tony Asleson [Thu, 9 Mar 2023 17:25:58 +0000 (11:25 -0600)]
lvmdbustest: Only inject 1 missing key error

Previously we were injecting a missing key in the lv, vg, and pv.
Given the order of processing in lvmdbusd, this prevented us from
exercising all the error paths.  Change to returning just 1 instead.

19 months agolvmdbustest: Correctly set up env. for error injection
Tony Asleson [Thu, 9 Mar 2023 17:23:47 +0000 (11:23 -0600)]
lvmdbustest: Correctly set up env. for error injection

19 months agolvmdbustest: open log file with "a"
Tony Asleson [Thu, 9 Mar 2023 17:22:51 +0000 (11:22 -0600)]
lvmdbustest: open log file with "a"

So we retain the log across fork & exec and lvm shell testing.

19 months agolvmdbusd: Handle missing key in get_key
Tony Asleson [Thu, 9 Mar 2023 17:21:27 +0000 (11:21 -0600)]
lvmdbusd: Handle missing key in get_key

When we sort the LVs, we can stumble on a missing key, protect against
this as well.

Seen in error injection testing:
Traceback (most recent call last):
  File "/home/tasleson/projects/lvm2/daemons/lvmdbusd/fetch.py", line 198, in update_thread
    num_changes = load(*_load_args(queued_requests))
  File "/home/tasleson/projects/lvm2/daemons/lvmdbusd/fetch.py", line 83, in load
    rc = MThreadRunner(_main_thread_load, refresh, emit_signal).done()
  File "/home/tasleson/projects/lvm2/daemons/lvmdbusd/utils.py", line 726, in done
    raise self.exception
  File "/home/tasleson/projects/lvm2/daemons/lvmdbusd/utils.py", line 732, in _run
    self.rc = self.f(*self.args)
  File "/home/tasleson/projects/lvm2/daemons/lvmdbusd/fetch.py", line 40, in _main_thread_load
    (lv_changes, remove) = load_lvs(
  File "/home/tasleson/projects/lvm2/daemons/lvmdbusd/lv.py", line 148, in load_lvs
    return common(
  File "/home/tasleson/projects/lvm2/daemons/lvmdbusd/loader.py", line 37, in common
    objects = retrieve(search_keys, cache_refresh=False)
  File "/home/tasleson/projects/lvm2/daemons/lvmdbusd/lv.py", line 72, in lvs_state_retrieve
    lvs = sorted(cfg.db.fetch_lvs(selection), key=get_key)
  File "/home/tasleson/projects/lvm2/daemons/lvmdbusd/lv.py", line 35, in get_key
    pool = i['pool_lv']
KeyError: 'pool_lv'

19 months agolvmdbusd: Replace assert with exception
Tony Asleson [Thu, 9 Mar 2023 17:19:29 +0000 (11:19 -0600)]
lvmdbusd: Replace assert with exception

Instead of using an assert we will raise an LvmBug exception

19 months agotests: update missing-pv
David Teigland [Wed, 8 Feb 2023 23:17:30 +0000 (17:17 -0600)]
tests: update missing-pv

add more checks and expand comments explaining behavior

19 months agovg_read: keep MISSING_PV when device with no mda reappears
David Teigland [Wed, 8 Feb 2023 19:34:35 +0000 (13:34 -0600)]
vg_read: keep MISSING_PV when device with no mda reappears

Remove old code that became incorrect at some point.
It's probably a fragment of an old condition that was left
behind because it wasn't understood.  We don't want to drop
the MISSING_PV flag just because the PV has no mda in use.
The device that was missing may have stale data, so the user
needs to decide if the device should be removed or restored.

19 months agotests: vg-raid-takeover
David Teigland [Tue, 7 Feb 2023 21:25:46 +0000 (15:25 -0600)]
tests: vg-raid-takeover

Different sequences of steps that could be used to handle raid LVs
after VG takeover (what would happen in cluster failover) combined
with the loss of a disk.

19 months agovgchange: allow changing system ID with majority of PVs
David Teigland [Thu, 7 Jul 2022 21:06:01 +0000 (16:06 -0500)]
vgchange: allow changing system ID with majority of PVs

when used with --majoritypvs.  This allows the fail-over
of a VG between systems by changing the VG system ID when
a PV is missing.

19 months agolvmlockd: clean up get_local_nodeid
David Teigland [Wed, 8 Mar 2023 17:11:32 +0000 (11:11 -0600)]
lvmlockd: clean up get_local_nodeid

Hard to see if fclose calls were correct, and coverity couldn't figure
it out either, so make it clear.

19 months agotoollib: fix segfault if using -S|--select with log/report_command_log=1 setting
Peter Rajnoha [Tue, 7 Mar 2023 13:45:06 +0000 (14:45 +0100)]
toollib: fix segfault if using -S|--select with log/report_command_log=1 setting

When we are using -S|--select for non-reporting tools while using command log
reporting (log/report_command_log=1 setting), we need to create an internal
processing handle to handle the selection itself. In this case, the internal
processing handle to execute the selection (to process the -S|--select) has
a parent handle (that is processing the actual non-reporting command).

When this parent handle exists, we can't destroy the command log report
in destroy_processing_handle as there's still the parent processing to
finish. The parent processing may still generate logs which need to be
reported in the command log report. If the command log report was
destroyed prematurely together with destroying the internal processing
handle for -S|--select, then any subsequent log request from processing
the actual command (and hence an attermpt to access the command log report)
ended up with a segfault.

See also: https://bugzilla.redhat.com/show_bug.cgi?id=2175220

19 months agolvmdbusd: Add needed env. variables
Tony Asleson [Mon, 6 Mar 2023 16:26:44 +0000 (10:26 -0600)]
lvmdbusd: Add needed env. variables

When running lvmdb.py by itself for testing we need these.

19 months agolvmdbusd: Move cfg.lvmdebug data init
Tony Asleson [Mon, 6 Mar 2023 16:25:22 +0000 (10:25 -0600)]
lvmdbusd: Move cfg.lvmdebug data init

Move this to the cfg file itself, so that initialization runs when it
gets processed.

19 months agolvmdbustest: Test duplicate VG rename
Tony Asleson [Fri, 3 Mar 2023 17:17:30 +0000 (11:17 -0600)]
lvmdbustest: Test duplicate VG rename

19 months agolvmdbustest: Add more info on asserts
Tony Asleson [Thu, 2 Mar 2023 17:44:16 +0000 (11:44 -0600)]
lvmdbustest: Add more info on asserts

19 months agolvmdbustest: Don't hard code to /tmp
Tony Asleson [Wed, 1 Mar 2023 21:59:14 +0000 (15:59 -0600)]
lvmdbustest: Don't hard code to /tmp

During lvm testing they use an alternative tmp directory.

19 months agolvmdbustest: Add more output for test_log_file_option
Tony Asleson [Wed, 1 Mar 2023 21:52:23 +0000 (15:52 -0600)]
lvmdbustest: Add more output for test_log_file_option

19 months agolvmdbustest.py: Increase udev timeout
Tony Asleson [Wed, 1 Mar 2023 21:25:00 +0000 (15:25 -0600)]
lvmdbustest.py: Increase udev timeout

19 months agolvmdbusd: Remove unused import
Tony Asleson [Mon, 27 Feb 2023 15:57:18 +0000 (09:57 -0600)]
lvmdbusd: Remove unused import

This page took 0.068223 seconds and 5 git commands to generate.