1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

6834 Commits

Author SHA1 Message Date
Zdenek Kabelac
bc013bc21f Improve teardown_devs
Try to avoid start of dmeventd during vgremove if the code has any bug
inside.
2012-03-23 09:41:20 +00:00
Zdenek Kabelac
3ac8509b99 Update debug message
(compiled only with special debug define)
2012-03-23 09:39:59 +00:00
Zdenek Kabelac
f02892842b Update lcov target 2012-03-23 09:39:03 +00:00
Zdenek Kabelac
31a1a47ad5 Fix regression in thin monitoring
Patch https://www.redhat.com/archives/lvm-devel/2012-February/msg00118.html
removed initilization of thin volume monitoring, leaving it only for
thin pool - but missed the code move part for monitoring of thin pools.
Effectively making thin pools not monitorable.
2012-03-20 17:42:19 +00:00
Zdenek Kabelac
6e7d2724ba Fix check for passed in path for dmeventd startup
Check passed in executable path for dmeventd instead of predefined
compiled in path which is not the thing to be executed.
2012-03-20 17:38:47 +00:00
Zdenek Kabelac
adbf9a803a Sleep longer in the test so it really dies properly
and check for right exit code from pgrep
2012-03-20 13:35:46 +00:00
Zdenek Kabelac
7e7c9bb2f3 Update testing scripts
Make the teardown really usable - it will try down to remove all the left
devices even from previous test runs
(the only missing piece is probably proper mdadm teardown)
Add few more local vars
Try to setup PATH and LD_LIBRARY_PATH just once.
Try shorter sleeps.
2012-03-20 10:51:57 +00:00
Zdenek Kabelac
70d7a8ea41 Update test for dmevent restart
Actually restart was failing for different reason - so pass in proper
location of dmeventd for restart from lvm command and avoid using
the one from /sbin location.

Update pv create test with "" around path.
2012-03-20 10:48:59 +00:00
Zdenek Kabelac
c987c20bb3 Support improperly formated device numbers
There are kernel drivers (smblk) which set '-1' as their device major number.
This number is listed in /proc/devices then - but the kernel itself is using
just 12 bits - thus device is accessible via 4095 - there is posted patch
for 3.4 to fix this behavior (0 for auto allocation was mean to be used).

However to still allow using such devices with older kernels add some code
to use same behavior - so cut 12 bits from the major number from /proc/devices.

For now use log_warn() - maybe the severity of the message could be lowered
to just verbose level.
2012-03-20 10:47:02 +00:00
Peter Rajnoha
45d7997514 Do exit if LISTEN_PID environment variable not correct during systemd handover. 2012-03-16 21:30:53 +00:00
Zdenek Kabelac
d13c952ee4 Add comment about slow startup of dmeventd
Separat lvm dumpconfig on extra line, so the shell trace output
is not mixed with dump.
2012-03-16 19:13:09 +00:00
Zdenek Kabelac
4fd6aae7bf Skip dmeventd restart test
If dmevendt is not in /sbin, do not try to run restarting test.
FIXME: add some workaround for testing.
2012-03-16 19:11:29 +00:00
Zdenek Kabelac
2b6dee707a Regression fix kernel version check
got changed improperly with large update patch.
2012-03-16 19:09:49 +00:00
Zdenek Kabelac
124dec2880 Longer sleep after clvmd start 2012-03-16 19:08:09 +00:00
Peter Rajnoha
f4dd47242e Use pvscan --cache instead of vgscan in lvmetad init script and systemd unit. 2012-03-16 15:12:04 +00:00
Zdenek Kabelac
268ec5553e Switch condition for dmeventd check 2012-03-16 13:44:51 +00:00
Zdenek Kabelac
1238935a2d Update tests
Indent

Shell improvements - use internal function for checks

Use PVs in ""   (LV and VG cannot have spaces)

Several test very starting 'dmeventd' without annoucing
it via prepade_dmeventd.

