1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-25 01:34:38 +03:00
Commit Graph

375 Commits

Author SHA1 Message Date
Alasdair Kergon
23dd62ec54 add copyright notices to new files 2010-07-28 12:20:38 +00:00
Petr Rockai
3c5d941945 Do not create a clustered volume group in t-nomda-missing. 2010-07-27 21:08:32 +00:00
Petr Rockai
2f54dbd28c Make vgck warn about missing PVs. 2010-07-27 20:05:29 +00:00
Petr Rockai
2dcdb807f8 Don't fail t-pvcreate-operation-md if mdadm is broken. 2010-07-21 14:12:47 +00:00
Dave Wysochanski
44dd5c38e2 Add --force to pvchange, and allow override of prompt involving metadataignore.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-07-07 19:14:57 +00:00
Dave Wysochanski
52cf11338e Test failed commit of mda on new pv - failed vgextend.
Test the auto-repair capability when we fail committing to an mda
on a new pv adding to a vg.  This test should fail until we fix
the auto-repair in this case.
2010-07-07 14:43:57 +00:00
Dave Wysochanski
19a12b28bc Update metadata-balance test for --vgmetadatacopies 0.
Should be equivalent to "unmanaged".
2010-06-30 22:22:00 +00:00
Milan Broz
e260ecef0b Fix vgremove to allow removal of VG with missing PVs. (2.02.52) 2010-06-30 14:01:39 +00:00
Dave Wysochanski
aa00196b6f Update nightly tests for vgextend --metadataignore. 2010-06-30 13:04:59 +00:00
Dave Wysochanski
652e9c00c5 Update pvcreate tests for --metadataignore. 2010-06-30 12:17:55 +00:00
Dave Wysochanski
28e0d5dd64 Update t-covercmd pvck to take proper device argument. 2010-06-28 21:49:31 +00:00
Dave Wysochanski
4b660a89d9 Update tests to handle phase 2 (vg based) metadata balance.
Test vgcreate/vgchange --vgmetadatacopies, vgextend, vgreduce,
vgsplit, vgmerge.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-06-28 20:40:27 +00:00
Dave Wysochanski
fe260a26ed Ensure --metadatacopies parameter gets interpreted based on command.
Now that we have both --pvmetadatacopies and --vgmetadatacopies,
we need to make sure --metadatacopies gets interpreted correctly.

For pv commands, --metadatacopies should imply --pvmetadatacopies,
and for vg commands, --vgmetadatacopies.

