1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

1819 Commits

Author SHA1 Message Date
Tony Asleson
d906fd5201 lvmdbustest.py: Make sure to test for hidden lookups
Test both vgname/[hidden] and vgname/hidden forms
2016-09-27 13:28:54 -05:00
Tony Asleson
ec076b1df2 lvmdbustest.py: Make env variable work 2016-09-27 13:28:45 -05:00
Heinz Mauelshagen
f2efd04052 tests: fix raid rebuild tests to work with older target versions
Pre 1.9 dm-raid targets status output was racy, which caused
the device status chars to be unreliable _during_ synchronization.
This shows paritcularly with tiny test devices used.

Enhance lvchange-rebuild-raid.sh to not check status
chars _during_ synchronization. Just check afterwards.
2016-09-22 23:35:37 +02:00
Zdenek Kabelac
38a6a39daa tests: raid repair needs devices in-sync
Though I'm not quite sure why we push this limit on user,
current --repair logic requires user to wait outside of command.

TODO: I'm not quite sure this repair logic is 'the most wanted'.
2016-09-22 15:46:18 +02:00
Zdenek Kabelac
eb6b2a11e3 tests: check for TRIM support
passdown can really work only on discardable device.
Skip 'status' test when PV does no support discard.
2016-09-22 15:37:52 +02:00
Heinz Mauelshagen
5d455b28fc lvconvert: fix (automatic) raid repair regression
The dm-raid target now rejects device rebuild requests during ongoing
resynchronization thus causing 'lvconvert --repair ...' to fail with
a kernel error message. This regresses with respect to failing automatic
repair via the dmeventd RAID plugin in case raid_fault_policy="allocate"
is configured in lvm.conf as well.

Previously allowing such repair request required cancelling the
resynchronization of any still accessible DataLVs, hence reasoning
potential data loss.

Patch allows the resynchronization of still accessible DataLVs to
finish up by rejecting any 'lvconvert --repair ...'.

It enhances the dmeventd RAID plugin to be able to automatically repair
by postponing the repair after synchronization ended.

More tests are added to lvconvert-rebuild-raid.sh to cover single
and multiple DataLV failure cases for the different RAID levels.

- resolves: rhbz1371717
2016-09-21 00:39:29 +02:00
Zdenek Kabelac
78e0fdb618 tests: correcting kernel version test
Debug force leaked in.
2016-09-20 22:50:43 +02:00
Zdenek Kabelac
9f6b006272 tests: show some more device info
When passdown is not there, look for possible reason.
2016-09-20 22:47:14 +02:00
Zdenek Kabelac
994df22b60 tests: read messages instead of syslog
Since on those older system there is rather 'fight' over
syslog reading buffer - lets read output from /var/log/messages
intead.
2016-09-20 22:36:29 +02:00
Zdenek Kabelac
a9c2a62939 tests: kernel message for <3.5 kernels
Since /dev/kmsg is useless on kernel <3.5 user there automatically
syslog to obtain traces from kernel log buffer during test.
2016-09-20 17:09:46 +02:00
Zdenek Kabelac
67d4b3b7f2 cache: restore reported origin field
Commit 199697accf rerouted funtion
for priting cache volume origin to lvm2app app function - which
however had a bug.  So restore the original functionality
and print correct LV as cache origin LV.
2016-09-20 14:26:11 +02:00
Tony Asleson
d18ea3f2cb lvmdbustest: Remove pyudev deprecated warnings 2016-09-19 15:32:47 -05:00
Tony Asleson
c23d5f63fd lvmdbustest: ws fix-ups 2016-09-19 15:32:47 -05:00
Tony Asleson
cb2b261510 lvmdbustest.py: Test with/without timeout values
Because of the different code paths we need to test job handling with
all operations.  Test now runs virtually everything with timeout == 0
and timeout == 15 so that we test both use cases.

Note:  If a client passes -1 for the timeout value they need to make
sure that their connection time out is also infinite.  Otherwise, if the client
times out the service side hangs any new dbus calls until the job
that is in progress completes.  Not sure why this behavior is occuring
at this time, but it appears a limitation/bug of the dbus-python library.
2016-09-19 15:32:27 -05:00
Tony Asleson
65f59184c8 lvmdbustest.py: Make methods static
Changed methods to be static that should be.
2016-09-19 15:31:04 -05:00
Tony Asleson
ac2fc7a366 lvmdbusd: Vg.LvCreate* methods, correct return type
The methods were returning an instance of the object instead of the
object path which was causing an exception when the result was returned
with the job object as we are explicity trying to return an object path.

Unit test added which re-creates the issue and verifies the fix.
2016-09-19 15:31:04 -05:00
Zdenek Kabelac
b3b8834724 tests: enhance lvchange of thin pool tests
Validate also content of dmtable.
Check operations with unused thin-pool as well.
2016-09-19 14:00:56 +02:00
Zdenek Kabelac
1a30adc062 tests: check for metadata test working properly
Add more tests to check they guard minimum free space in metadata
for new thin volume creation.
2016-09-19 14:00:56 +02:00
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