Fix some of test actually.
2012-03-16 13:00:05 +00:00
Zdenek Kabelac
6ef0f403c7 Update test.sh check.sh utils.sh get.sh
Indent
Better shell usage
Function simplification
More usage of 'get' functions
Don't use valgrind tracing for check and get function (faster)
Update shell debugging (PS4, better stacktrace)
Support paths with spaces
Export SCRIPTNAME for external usage
Watch for dmeventd unexpectedly started during test
2012-03-16 12:59:43 +00:00
Zdenek Kabelac
523910032b Update aux.sh lvmwrapper
Indent

Add valgrind support:
 env LVM_TEST_VALGRIND={0123} (the higher level, more commands tested)
 env LVM_TEST_CLVMD=1   runs clvmd within valgrind.
 env VALGRIND  script name executed for each lvm command (def. is valg).

Smarted teardown - should minimize occurence of left dev entries
 (using dmsetup remove -f only as last resort)
 sort removed devices by open count before actual removal

Use "" around string that may contain spaces.

Set log/verbose and activation/retry_deactivation to defined value.

Remove  debug.log after successful lvm command (easier to check output).
2012-03-16 12:59:02 +00:00
Zdenek Kabelac
6960f5402a Test suite skip md_detection
Not normally needed - lets' enable it only for test that
really needs it.
2012-03-16 12:57:28 +00:00
Zdenek Kabelac
b71339435d Allow to use also special prefixed names for test
Currently we could not test special prefixes in our test suite.
As teardown will not find such device and basicaly busyloops here,
as at cannot remove such names.

This patch adds possibity to use:

vgcreate  V_$vg1 $dev

Note: you still need to use $PREFIX somewhere in the name.
(And of course, it's really bad idea to use $PREFIX (=LVMTEST)
 for normally used LVs)

