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

13150 Commits

Author SHA1 Message Date
Peter Rajnoha
7563e69cf1 libdm: add dm_config_parse_without_dup_node_check
Introduce function for config parsing tree without checking
for duplicate nodes.
2016-09-21 18:15:18 +02:00
Peter Rajnoha
094488ffab cleanup: remove unused variables 2016-09-21 15:53:50 +02:00
Peter Rajnoha
926a565781 coverity: dmsetup: fix possible use of uninitialized value 2016-09-21 15:52:23 +02:00
Bryn M. Reeves
7ea5758c91 dmsetup: ensure --filemap histogram bounds are freed
Make sure that the temporary dm_histogram used for the bounds
argument is freed in the case that the user provided a --bounds
argument on the command line.
2016-09-21 10:09:20 +01: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
Alasdair G Kergon
414d39085c snapshots: Fix monitoring to use cow not internal LV. 2016-09-20 02:30:58 +01:00
Tony Asleson
ed37b4a626 lvmdbusd: Assign percentage on set 2016-09-19 15:32:47 -05:00
Tony Asleson
d18ea3f2cb lvmdbustest: Remove pyudev deprecated warnings 2016-09-19 15:32:47 -05:00
Tony Asleson
ec821d37a8 lvmdbusd: Correct imports
Place the imports in the files where they are directly needed.
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
9cb8865511 lvmdbusd: Fix dbus object with only properties and no method
Gris debugged that when we don't have a method the introspection
data is missing the interface itself eg.

<interface name="<your_obj_iface_name>" />

When adding the properties to the dbus object introspection we will
add the interface too if it's missing.  This now allows us the
ability to have a dbus object with only properties.
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
5366e87574 lvmdbusd: Set value to non none on error
When we register a failure we need to use a valid value which will be
returned with the object manager.  Otherwise we will raise an Exception
because we are trying to construct an object path from None.
2016-09-19 15:31:04 -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
72abf692e5 debug: cleanup backtrace after log_error 2016-09-19 14:00:56 +02:00
Zdenek Kabelac
a029123679 debug: mention origin_only in message 2016-09-19 14:00:56 +02: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
0e8449a5b9 thin: fix lvchange of discards and zero flag
Reload of thin-pool origin_only is designed to only post messages
to a thin-pool. It's not intended to be used for reload of thin-pool
table. Fix it by using standard call  'lv_update_and_reload()'.
2016-09-19 14:00:56 +02:00
Zdenek Kabelac
c2c2721d00 thin: enforce there is some free space in thin pool metadata
Unconditionally guard there is at least 1/4 of metadata volume
free (<16Mib) or 4MiB - whichever value is smaller.

In case there is not enough free space do not let operation proceed and
recommend thin-pool metadata resize (in case user has not
enabled autoresize, manual 'lvextend --poolmetadatasize' is needed).
2016-09-19 14:00:56 +02:00
Zdenek Kabelac
776d5a25b4 thin: report pool as holder when no active thin volume
In the case there is no active thin volume, report thin pool
as lock holder. This fixed function like lvextend
which either expecte lock holder LV is some active thin
or 'possibly' inactive thin pool.
2016-09-19 14:00:56 +02:00
Bryn M. Reeves
c26cd48536 libdm: fix end-of-groups test in _stats_walk_end() 2016-09-16 13:09:22 +01:00
Alasdair G Kergon
9c8c8fb63a alloc: Use --alloc normal for mirror logs.
The existing code doesn't understand that mirror logs should cling to
parallel LVs (like extending them) instead of avoiding them.

As a quick workaround to avoid lvcreate failures, hard-code
--alloc normal for mirror logs even if the rest of the allocation
used a stricter policy.

https://bugzilla.redhat.com/show_bug.cgi?id=1376532
2016-09-16 02:11:58 +01:00
Alasdair G Kergon
5da35d879a lvmdump: Use O_DIRECT to gather metadata. 2016-09-15 14:00:39 +01:00
David Teigland
d455300d7b lvmlockd: fix metadata validation when rescanning VG
When rescanning a VG from disk, the metadata read from
each PV was compared as a sanity check.  The comparison
is done by exporting the vg metadata from each dev to
a config tree, and then comparing the config trees.
The function to create the config tree inserts
extraneous information along with the actual VG metadata.
This extra info includes creation_time.  The config
trees for two devs can easily be created one second
apart in which case the different creation_times would
cause the metadata comparison to fail.  The fix is to
exclude the extraneous info from the metadata comparison.
2016-09-14 10:43:33 -05: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
a156fc9a54 libdm: cleaner debug message 2016-09-13 09:24:38 +02:00
Zdenek Kabelac
5bf1778e33 rpm: install lvmreport.7 2016-09-12 16:51:53 +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
b592ea5bbc activation: dso always defined for monitoring query
Ensure 'dso' has always a defined (NULL) value,
and also ensure NULL 'dso' is not dereferenced.
2016-09-12 16:49:49 +02:00
Peter Rajnoha
06c7220f78 man: add lvmreport man page 2016-09-12 14:11:39 +02:00
Alasdair G Kergon
1768ca599b man: Only install lvmraid when needed. 2016-09-12 13:03:09 +01:00
Zdenek Kabelac
05dc70e22e cache: fixed copy&paste from last commit 2016-09-09 21:26:38 +02:00
Zdenek Kabelac
ca7921f54b rpm: build with raid man page 2016-09-09 20:59:22 +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