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

16008 Commits

Author SHA1 Message Date
Zdenek Kabelac
d379754b44 tests: create whole path with mkdir
Create also 'lvm' upper this if such one is missing in /run dir
and use '-p' with mkdir.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
9a6bcbe195 tests: skip portion of test for lvmpolld
lvmpolld ATM is not desingned to preserve interval checking
in the same way the 'lvconvert' tool is doing - so the passed
'-i 40' is not respected and lvmpolld autonomously checks
state of conversion and updates lvm2 metadata and dm tables
when needed.

So skip portion of test that relayed on this and preserve this logic
only for command line invocation and forking of polling process
where the interval of checking is under full control.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
30d8077f7a tests: skip when gcore from gdb package is missing
gcore is needed for gathering all userspace mappings.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
ca6bb353c9 tests: prefer internal header
Although we primarily want to check externally used libdevmapper
library,   out internal  all.h is still keeping all symbols
as the original library has - so for simpler compilation keep
using this private copy for defining needed symbols.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
8f0364ccd2 tests: correcting header file enclosure
Use "" for internal header file.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
e52b5f9ab2 tests: still more libs needs 2018-12-04 14:33:37 -06:00
Zdenek Kabelac
b2c52f1731 tests: makefile fixes
New tests needs more options and libs.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
74d77bfaaa tests: drop unwanted backup 2018-12-04 14:33:37 -06:00
Zdenek Kabelac
3931441190 tests: raise minsize of xfs
mkfs.xfs now needs at least ~1600...
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
977d33c1cb tests: extend 2018-12-04 14:33:37 -06:00
Zdenek Kabelac
60c4802bc3 tests: secure data erase 2018-12-04 14:33:37 -06:00
Zdenek Kabelac
df10e0e598 libdm: add memory barrier
Just for case ensure compiler is not able to optimize
memset() away for resources that are released.

This idea of using memory barrier is taken from openssl.

Other options would be to check for 'explicit_bzero' function.
2018-12-04 14:33:37 -06:00
David Teigland
b33842e6fc scripts: remove lvmetad from makefile 2018-12-04 14:33:37 -06:00
David Teigland
f2618758e5 lvm2-monitoring service shouldn't refer to lvmetad 2018-12-04 14:33:37 -06:00
David Teigland
0bd6be5cf2 man: remove some clvmd references 2018-12-04 14:33:37 -06:00
David Teigland
4257c02415 man: remove scattered lvmetad references 2018-12-04 14:33:37 -06:00
David Teigland
9b423ae6da remove unused backgroundfork option 2018-12-04 14:33:36 -06:00
David Teigland
0aeafc2b0a man: pvscan updates 2018-12-04 14:33:36 -06:00
David Teigland
b4b859c6a9 pvscan: background option is not used
Move this into the list of ignored options so
it doesn't appear in the man page.
2018-12-04 14:33:36 -06:00
David Teigland
1eeda655ad man pvscan: replace lvmetad text 2018-12-04 14:33:36 -06:00
David Teigland
d4b69c81e3 man: remove lvmetad 2018-12-04 14:33:36 -06:00
David Teigland
228036bcb2 man lvmdump: remove clvm reference 2018-12-04 14:33:36 -06:00
David Teigland
938ee72c9b man: remove clvmd man page 2018-12-04 14:33:36 -06:00
David Teigland
d0fee1e784 man: remove cluster references 2018-12-04 14:33:36 -06:00
Zdenek Kabelac
3ac106df6e tests: add wait loop
Add a little wait loop - since lvconvert started background process
and we need to wait till this bg task initiate its work -
adding ~1s loop should give reasonable enough time to start mirroring.
2018-12-04 14:33:36 -06:00
Zdenek Kabelac
bac5d782ca devicemapper: retry mirror leg deactivation
This could be seen as continuation of
6cee8f1b06.
Some test maching with old udev system shows problem,
where udev 'jumps on' leg device after mirror target
releases its legs -  since udev does not (in this old case) skips
such device from scanning - it opens device - and this prevent
leg device to be deactivated - effectively such device stays
'leaked' in DM table invisibly to lvm2 command.

So to 'combat' this issue - if the device has '_mimage' in its name,
the retry of deactivation is automatically assumed.

NOTE: wider impact is unexpected - as it's touching only old mirror
target which is nowadays replaced with 'raid'.

