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

8887 Commits

Author SHA1 Message Date
Zdenek Kabelac
a2614c6866 tests: missed exclusive activation 2014-03-26 00:22:23 +01:00
Zdenek Kabelac
5b900dbef5 tests: pass list devs to allocate from 2014-03-26 00:05:46 +01:00
Zdenek Kabelac
1259ae5954 tests: cover code from more commands 2014-03-26 00:05:46 +01:00
Zdenek Kabelac
4b30863e85 tests: check forced backup 2014-03-26 00:05:46 +01:00
Zdenek Kabelac
4adbb85c37 tests: disable test for broken kernel raid targe
Since using raid5 - validate it's usable on the system
2014-03-26 00:04:59 +01:00
Zdenek Kabelac
fb471a372d tests: remove also 3.14 fc21 kernels 2014-03-26 00:04:59 +01:00
Petr Rockai
c13f5dbb25 lvmetad: Wait at least 80s for the initial scan. 2014-03-25 16:38:35 +01:00
Zdenek Kabelac
65bbfdf74d lvmetad: add missing dev_close in error path
Fixes missing dev_close() in dev_read error path
introduced in commit
a368698672
3e5bec37e9

(in-release fix)
2014-03-25 14:55:58 +01:00
Peter Rajnoha
ce78cb58eb lvmdump: add lvm dumpconfig --type diff/missing
For a quick overview of config when debugging and to quickly check
which values are different from defaults and which are not defined
in the config and for which defaults are used.
2014-03-25 13:06:59 +01:00
Zdenek Kabelac
0738f0ad72 pvresize: fail exit code for negative size
Pvresize with negative value retuns invalid cmd line exit code.
2014-03-25 11:52:03 +01:00
Zdenek Kabelac
8471fb01d8 tests: wipe signature
Check for usable blkid.
2014-03-25 11:23:00 +01:00
Zdenek Kabelac
3c9204a75a tests: update 2014-03-25 11:23:00 +01:00
Zdenek Kabelac
36d87eddcf tests: use exclusive activation
pvmove in cluster needs exlusive activation or cmirrord running.
2014-03-25 11:23:00 +01:00
Zdenek Kabelac
db1d4ba4ac tests: argless pvremove 2014-03-25 11:23:00 +01:00
Zdenek Kabelac
04861b9bed tests: more pvresize tests
Maybe move to separate pvresize test,
remove vgck size this is already executed elsewhere.
2014-03-25 11:22:59 +01:00
Zdenek Kabelac
db04d3e6d2 tests: relocate vgimport test
It seem like a better-fit here.
2014-03-25 11:22:59 +01:00
Zdenek Kabelac
13258d6e96 debug: add proper backtrace debug
When failure happens inside refresh, print proper debug backtrace.
2014-03-25 11:22:59 +01:00
Zdenek Kabelac
89575d6895 cleanup: drop init of already zalloced mem 2014-03-25 11:22:59 +01:00
Zdenek Kabelac
406ec4162f cleanup: use dm_free without extra test
It's ok to free(NULL).
2014-03-25 11:22:59 +01:00
Zdenek Kabelac
4a6f05e420 cleanup: use trigraph 2014-03-25 11:22:58 +01:00
Zdenek Kabelac
db71739f42 cleanup: initilization of vars 2014-03-25 11:22:58 +01:00
Zdenek Kabelac
5c9165705a cleanup: indent 2014-03-25 11:22:58 +01:00
Zdenek Kabelac
c7b2c08a6b cleanup: use NULL for pointer reset 2014-03-25 11:22:58 +01:00
Zdenek Kabelac
b714c7ebc6 clvmd: validate open device state
If clvmd does not hold any lock, it should also not keep any opened
device.

The reason for this patch is, that refresh_toolcontext calls
dev_cache_exit() which destroys whole device cache (even those with
opened file) - previous patch added recovery path to avoid memory
corruption, but opened files are still bugs that need to be fixed.

So this patch certainly kills many internal mirror & raid tests,
since they leak opened file descriptors (when tests are executed
with 'abort_on_error').
2014-03-25 11:22:57 +01:00
Zdenek Kabelac
b522312678 clvmd: hardening leak on exit
Operate with lvm_thread_exit while holding lvm_thread_mutex.
Don't leave unfinished work in the lvm thread queue
and always finish all queued tasks before exit,
so no cmd struct is left in the list.

(in-release fix)
2014-03-25 11:22:57 +01:00
Zdenek Kabelac
68d13b2517 dev-cache: fix mem corruption on refresh context
When lvm2 command works with clvmd and uses locking in wrong way,
it may 'leak' certain file descriptors in opened (incorrect) state.

dev_cache_exit then destroys memory pool of cached devices, while
_open_devices list in dev-io.c was still referencing them if they
were still opened.