Note: this will change the behavior of vgcreate with --metadatacopies
to be a synonym for --vgmetadatacopies.  Previously, --metadatacopies
would apply to any PVs given with vgcreate that needed an implicit
pvcreate.  As a result, one small change is needed to one of the nightly
tests - t-vgcreate-usage.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-06-28 20:39:39 +00:00
Dave Wysochanski
a563816d3a Add tests for phase 1 of metadata balance - manage per-PV ignore bit.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-06-28 20:36:06 +00:00
Petr Rockai
80328439be Minor shell style cleanup. 2010-06-28 19:13:33 +00:00
Petr Rockai
8f0fa65379 Add a test of wait_for_locks behaviour (adapted from an original by Dave). 2010-06-24 07:57:54 +00:00
Milan Broz
a9ffbb0803 Require partial option in lvchange --refresh for partials LVs.
We must not refresh LV if some PVs are missing and partial activation
was not requested.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=598886
2010-06-03 12:45:05 +00:00
Milan Broz
afe102c0fe Fix topology test after last changes to not leak loop devices. 2010-05-24 19:27:38 +00:00
Milan Broz
3c2b019578 Use mv -f for replace config in test. 2010-05-24 17:19:50 +00:00
Milan Broz
87003ba5b1 Replace lvm.conf instead of truncating it. 2010-05-24 17:18:05 +00:00
Petr Rockai
bf7d3d2208 t-lvconvert-repair-transient hangs on .33 and on RHEL6 kernel -> disable 2010-05-24 16:33:21 +00:00
Petr Rockai
954df8f3d7 Account for mirror transient status when doing lvconvert --repair. 2010-05-24 15:32:20 +00:00
Petr Rockai
078573dc2c Skip t-pvcreate-operation-md if mdadm fails to create the required device. 2010-05-24 15:28:45 +00:00
Dave Wysochanski
f649252de9 Test lvm_vgname_from_{pvid|device}. 2010-05-19 11:53:30 +00:00
Alasdair Kergon
578c4098e6 Use -d to control level of messages sent to syslog by dmeventd.
Change -d to -f to run dmeventd in foreground.
(mornfall)
2010-05-14 14:56:39 +00:00
Petr Rockai
8c998ebbed Chop up the big t-lvconvert-mirror-basic loop across 4 separate test scripts
(and use sourcing to avoid code duplication).
2010-05-12 13:15:38 +00:00
Petr Rockai
e2eb9b24b7 Run tests in alphabetical (and thus stable across machines) order. 2010-05-12 11:59:46 +00:00
Petr Rockai
374e3502fe Bump the debug.log level from 4 to 9 (the numbering is different from verbose). 2010-05-12 11:58:51 +00:00
Petr Rockai
1ad6e72ade Revert the "repeat failed tests with -vvvv" feature. Instead, dump debug logs
to a file using log/file, with log/overwrite set and dump this file in
STACKTRACE. The overall effect is that only the command that ran last before
the failure has been triggered will get its debug output logged. This is
similar to how we treat coredumps.
2010-05-12 11:23:16 +00:00
Petr Rockai
d7eaafe9c1 A fairly extensive refactor of the mirror testing code. The exhaustive
lvconvert testing is now in its own test, t-lvconvert-mirror-basic ... it
doesn't do anything fancy but it does run lvconvert through a lot of
combinations.

I have also merged the remaining t-mirror-lvconvert tests into
t-lvconvert-mirror and abolished the former. The latter will be split again
later into more thematic divisions. (The previous split was rather arbitrary,
may I even say random...)
2010-05-12 10:08:35 +00:00
Petr Rockai
2400150734 Revert the huge device creation in t-lvconvert-mirror and downgrade the
race-induced failure to a warning, until we have a better fix for this.
2010-05-12 06:09:22 +00:00
Petr Rockai
8ad2a270f4 Add a test for activation in presence of missing devices. This partially covers
the robustness requirements for system startup that we have.
2010-05-12 06:02:28 +00:00
Petr Rockai
73a006403f Rename t-partial-activate to t-activate-partial (more activation tests coming). 2010-05-12 05:59:24 +00:00
Petr Rockai
a3513577f0 The "should" testing utility should actually only give a warning when the
command fails.
2010-05-12 05:55:42 +00:00
Petr Rockai
29ad12df51 Improve the "check" testing utility: slightly refactor and provide
active/inactive checks.
2010-05-12 05:55:08 +00:00
Petr Rockai
b7983d4fe2 Add a basic test for dmeventd triggering lvconvert --repair. Needs improvement. 2010-05-06 19:01:26 +00:00
Petr Rockai
6120f4c507 Add some basic provisions for automated testing of dmeventd. 2010-05-06 18:54:51 +00:00
Petr Rockai
6c1beb94dc Add a "should" alongside "not" to the test utilities. When a "should" command
fails, the test will carry on but will issue a warning. The harness detects
such warnings from tests and marks tests that passed with warnings with a
special status.
2010-04-30 14:33:39 +00:00
Jonathan Earl Brassow
dd8ac54678 Test all combinations of mirror conversion, both while the LV
is active and while it is in-active.

+for i in $(seq 0 4); do
+       for j in $(seq 0 4); do
+               for k in core disk mirrored; do
+                       for l in core disk mirrored; do