In case there will be some problem identified - probably both patches
should be reverted.
2018-12-04 14:33:36 -06:00
David Teigland
0eafb76772 man: lvmcache update
for cache changes including writecache
2018-12-04 14:33:36 -06:00
Zdenek Kabelac
499923f0f6 tests: keep results configurable 2018-12-04 14:33:36 -06:00
Zdenek Kabelac
5c150a28e2 configure: update 2018-12-04 14:33:36 -06:00
Zdenek Kabelac
dbe0a79f03 devicemapper: retry remove even for subLVs
With older systems and udevs we don't have control over scanning of lvm2
internal devices - so far we set retry-removal only for top-level LVs,
but in occasional cases udev can be 'fast enough' to open device for
scanning and prevent removal of such device from DM table.

So to combat this case - try to pass 'retry' flag also for removal of
internal device so see how many races can go away with this simple
patch.

Note: patch is applied only to internal version of libdm so the external
API remains working in the old way for now.
2018-12-04 14:33:36 -06:00
Zdenek Kabelac
205b4f0146 activation: trimming string is expected
Commit 813347cf84 added extra validation,
however in this particular we do want to trim suffix out so rather ignore
resulting error code here intentionaly.
2018-12-04 14:33:36 -06:00
David Teigland
35b06d808a devices: reuse bcache fd when getting block size
This avoids an unnecessary open() on the device.
2018-12-04 14:33:36 -06:00
Zdenek Kabelac
29c6f2874b tests: fix shell quoting 2018-12-04 14:33:36 -06:00
Zdenek Kabelac
9aca3a1d67 tests: add wait for udev
Since the test is currently directly working with live directory,
which can be getting updates from system's udev - add wait
for settling so removal of all known PVs happens after that.
But still this has major influce on behavior of running system,
so the test should never be executed on a user used box.
2018-12-04 14:33:36 -06:00
Zdenek Kabelac
64e62167f0 pvscan: add error checking for write of online files
When there is any write failure during writting file,
report this upward as error and fail command instead
of continuing futher.
2018-12-04 14:33:36 -06:00
Zdenek Kabelac
c171211254 debug: missing backtrace 2018-12-04 14:33:36 -06:00
Zdenek Kabelac
67d19a480a cleanup: move cast to det_t into MKDEV macro 2018-12-04 14:33:36 -06:00
Zdenek Kabelac
8c4f8c1329 cov: avoid unsing unchecked label_scan_open
Drop extra call too label_scan_open() without checking return value,
and let code go through next call bellow.
2018-12-04 14:33:36 -06:00
Zdenek Kabelac
af08412fd9 cov: remove unused assigns 2018-12-04 14:33:36 -06:00
Zdenek Kabelac
180941274d cov: hide intentionaly ptr arithmetic report
Only single region count is ever replaced with on-stack uint64_t.
2018-12-04 14:33:36 -06:00
Zdenek Kabelac
d9f77b350e cov: mark warning as expected one 2018-12-04 14:33:36 -06:00
Zdenek Kabelac
4c8eb625c7 cov: trace failing pthread_kill 2018-12-04 14:33:36 -06:00
Zdenek Kabelac
cc83091cd5 cov: add missing check for dm_strncpy 2018-12-04 14:33:36 -06:00
Zdenek Kabelac
e2cb6e8fe0 cov: overflow before widen
Evaluate as 64bit arithmetic (instead of doing 32bit mults which can
in this case purely teoretically overflow).
2018-12-04 14:33:35 -06:00
Zdenek Kabelac
1dd93f5398 cov: explicit ignore if failures
Here we can't do anything better than just ignore syscall failures
(with silence as there is no loging mechanism)
2018-12-04 14:33:35 -06:00
Zdenek Kabelac
a54bd9939f cov: split check for type assignment
Check that type is always defined, if not make it explicit internal
error (although logged as debug - so catched only with proper lvm.conf
setting).
This ensures later type being NULL can't be dereferenced with coredump.
2018-12-04 14:33:35 -06:00
Zdenek Kabelac
6c9615ce60 cov: remove uneeded code
Since clvmd was dropped this code become useless.
2018-12-04 14:33:35 -06:00
Zdenek Kabelac
7ac14e3d32 label: add stack trace for failing dev_set_last_byte
Temporarily add check for failure, but whole function
needs to be likely traced for error result.

FIXME
2018-12-04 14:33:35 -06:00
David Teigland
7dcc884c50 lvmlockd: fix handling of sanlock release error
When sanlock_release returns an error because of an i/o
timeout releasing the lease on disk, lvmlockd should just
consider the lock released.  sanlock will continue trying
to release the lease on disk after the original request
times out.
2018-12-04 14:33:35 -06:00
David Teigland
f9948538cc lvmlockd: deactivate lvmlock LV in vgchange
When changing a VG to lock_type sanlock, the internal
lvmlock LV was left active at the end of vgchange.
It shouldn't be active until lockstart.
2018-12-04 14:33:35 -06:00