Patch properly calls _close() function to 'self-heal' from this
invalid state, but it will report internal error (so execution
with abort_on_internal_error causes immediate death). On the
normal 'execution', error is only reported, but memory state is
corrected, and linked list is not referencing devices from
released mempool.

For crash see: https://bugzilla.redhat.com/show_bug.cgi?id=1073886
2014-03-25 11:22:57 +01:00
Peter Rajnoha
d29fe919e6 WHATS_NEW: commit f12ee43 2014-03-25 11:00:44 +01:00
Peter Rajnoha
c84face8ce libdaemon: fix misleading "WARNING: Ignoring unsupported value for expected." when communicating with daemon
When we're trying to search for certain tree node
in daemon's reply, we default to a blank string ""
if the node is not found. This happens during lvmetad
initialization.

However, when the default blank string is used, we
can't use dm_config_find_str at the same time - the
dm_config_find_str_allow_empty should be used instead.
Otherwise a a warning message:

  "WARNING: Ignoring unsupported value for ..."

is issued.
2014-03-24 16:47:08 +01:00
Peter Rajnoha
9446978e64 config: define default value for global/thin_disabled_features as NULL instead
Before:
  thin_disabled_features = ""
Now:
  thin_disabled_features = []

Which is a more correct and consistent way of specifying void array
though parses can handle both forms.
2014-03-24 16:31:27 +01:00
Peter Rajnoha
4e47c34ffc config: also check empty arrays for difference against default values 2014-03-24 16:30:47 +01:00
Peter Rajnoha
5dcec1734e dumpconfig: add dumpconfig --type diff to show differences from defaults 2014-03-24 15:35:54 +01:00
Peter Rajnoha
76ff38fa5c config: add support for comparing used config values with default ones 2014-03-24 15:35:47 +01:00
Peter Rajnoha
630e0af14e cleanup: move _get_def_array_values fn
So we can use reuse it for the code that will follow...
2014-03-24 15:20:19 +01:00
Zdenek Kabelac
c595b20e56 dev-swap: use SECTOR_SHIFT 2014-03-22 20:43:05 +01:00
Zdenek Kabelac
936bfeb8de dev-swap: detect swap signature on devices smaller then 2MB
Smallest supported size for swap device is 40KB, however current
test skipped devices smaller then 4096 sectors (2MB).

Since page is in bytes, convert it to sectors before comparing
with device size (in sectors).
2014-03-22 20:36:14 +01:00
Zdenek Kabelac
93d77455ea WHATS_NEW update 2014-03-21 22:29:28 +01:00
Zdenek Kabelac
c0c55846b0 tests: wait for clvmd.pid file
Just like with dmeventd and lvmetad.
Do few indent changes around.
2014-03-21 22:29:28 +01:00
Zdenek Kabelac
8b1916fd5a tests: simplify 2014-03-21 22:29:28 +01:00
Zdenek Kabelac
de5683d8d9 tests: add quotes around device paths 2014-03-21 22:29:27 +01:00
Zdenek Kabelac
01efb20bdb cleanup: clvmd add more info debug message 2014-03-21 22:29:27 +01:00
Zdenek Kabelac
0d449fe183 cleanup: clvmd uses struct initializers
Code easier to read
2014-03-21 22:29:27 +01:00
Zdenek Kabelac
9196274c1e cleanup: clvmd zombie removal loop
Simplier code to start scan from the next node,
and remove matching pipe client.
2014-03-21 22:29:27 +01:00
Zdenek Kabelac
5740c00f3b cleanup: clvmd reindent read_from_local_sock
Shift indent of else branch to right since
error path returns in the front.
(Simplier to read)
2014-03-21 22:29:26 +01:00
Zdenek Kabelac
dd17286c90 cleanup: clvmd indent change
Plain indent changes.
2014-03-21 22:29:26 +01:00
Zdenek Kabelac
0b79979bb9 cleanup: clvmd dump_messages 2014-03-21 22:29:26 +01:00
Zdenek Kabelac
f8cd435cd8 cleanup: clvmd update log_error
Drop \n from log_error() and add '.'
2014-03-21 22:29:26 +01:00
Zdenek Kabelac
4c97ea2ce5 cleanup: clvmd drop goto 2014-03-21 22:29:25 +01:00
Zdenek Kabelac
7d49c33ffc cleanup: clvmd skip reset of null pointer 2014-03-21 22:29:25 +01:00
Zdenek Kabelac
bf19c6be2c cleanup: clvmd move destroy_lvhash into main
Keep destruction code path consistent and simple and
destroy lvhash in the place it's been created.
Also issue debug message from a single place.
2014-03-21 22:29:25 +01:00
Zdenek Kabelac
1ee8688de0 cleanup: memlock line indent 2014-03-21 22:29:25 +01:00