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

13341 Commits

Author SHA1 Message Date
Peter Rajnoha
2315743dd3 man: remove duplicate paragraph about selection criteria from lvm(8) man page
The paragraph about selection criteria together with all the related
context is now documented in lvmreport(7) man page completely.
2016-11-22 13:20:52 +01:00
Tony Asleson
0bbf631349 lvmdbusd: Remove extraneous finally
The print statement is incorrect.
2016-11-17 13:59:39 -06:00
Tony Asleson
3b4c5a2151 lvmdbusd: Fix source documentation 2016-11-17 13:58:17 -06:00
Tony Asleson
3a6c78e22a lvmdbusd: cmdhandler.py, fix imports
Use the correct py3 syntax for handling imports.  Also use print instead
of log_debug which in this context will produce no output.
2016-11-17 13:57:44 -06:00
Tony Asleson
19a0bf9df6 lvmdbusd: Remove debug JSON file 2016-11-17 11:45:11 -06:00
Tony Asleson
bd47b202fb lvmdbustest: Reduce dbus object churn
Instead of creating a new dbus object each time we get an interface object
we will use the same one.
2016-11-17 11:35:16 -06:00
Tony Asleson
bfedeb7481 lvmdbustest: Move std_err_print to testlib
So we can re-use it in the testlib too.
2016-11-17 11:35:16 -06:00
Tony Asleson
99806ec7ec lvmdbusd: Place Manager.UseLvmShell request on queue
We need to acquire a lock which can block us which in turn causes
the dbus request handling to block as well.  Place the request on
the work queue instead.
2016-11-17 11:35:16 -06:00
Tony Asleson
df92d330aa lvmdbusd: Extra report FD read on no data
Our expectation was that when using the lvm shell that when the lvm prompt
was read from stdout, that all other ouput had been written and flushed.
However, this doesn't appear to be the case.  Add extra read passes to
retrieve delayed report data.
2016-11-17 11:35:16 -06:00
Tony Asleson
a1805cf336 lvmdbusd: Bubble up invalid JSON
If we get invalid JSON, lets bubble that up to the user.
2016-11-17 11:35:16 -06:00
Tony Asleson
61f6be7d2b lvmdbustest.py: Reduce test client introspection calls
The default dbus python library mode of operation is to leverage
introspection.  However, this introspection data isn't accessible
for users of the library and they have to specifically retrieve
the introspection data too. This resulted in many introspection
calls being made.  This change eliminates introspection calls if
we are testing multiple concurrent test clients.  If it's a single
client we will leverage a reduced amount of introspection data to
verify the introspection data is correct.  Typically clients don't
leverage introspection data nearly as much as this test client.
2016-11-17 11:35:16 -06:00
Tony Asleson
4f1171466f lvmdbusd: Remove un-used import 2016-11-17 11:35:16 -06:00
Tony Asleson
2fbb90e403 lvmdbusd: WS corrections
Fix mixed spaces & tabs and other ws issues.
2016-11-17 11:35:16 -06:00
Tony Asleson
dcdef9647b lvmdbusd: Add cfg.load to pv remove
The global dbus state does not match lvm with simply removing the pv
dbus object.
2016-11-17 11:35:16 -06:00
Tony Asleson
24fd1dd7a3 lvmdbusd: _lv_create, simplify return path 2016-11-17 11:35:16 -06:00
Tony Asleson
cd28717f24 lvmdbustest.py: Support concurrent test runs
The env variable LVM_DBUSD_PV_DEVICE_LIST when present and filled in
with at least 4 physical devices will run concurrently with other
instances running as long as they specify different devices in their
env variable.

