1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 20:25:52 +03:00
Commit Graph

1801 Commits

Author SHA1 Message Date
Zdenek Kabelac
561f773bb4 tests: add check grep_dmsetup
Add simple helper/wrapper check function to check result
of dmsetup call i.e.:

check grep_dmsetup table vg-lv  "grep_expected"
check grep_dmsetup status vg-lv -v "grep_unexpected"
2016-09-19 14:00:56 +02:00
Zdenek Kabelac
629059ee84 tests: Revert "tests: not redirect strderr to stdout"
This reverts commit 5314d36f3d.

Ok - some tests do look for 'stderr' output of 'not' commands.
So let's keep existing functionality.
2016-09-13 13:23:47 +02:00
Zdenek Kabelac
cebcc8a604 tests: slightly bigger raid arrays
Just to ensure we catch devices in sync.
2016-09-13 12:25:36 +02:00
Zdenek Kabelac
08c94de798 tests: more permissive on test percent value
Just check there is some output.
Values may slightly differ per policy target version.
2016-09-13 12:25:36 +02:00
Zdenek Kabelac
d34e315b8d tests: use just single raid_leg_status
Simplify 'check' test actualy and correct printed tracing output
2016-09-13 12:25:36 +02:00
Zdenek Kabelac
5314d36f3d tests: not redirect strderr to stdout
Errors are 'wanted' and expected in this case.
2016-09-13 12:25:06 +02:00
Zdenek Kabelac
4ddcbe22b7 tests: slow down disks more 2016-09-12 16:51:53 +02:00
Zdenek Kabelac
5b55f9616d tests: add check function for raid leg status
2 new check test functions:

raid_leg_status    - to just compare
raid_leg_status_is - to compare and die when different
2016-09-12 16:51:53 +02:00
Zdenek Kabelac
44f1f45e16 tests: use exclusive activation
Slightly better for clvmd - thought test is still crashing
as table is broken.
2016-09-12 16:51:53 +02:00
Zdenek Kabelac
a4363fbcb5 tests: move cache test to separate file
Don't mix plain raid test with  'raid+cache' test.
2016-09-12 16:49:51 +02:00
Zdenek Kabelac
75a42845c1 tests: rename test _ -> -
Change '_' in the test name.
2016-09-09 20:59:21 +02:00
Zdenek Kabelac
6166cea5bf tests: increate delay for raid rebuild
Delay writes just to usable extents on a PV
(so lvm2 metadata update remains fast).
Raise delay to 10ms for write.
2016-09-09 20:59:21 +02:00
Zdenek Kabelac
06e36fb434 tests: skip synaction test in cluster for now
Until we resolve it - we do not support syncaction on clustered VG.
2016-09-09 20:55:01 +02:00
Zdenek Kabelac
e5ec348d68 tests: lowering disc usage
Correction for aux test result  ([] -> if;then;fi)

Use issue_discard to lower memory demands on discardable test devices
Use large devices directly through prepare_pvs

I'm still observing more then 0.5G of data usage through.

Particullary:

'lvcreate' followed by 'lvconvert' (which doesn't yet support --nosync
option)  is quite demanging, and resume returns quite 'late' when
a lot of data has been already written on PV.
2016-09-09 20:55:00 +02:00
Zdenek Kabelac
454b891f6d cache: fix reporting of dirty cache
When cache has zero used blocks it's been wrongly reported as 100.00% dirty.
Fix it and report 0.00.
2016-09-09 20:53:36 +02:00
Zdenek Kabelac
4b22cd81e6 cache: report metadata percentage
Reinstantiate reporting of metadata percent usage for cache volumes.
Also show the same percentage with hidden cache-pool LV.
This regression was caused by optimization for a single-ioctl in
2.02.155.
2016-09-09 15:01:35 +02:00
Zdenek Kabelac
a13440d7ca tests: lower allocated memory
Use  smaller mirror to have faster sync.
TODO: switch to delayed devs...
2016-09-07 16:43:42 +02:00
Brassow Jonathan
5838c41a35 cache: scrubbing for cache origin LV - Bug 1169495
Allow RAID scrubbing on cache origin sub-LV

