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

5781 Commits

Author SHA1 Message Date
Zdenek Kabelac
e21ef74f11 Use -f to remove device
Since some test may leave devices in suspend mode which would require
carefull order of resume operation - use '-f' to replace them with
error targets

For disable_dev  - when  'error' target is used for open count - treat
return code as ok (|| true) to avoid breaking futher test processing.
2011-06-30 09:08:22 +00:00
Milan Broz
afc438a5ab Try to force remove dm devices in after test fails. 2011-06-30 08:50:10 +00:00
Alasdair Kergon
5f30b9f4c8 Try to remove any stray loop devices left behind by earlier aborted tests. 2011-06-30 01:17:37 +00:00
Alasdair Kergon
1a3d96757e test attempt to remove stray loop devs 2011-06-30 00:57:29 +00:00
Petr Rockai
14e012871f Differentiate the request and response format, in daemon/common. 2011-06-29 22:20:14 +00:00
Alasdair Kergon
f96cf55d36 Add age filter to dmsetup udevcomplete_all to minimise concurrency problems. 2011-06-29 21:56:46 +00:00
Alasdair Kergon
5ffa914c59 make udev teardown conditional on using udev 2011-06-29 18:18:18 +00:00
Alasdair Kergon
10e002742b teardown aborts if it hits an error, so better teardown semaphores earlier
as we need them later in the teardown process
2011-06-29 18:14:08 +00:00
Alasdair Kergon
456d357692 print any loop devs that weren't torn down 2011-06-29 17:37:30 +00:00
Alasdair Kergon
23ad430648 remove any stray semaphores after tearing down devs 2011-06-29 17:33:39 +00:00
Alasdair Kergon
1d7649f36b Reinstate correct permissions when creating mirrors. 2011-06-29 17:05:53 +00:00
Alasdair Kergon
7cc4a70487 debug log readonly flag with ioctls 2011-06-29 16:08:33 +00:00
Alasdair Kergon
e189a84f57 Append 'm' attribute to pv_attr for missing PVs. 2011-06-29 14:56:33 +00:00
Alasdair Kergon
174ccd3561 Add uuids to dmsetup create cmds. 2011-06-29 12:37:51 +00:00
Alasdair Kergon
efdaae8312 use dmsetup remove -f as a better way of simulating a device "disappearing" 2011-06-29 12:33:18 +00:00
Alasdair Kergon
600dc4168c Remove temporary failures now, but continue to give INTERNAL_ERROR. 2011-06-29 11:36:37 +00:00
Alasdair Kergon
9591e7ede1 Temporary conversion to internal error and failure, to see how many
instances of this problem this flushes out.
2011-06-29 08:54:13 +00:00
Jonathan Earl Brassow
63576b1202 Fix error message - the parameter name is '--mirrorlog' not '--log' 2011-06-29 02:06:26 +00:00
Jonathan Earl Brassow
48c9c491b0 Remove unnecesary conditional.
The conditional is not just unnecessary, it would have been wrong.  The code
is suppose to be checking if the 'splitmirrors_ARG' is negative, but it
instead is checking 'mirrors_ARG'.  Rather than changing the argument being
checked, I've pulled the check entirely because 'splitmirrors_ARG' is already
guarenteed to not be negative by virtue of the fact that it is a 'int_arg'.
Negative values will be caught in _process_command_line().
2011-06-28 21:28:35 +00:00
Zdenek Kabelac
88fca3eff4 Annotate CLVMD_CMD_SYNC_NAMES in decode_cmd 2011-06-28 13:42:15 +00:00
Alasdair Kergon
0b1a308797 More readahead tests. 2011-06-28 09:43:28 +00:00
Alasdair Kergon
7b5e4dcf1f more fixes to readahead etc. 2011-06-28 09:24:13 +00:00
Alasdair Kergon
101ce82afa Change to still sync with udev (to test waiting for rules) then to verify udev
operations like it used to (which will perform them on systems with
non-std dev dirs where test udev rules aren't installed).
2011-06-28 00:38:26 +00:00
Alasdair Kergon
4d40a6f53c Remove enforcement of udev verification when using non-standard /dev location.
If you change the dev dir, it's your responsibility to adjust udev rules
or tell lvm not to use udev too.
2011-06-28 00:23:06 +00:00
Alasdair Kergon
a320aeb30f Selectively enable/disable udev rules. 2011-06-28 00:11:46 +00:00
Alasdair Kergon
55f83c4399 Move _set_lvm_fallback into toolcontext, fix string comparison (/devtest
matched /dev) and note that function should go anyway as it can be
overriding a valid config.
2011-06-27 23:43:04 +00:00
Alasdair Kergon
9032898eb1 Extend debug log messages to distinguish between the 3 states:
trust udev; verify udev; perform dev node operations directly.
2011-06-27 22:38:53 +00:00
Alasdair Kergon
0437bccc3c Move udev_only logic inside stacked node op code.
(We still need to treat add+readhead+del as a no-op.)
Rename udev_fallback to verify_udev_operations.
Rename --udevfallback to --verifyudev
2011-06-27 21:43:58 +00:00
Petr Rockai
94bb67ab37 Add int/str lookup routines specific to the reply (in client) and request (in
server) for nicer-looking code (thin wrapping around find_config_{int,str}).
2011-06-27 14:03:58 +00:00
Petr Rockai
aaca7f111f Also parse the config_tree on the client end (daemon-client.c). 2011-06-27 13:58:11 +00:00
Petr Rockai
55e300716f Parse the incoming config tree in daemon-server.c, providing the
daemon-specific handler with a struct config_tree pointer to look things up in.
2011-06-27 13:46:45 +00:00
Petr Rockai
9925977b07 LVMetaD build hack: link to lvm-internal &c. and add a simple test script. 2011-06-27 13:44:33 +00:00
Petr Rockai
4fcbeed6ef Implement daemon_send_simple and use it in the testclient. 2011-06-27 13:15:49 +00:00
Petr Rockai
308963261c Do not open the socket with SOCK_NONBLOCK in daemon-client, since we have no
use for that behaviour (at least for now).
2011-06-27 13:14:53 +00:00
Petr Rockai
ea32ca07e7 Call daemon_close before exit in the testclient. 2011-06-27 12:27:34 +00:00
Petr Rockai
5c1706e3ef Sketch out the actual on-wire format in daemon-client.h documentation, and add
a simplified send interface.
2011-06-27 12:26:54 +00:00
Alasdair Kergon
140615dafb remove unused var after recent patch 2011-06-24 23:39:09 +00:00
Alasdair Kergon
f4249251cb Return immediately dm_lib_exit() if called more than once.
(Avoiding calling it twice would involve some untangling.)
Decrement the new suspended_counter if removing a suspended device.
2011-06-24 19:33:41 +00:00
Jonathan Earl Brassow
9e0edb7ee5 Fix to preserve exclusive activation of mirror while up-converting.
When an LVM mirror is up-converted (an additional image added), it creates
a temporary mirror stack.  The lower-level mirror in the stack that is
created was not being activated exclusively - violating the exclusive nature
of the original mirror.  We now check for exclusive activation of a mirror
before converting it, and if found, we ensure that the temporary mirror
is also exclusively activated.
2011-06-23 14:00:58 +00:00
Milan Broz
6adbb95b82 Fail allocation if number of extents not divisible by area count
Allocation should fail early if this condition is not met.

Quick fix for https://bugzilla.redhat.com/show_bug.cgi?id=707779
2011-06-23 10:53:24 +00:00
Jonathan Earl Brassow
9e277b9e2c Fix issue preventing cluster mirror creation.
Mirrors used to be created by first creating a linear device and then adding
the other images plus the log.  Now mirrors are created by creating all the
images in one go and then adding the log separately.  The new way ran into
the condition that cluster mirrors cannot change the log type (in the case
of creation, from core -> disk) while the mirror is not active.  (It isn't
active because it is in the process of being created.)  The reason this
condition is in place is because a remote node may have the mirror active, and
we don't want to alter the log underneath it.

What we really needed was a way of checking if the mirror was active remotely
but not locally, and in that case do not allow a change of the log.  I've added
this check, and cluster mirrors can now be created again.
2011-06-22 21:31:21 +00:00
Peter Rajnoha
901e7257d1 Add check for library fallback in _deactivate_node.
This fn calls rm_dev_node directly - an exceptional case. It needs to check
the DM_UDEV_DISABLE_LIBRARY_FALLBACK flag directly (it's called in dm_task_run
normally where it's checked already).
2011-06-22 12:56:02 +00:00
Peter Rajnoha
b1db4dd13e Disable udev fallback and add --udevfallback option to dmsetup. 2011-06-17 14:55:51 +00:00
Peter Rajnoha
418663b61c Disable udev fallback by default and add activation/udev_fallback to lvm.conf.
We've used udev fallback code till now to check whether udev
created/removed the entries in /dev correctly and if not,
a repair was done (giving a warning messagea about that).

This patch adds a possibility to enable this additional check
and subsequent fallback only when required (debugging purposes
mostly) and trust udev completely.

So let's disable the fallback code by default and add a new
configuration option "activation/udev_fallback".

(The original code for creating the nodes will still be used
in case the device directory that is set in lvm.conf differs
from the one that udev uses and also when activation/udev_rules
is set to 0 - otherwise we would end up with no nodes/symlinks
at all)
2011-06-17 14:50:53 +00:00
Zdenek Kabelac
bebe60b70c Code move of vg_mark_partial() up in stack
It's useful to keep the partial flag cached - so just move the call
for vg_mark_partil_lvs() into import_vg_from_config_tree() so it gets
evaluated before it goes through the lvmcache.

This patch should not present any functional change.

Note: It is rather temporal solution - proper place is probably inside the
'read' call back - but needs some more discussion.
For now using this minor hack.
2011-06-17 14:39:10 +00:00
Zdenek Kabelac
93a98c2672 Remove unused internal flag ACTIVATE_EXCL from the code 2011-06-17 14:30:58 +00:00
Zdenek Kabelac
f50a76379a Remove test for status flag
As the ACTIVATE_EXCL could be set only in clvmd code - there is no
use for this test in lv_add_mirrors() function only called from
tools context.

FIXME: Add cluster test case for this.
2011-06-17 14:27:34 +00:00
Zdenek Kabelac
f3d8974dc9 Add couple FIXMEs around suspicious code 2011-06-17 14:24:18 +00:00
Zdenek Kabelac
c6168a14c9 Use lv_activate_opts struct instead of ACTIVATE_EXCL status flag
Let's hope all conditions has been properly converted.
2011-06-17 14:22:48 +00:00
Zdenek Kabelac
3c9ff9e142 Use lv_activate_opts struct instead of ACTIVATE_EXCL status flag. 2011-06-17 14:17:16 +00:00