When the env variable is not present the test runs as it did before.
2016-11-17 11:35:16 -06:00
Tony Asleson
72a943f720 lvmdbusd: Long running operations use own thread
Anything that ends up using polld will be done in a unique thread
so that we don't hold off other operations from running concurrently.
2016-11-17 11:35:16 -06:00
Tony Asleson
fa444906bb lvmdbusd: Use one thread to fetch state updates
In preparation to have more than one thread issuing commands to lvm
at the same time we need to serialize updates to the dbus state and
retrieving the global lvm state.  To achieve this we have one thread
handling this with a thread safe queue taking and coalescing requests.
2016-11-17 11:35:16 -06:00
Tony Asleson
affe2cebf5 lvmdbus: Make bus name configurable
Add env LVM_DBUS_NAME to change what the bus name is.
2016-11-17 11:35:16 -06:00
Tony Asleson
560229178c lvmdbustest.py: Remove raid4 use
Looks like this isn't support across versions.  Need to add functionality
to service to return the supported segment types, so we only use the
supported ones.
2016-11-17 11:35:16 -06:00
Bryn M. Reeves
2a86f54b09 libdm: separate dm_stats_populate() error cases
There are two possible errors in _dm_stats_populate_region():

  * No region struct in dms->regions[region_id]
  * Failure to parse data from @stats_print

These have very different causes: the first occurs where a client
program is populating one region at a time (region_id is a single
region identifier), and has not previously called dm_stats_list()
to dimension the region tables; this is an API usage error.

The second occurs when either we read unparseable data from the
kernel (kernel bug), or where various resource allocations fail.

Separate these two cases out and log separate messages for each
(allocation failures in the path already have their own distinct
message), since the "failed to parse.." message in the un-listed
handle case is confusing and misleading.
2016-11-17 11:39:43 +00:00
Alasdair G Kergon
6de05cf5f5 raid: Remove fixed FIXME 2016-11-15 20:45:55 +00:00
Peter Rajnoha
cd0736a945 dbus: also recognize error state for missing service that comes from original D-Bus 2016-11-15 10:09:11 +01:00
Peter Rajnoha
68d6d342f8 dbus: only log msg as debug if lvm2-lvmdbusd unit missing for D-Bus notification
Do not emit warning message but only log debug message if
lvm2-lvmdbusd.service unit is missing and at the same time
we have global/notify_dbus=1 (which is used by default if we
configured sources with "--enable-notify-dbus"). We don't want
hard dependency between LVM2 and lvmdbusd so it's enough to log
only debug message in this case.
2016-11-14 14:53:19 +01:00
Zdenek Kabelac
e7da8e7e1f tests: fix checking for pvmove LV
Use consitently egrep.

TODO: make probably aux func
2016-11-14 12:55:43 +01:00
Zdenek Kabelac
a7691cdebb cleanup: debug trace and indent change 2016-11-11 16:58:20 +01:00
Zdenek Kabelac
6db5b91231 cleanup: avoid using double __ in extracted image name 2016-11-11 16:58:20 +01:00
Zdenek Kabelac
1bdcb01f63 cleanup: add dots to debug messages 2016-11-11 16:58:20 +01:00
Zdenek Kabelac
b38564b8dc tests: do not set zero interval in aux lvm.conf
0 interval leads as of now to a busy loop with lvmetad and command.

Avoid testing this patological case.

TODO: Code should possibly translate zero interval into some small
sleep. With lvmpolld it's already 1/10s
2016-11-11 16:58:20 +01:00
Zdenek Kabelac
de3d054f78 tests: avoid using polling 2016-11-11 16:58:20 +01:00
Zdenek Kabelac
4a2250f9ce tests: update make targets
Add  new targets:

make check_lvmpolld
make check_cluster_lvmpolld
make check_lvmetad_lvmpolld
make check_all_lvmpolld

So check_lvmetad runs only base lvmetad test - to much
logic of remaining targets.

Previous behavior is available via  check_all_lvmpolld.
2016-11-11 16:58:20 +01:00
Zdenek Kabelac
d8fc4d093e conf: support zero for missing_stripe_filler
Make it easier to replace missing segments with 'zero' returning
target - otherwise user would have to create some extra target
to provide zeros as /dev/zero can't be used (not a block device).