The testing code still needs some improvement.  I'd like to add
the ability to test specifying the PVs to be added/removed during
a convert.  It will also be important to test partial PV
specification during down converts (i.e. request to remove more
mirror images than we have provided PVs for).
2010-04-28 17:46:34 +00:00
Mike Snitzer
d5857e6d48 Disallow the direct removal of a merging snapshot.
Allow lv_remove_with_dependencies() to know the top-level LV that was
requested to be removed (otherwise it recurses and we lose context).

A merging snapshot cannot be removed directly but the associated origin
can be.  Disallow removal of a merging snapshot unless the associated
origin is also being removed.
2010-04-23 19:27:10 +00:00
Mike Snitzer
4a76f5c764 When removing a snapshot avoid preloading the origin if the
snapshot-merge target is not active.
2010-04-23 02:57:39 +00:00
Jonathan Earl Brassow
aa3bdb1911 The following tests in the testsuite have race conditions:
1) Test that the primary mirror image cannot be removed while
   the mirror set is sync'ing.
2) Test that you cannot start a second mirror up-convert while
   one is already in progress.

The trouble is that if the sync/conversion finishes before the
tests occur, the tests will fail by why of success where there
should have been failure.  This means the sync/conversion must
happen very quickly, but this is possible because the test
mirrors we are creating are so small.

In order to decrease the likelyhood of these test failing (or
more correctly, failing to test the right thing), I've increase
the size of the mirrors.  It will still be remotely possible that
the tests will fail (by way of failing to test the right thing).
If this continues to happen, more involved mechanisms will need
to be put in place.  (Perhaps these will still be created, but
this change should be a remedy until that time.)
2010-04-22 15:39:40 +00:00
Jonathan Earl Brassow
d4de2a7aa4 Disallow the addition of mirror images while a mirror up-convert
is already occurring.  The addition of new legs can be retried
once the current conversion is complete.
2010-04-21 14:04:24 +00:00
Jonathan Earl Brassow
e37b173f13 Disallow the primary mirror image from being removed when the
mirror is not in-sync.  This restriction is not extended to
repair operations (i.e. it will not limit what 'lvconvert --repair'
can do).
2010-04-21 13:55:08 +00:00
Mike Snitzer
b7af7c9c43 Re-enable t-topology-support.sh
Reintroduce split teardown (teardown() calls teardown_devs()) because
t-topology-support.sh only needs the teardown_devs() subset of the full
teardown() between each iteration of the topology tests -- in particular
the $TESTDIR must not get removed between each topology test iteration.

prepare_loop() must return if prepare_scsi_debug_dev() already
established $LOOP.

Also fix (and simplify) the unsafe scsi-debug device discovery in
prepare_scsi_debug_dev().
2010-04-20 18:18:59 +00:00
Dave Wysochanski
063083a203 Add device creation to basic nightly test.
Ensure we can create devices for use in tests before running the real
tests.  This may in various cases, and may involve machine configuration
rather than a failure in some specific test.
For example, if a test is run with LVM_TEST_DIR=/tmp, selinux is enabled,
and the default security context is set to "<<none>>" for /tmp, all the
tests will fail, unable to create devices, since dmsetup will fail, a
result of machpathcon() returning an error code.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-04-20 15:19:36 +00:00
Mike Snitzer
7cd66377ef Add additional test to start the snapshot merge (which had just failed
because an FS was mounted -- origin was still open).
2010-04-19 22:44:42 +00:00
Dave Wysochanski
c198ca0285 Add missing readline linkage to lvm2app test. 2010-04-14 16:13:34 +00:00
Petr Rockai
10b62fb0e8 Allow incomplete mirror restore in lvconvert --repair upon insufficient space. 2010-04-14 13:51:58 +00:00
Petr Rockai
73d1626ddc SIGTERM testing clvmd before SIGKILL-ing it. 2010-04-14 12:04:23 +00:00