This patch adds the ability to perform RAID scrubbing on the cache
origin sub-LV (https://bugzilla.redhat.com/1169495).  Cache origin
operations are restricted to non-clustered RAID LVs until there can
be further testing in a cluster (even for exclusive activation).

User can either specify directly _corig LV
or he can specify cache LV and operation  --syncation is
passed ONLY to   _corig LV.

If users wants to manipulation with cache-pool devices - he
needs to specify this object name.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
2016-09-07 16:42:32 +02:00
Zdenek Kabelac
3a4267ade4 tests: skip test for older cache target
Some test on older can targets are not going to work, and
since there is no other fix then using newer kernel - skip
such tests completely.
2016-08-31 11:13:59 +02:00
Tony Asleson
257ce5733e lvmdbustest.py: Add tag regression test
Add '-' back in as acceptable tag character
2016-08-29 17:59:42 -05:00
Tony Asleson
756f51eac8 test/lib/aux.sh: Remove incorrect comment
The dbus service needs to use the system bus.  The test environment does
not allow work with session bus environment.
2016-08-29 15:26:56 -05:00
Tony Asleson
7c386bf4d4 test/lib/aux.sh: Remove '--udev' for lvmdbusd start
The service will start up with udev monitoring and disable it if lvm
starts calling ExternalEvent.
2016-08-29 15:26:56 -05:00
Tony Asleson
70d4e2e8d5 lvmdbusd: Handle different daemon options
- Prevent --lvmshell with --nojson, not a valid combination
- If user is preventing json, then no lvmshell usage
- Return boolean on Manager.UseLvmShell
2016-08-29 15:26:56 -05:00
Tony Asleson
1d1fe00846 lvmdbusd: Include lvm shell testing as the default 2016-08-29 15:26:56 -05:00
Tony Asleson
313c40ed09 dbus/testlib.py: Improve type checking
Leverage the introspection data to ensure that the service is returning
what is says it will be returning for methods and properties.
2016-08-29 15:26:56 -05:00
Tony Asleson
9aed18a571 lvmdbustest.py: Remove '-' from tag ch set 2016-08-29 15:26:55 -05:00
Zdenek Kabelac
b493811968 cache: introduce cache_pool_max_chunks
Introduce 'hard limit' for max number of cache chunks.
When cache target operates with too many chunks (>10e6).

When user is aware of related possible troubles he
may increase the limit in lvm.conf.

Also verbosely inform user about possible solution.

Code works for both lvcreate and lvconvert.

Lvconvert fully supports change of chunk_size when caching LV
(and validates for compatible settings).
2016-08-29 20:47:31 +02:00
Peter Rajnoha
fc93f10892 tests: also fix typo in report/columns_as_rows in tests 2016-08-25 16:25:23 +02:00
Heinz Mauelshagen
b0e07d516e test: delay writes to all test PVs in lvchange-rebuild-raid.sh to avoid race 2016-08-25 01:37:34 +02:00
Heinz Mauelshagen
bff470f83f test: add missing lvchange-rebuild-raid.sh 2016-08-24 18:22:34 +02:00
Heinz Mauelshagen
d83f2d766d pvmove: fix regression introduced with 8e9d5d12ae
'pvmove -n name pv1 pv2' called with the name of a top-level LV
failed with mentioned commit.

Enhance pvmove-raid-segtypes.sh to test for prohibited RAID SubLV moves.
2016-08-15 19:31:04 +02:00
Heinz Mauelshagen
bb9789f2b3 test: fix/enhance lvcreate-large-raid*.sh
Multi-step extend to even larger raid10 LV lvcreate-large-raid.sh.

Comment fixes.
2016-08-09 18:16:01 +02:00
Heinz Mauelshagen
48e14390c1 test: fix lvcreate-large-raid.sh
RAID6 LVs may not be created with --nosync or data corruption
may occur in case of device failures.  The underlying MD raid6
personality used to drive the RaidLV performs read-modify-write
updates on stripes and thus relies on properly written parity
(P and Q Syndromes) during initial synchronization.

Once on it, enhance test to create/extend more and
larger RaidLVs and check sync/nosync status.
2016-08-09 17:45:37 +02:00
Heinz Mauelshagen
3d3f62e10a test: add lvconvert-raid-takeover.sh
Commit 76ef2d15d8 introduced
raid0 <-> raid4 takeover and full mirror <-> raid1 support.

Add tests for these conversions.

Tests exposed a kernel semantics change freezing resynchronization
on conversions from raid0[_meta] -> raid4 or adding raid1 legs
because kernel kept the RAID mapped device in 'frozen' state unless
an 'idle' message was sent or the table was reloaded (kernel patch pending).
2016-08-09 14:17:26 +02:00
Alasdair G Kergon
175e0905d5 test: Drop --mirrorlog when not a mirror. 2016-08-08 18:43:54 +01:00
Heinz Mauelshagen
7d6cf12554 lvcreate: reject '--nosync' option for RAID6 LVs
The MD raid6 personality being used to drive lvm raid6 LVs does
read-modify-write updates to any stripes and thus relies on correct
P and Q Syndromes being written during initial synchronization or
it may fail reconstructing proper user data in case of SubLVs failing.

We may not allow the '--nosync' option on
creation of raid6 LVs for that reason.

Update/fix 'man lvcreate' in that regard.

add lvcreate-raid-nosync.sh test script.

- Resolves rhbz1358532
2016-08-08 13:52:35 +02:00
Heinz Mauelshagen
d2c3b23e6d lvchange: Allow device specification when requesting a repair
'lvchange --resync LV' or 'lvchange --syncaction repair LV' request the
RAID layout specific parity blocks in raid4/5/6 to be recreated or the
mirrored blocks to be copied again from the master leg/copy for raid1/10,
thus not allowing a rebuild of a particular PV.

Introduce repeatable option '--[raid]rebuild PV' to allow to request
rebuilds of specific PVs in a RaidLV which are known to contain corrupt
data (e.g. rebuild a raid1 master leg).

Add test lvchange-rebuild-raid.sh to test/shell doing rebuild
variations on raid1/10 and 5; add aux function check_status_chars
to support the new test.

 - Resolves rhbz1064592
2016-08-05 16:01:46 +02:00
Zdenek Kabelac
02ddd48c11 tests: updates for new raid allocation logic
(with backward compatible settings user as well to check old logic
is still available when needed).
2016-07-28 16:37:20 +02:00
Zdenek Kabelac
9ad30b0b38 tests: check we don't warn when converting to thin LV
Tool produced warning for non-zeroing thin-pools.
2016-07-27 16:20:57 +02:00
Zdenek Kabelac
0c3a09f1d7 tests: adapt for new cache-pool zeroing 2016-07-27 16:20:57 +02:00
Peter Rajnoha
f66ae6e80f tests: add pv-ext-update.sh test
Tests automatic update of PV header (its "extension" part) to recent
version.
2016-07-27 12:17:21 +02:00
Zdenek Kabelac
7fc1617819 tests: check thin resize of raid10 2016-07-22 14:41:47 +02:00
Zdenek Kabelac
9d19c1075f tests: enforce flush of cache target
Since now  lvm command no longer is flushing cache target with status
query - enforce it with extra status.
2016-07-19 17:39:46 +02:00
Zdenek Kabelac
d2bb19e883 tests: check fail path on cache creation 2016-07-15 15:49:01 +02:00
Zdenek Kabelac
a57bf37cdb tests: require better cache driver
Version 1.4 can't handle this test without killing itself.
2016-07-15 15:49:01 +02:00
Zdenek Kabelac
0b773eecd9 tests: skip more cache tests for older driver 2016-07-13 21:52:14 +02:00
Zdenek Kabelac
07587c2699 tests: resize of filesystem
Test for https://bugzilla.redhat.com/1354396
2016-07-13 21:52:14 +02:00
Zdenek Kabelac
957480f4b9 tests: remove more test
Try to remove more tests before confusing older driver to death.
2016-07-12 13:20:56 +02:00
Zdenek Kabelac
1891fa8272 tests: cache error message changes too often
Until lvconvert stabilize, avoid testing resulting error message.
2016-07-12 13:20:56 +02:00
Zdenek Kabelac
06a9dab730 tests: skip some tests for older cache driver
Cache target 1.4 on f19 kernel shows error, skipping some tests...
2016-07-11 15:45:28 +02:00