The only purpose of this patch is to allow testing cluster with
special vg names that begins with V_ , P_....
2012-03-16 12:56:29 +00:00
Zdenek Kabelac
de0e4e755a Fix string parsing
Fix propagation of -e option - pass it via internal shell variable.
Fix parsing of /proc/mounts files (don't check for substrings).
 as reported by O.Mangold with suggested patch:
 https://www.redhat.com/archives/linux-lvm/2012-February/msg00030.html
Properly pass arguments with spaces ("$@")
Add validation for YES and EXTOFF variable content.
2012-03-16 12:53:05 +00:00
Petr Rockai
3f5b1f651a Relax the active-minor test a bit. 2012-03-16 11:36:51 +00:00
Petr Rockai
2d94d29def It's new. 2012-03-16 10:46:25 +00:00
Petr Rockai
c3b58ec989 Fix a regression in handling --major/--minor arguments to lvcreate & lvchange,
by allowing arg_int_value to be used with groupable options.
2012-03-16 10:43:52 +00:00
Jonathan Earl Brassow
f19be6776b Fix name conflicts that prevent down-converting RAID1 when specifying a device
When down-converting a RAID1 device, it is the last device that is extracted
and removed when the user does not specify a particular device.  However,
when a device is specified (and it is not the last), the device is removed and
the remaining sub-LVs are "shifted down" to fill the hole.  This cause problems
when resuming the LV because if the shifted devices were resumed (and thus
renamed) before the sub-LV being extracted, there would be a name conflict.
The solution is to resume the extracted sub-LVs first so that they can be
properly renamed preventing a possible conflict.

This addresses bug 801967.
2012-03-15 20:00:54 +00:00
Peter Rajnoha
d7bcb6e117 Remove dmeventd fifos on exit if they are not managed by systemd. 2012-03-15 08:45:55 +00:00
Zdenek Kabelac
6584221843 Update configure change
Always define THIN_CHECK_CMD define - since for now we compile thin code
in more places.
2012-03-14 19:25:04 +00:00
Zdenek Kabelac
8d46025ff8 Just move declaration 2012-03-14 17:15:22 +00:00
Zdenek Kabelac
552f340ff5 Use proper "" for absolute paths 2012-03-14 17:14:33 +00:00
Zdenek Kabelac
def8f31a2e Cleanup for conf file 2012-03-14 17:13:45 +00:00
Zdenek Kabelac
bac0394dc6 Improve thin_check option passing
Update a way we handle option passing - so we now support path and options
with space inside.
Fix dm name usage for thin pools with '-' in name.
Use new lvm.conf option thin_check_options to pass in options as string array.
2012-03-14 17:12:05 +00:00
Zdenek Kabelac
303b44c8fa Add --with-thin-check configure option
If specified - use given path without test (Path could be empty)
If autodetection is in use - check for command in available PATH.
2012-03-14 17:09:00 +00:00
Peter Rajnoha
23a88f868d Use SD_ACTIVATION env. var. in systemd units to better detect systemd in use.
LISTEN_PID and LISTEN_FDS environment variables are defined only during systemd
"start" action. But we still need to know whether we're activated during
"reload" action as well - we use the reload action to call "dmeventd -R"/"lvmetad -R"
for statefull daemon restart. We can't use normal "restart" as that is simply
composed of "stop" and "start" and we would lose any state the daemon has.
2012-03-14 15:51:51 +00:00
Peter Rajnoha
682be508c6 WHATS_NEW 2012-03-14 12:12:21 +00:00
Peter Rajnoha
4a01bb64fb Do not run a new dmeventd instance on restart if there's no existing one. 2012-03-14 11:16:00 +00:00
Alasdair Kergon
1b80b1086f Fix error message when pvmove LV activation fails with name already in use. 2012-03-13 20:21:26 +00:00
Petr Rockai
cbf86d952b Add a toplevel check_lvmetad target. 2012-03-12 15:05:55 +00:00
Zdenek Kabelac
91c0dc527b We need longer window for checking read from fifo.
Seems like some dmeventd startups are taking more time then expected,
so make the time window longer here.
2012-03-12 14:46:53 +00:00
Zdenek Kabelac
2412ede4c6 Removing call of release_vg(NULL)
Since we are in error path were vg must be always NULL,
skip call of release_vg() like we do in other places.
2012-03-12 14:43:12 +00:00
Zdenek Kabelac
b6476cba88 Using %u modifier to print unsigned values. 2012-03-12 14:41:42 +00:00
Zdenek Kabelac
4a7bc37bfa Better structure layout for device_info
Save some relocation entries and use directly char[].
Since we do not need yes more then 127 partitions per device, use just int8_t.
Move lvm_type_filter_destroy into local static function.
2012-03-12 14:40:41 +00:00
Zdenek Kabelac
57e379d5ee Simplify error path code for filter initialization
Use 'int' counter.
Use 'bad' with goto_bad macro.
2012-03-12 14:35:57 +00:00
Zdenek Kabelac
80a1c93421 Improve harness code
Support timestamping with harness -  using VERBOSE=2
Fix also logging in several situation
(i.e. continue logging multiple test in VERBOSE mode,
do not coredump with empty output).
2012-03-12 14:24:15 +00:00
Zdenek Kabelac
1ce7924bbf Switch to normal log_verbose message
Here it's not an error case - so do not push this message to stderr.
2012-03-12 14:18:28 +00:00
Zdenek Kabelac
8a9c1b37ad Fix error path for create_toolcontext
Never return unfinished toolcontext - since error path is hit on
various stages of initialization we cannot leave it partially uninitialized,
since we would need to spread many more test across the code for config_valid.
Instead return NULL and properly release udev library resources as well.
2012-03-12 14:15:04 +00:00
Peter Rajnoha
c1ce99cd81 Detect the lvm binary path in lvmetad udev rules.
We can't use 'DM_SBIN_PATH'. This one is set only for DM devices but not
for all block devices - the pvscan is run on all relevant block devices!

This LVM_SBIN_PATH (as well as DM_SBIN_PATH) detection should be removed
eventually but for upstream solution, we still have to do that as there are
known cases where the binaries are put either in /sbin or /usr/sbin
(some installation systems, initrd systems etc.).
2012-03-12 08:59:55 +00:00
Milan Broz
166393a6dd Remove some whitespaces.
(Test commit.)
2012-03-10 10:39:28 +00:00
Milan Broz
06a9a4e867 Remove some whitespaces.
(test commit)
2012-03-10 09:32:46 +00:00
Peter Rajnoha
6b85d4df44 Do not unlink the socket on daemon shutdown if activation is done via systemd. 2012-03-08 14:54:05 +00:00