Also break code loop when segment is found and make it an INTERNAL_ERROR
where it's missing.
2016-11-11 16:58:16 +01:00
Zdenek Kabelac
e54cce245f cleanup: skip checking for just assigned string
When 'stripe_filler' has been just set to 'error',
do not check it again for not being 'error'.
2016-11-11 16:52:24 +01:00
Zdenek Kabelac
59b29716e5 lvconvert: repair accepts interval and background
For mirror and raid we expose --interval and --background on
command line (instead of using just always using compiled-in defaults).
2016-11-11 16:51:33 +01:00
Alasdair G Kergon
f8b3b0bc9a lvconvert: Introduce enum to separate cases.
Start to separate out the different things that lvconvert does by using
an enum to identify 12 distinct cases.
2016-11-11 00:27:01 +00:00
Heinz Mauelshagen
b11f4f93d7 dmsetup: [v2] return 0 for [--]{version,help}
Leverage 0b1c796420 to cope with "dmsetup SubCommand --{help,version}"
and bail out directly when _report_init() fails.

Related: rhbz1393692
2016-11-10 18:09:37 +01:00
Heinz Mauelshagen
0b1c796420 dmsetup: return 0 for [--]{version,help}
dmsetup regressed returning 1 when properly processing
version or help subcommands.

Resolves: rhbz1393692
2016-11-10 17:03:04 +01:00
Zdenek Kabelac
c1862ea84c tests: for repair we need neewer version
Older cache targets were not able to report write failures.
2016-11-08 16:01:35 +01:00
Zdenek Kabelac
2ec3e7dca8 tests: test raid0_meta type
Enable testing of raid0_meta type.
Also slow down devices a bit more.
2016-11-08 16:01:35 +01:00
Zdenek Kabelac
ada5733c56 raid: faster rmeta clearing
Instead of clearing multiple rmeta device with sequential activation
process and waiting for udev for every _rmeta device separately,
activate all _rmeta devices first and then clear them and deactivate
afterwards.

Also update some tracing messages.

When anyhing goes wrong during clearing process, always try to
deactivate as much _rmeta devices as possible before fail.
2016-11-08 16:00:14 +01:00
Alasdair G Kergon
9e03fc3c2a post-release 2016-11-05 01:14:06 +00:00
Alasdair G Kergon
eed708dbd9 pre-release 2016-11-05 01:03:32 +00:00
Alasdair G Kergon
6dce0e9489 tests: Disable 3-leg raid1 pre-sync repair attempt
Test fails as it doesn't ensure device isn't already in sync.
2016-11-04 00:23:08 +00:00
Tony Asleson
461d340bd7 lvmdbusd: Remove the periodic timer task
This code is no longer needed because the back ground task has been
removed.  Will add back if we change the design and end up utilizing
multiple worker threads.
2016-11-03 18:38:10 -05:00
Tony Asleson
ee0c9e7b23 lvmdbusd: Take out background thread
There is no reason to create another background task when the task that
created it is going to block waiting for it to finish.  Instead we will
just execute the logic in the worker thread that is servicing the worker
queue.
2016-11-03 18:29:06 -05:00
Zdenek Kabelac
a9ee86ccf2 dmeventd: provide message context
Show device name with printed message.
Also use different level for printing error message and
standard informational message.
2016-11-03 17:49:07 +01:00
Zdenek Kabelac
4e26024add cleanup: use WARNING prefix for log_warn
Use capital WARNING prefix for log_warn() messages.
2016-11-03 17:49:07 +01:00
Zdenek Kabelac
0d95082aa9 cleanup: remove goto
Move goto path into 'if()' branch.
2016-11-03 17:49:07 +01:00
Zdenek Kabelac
9cbe4c1af9 log_info to log_very_verbose
Translate log_info() into log_very_verbose() which is macro
supposed to be used by our code.

log_info() is internal macro with eventually some 'symbolic' meaning
in syslogging daemons.
2016-11-03 17:49:07 +01:00
Zdenek Kabelac
cc19cc07f7 log_info to log_warn
Switch to log_warn level when we are reporting these message.
2016-11-03 17:49:07 +01:00