]> sourceware.org Git - lvm2.git/log
lvm2.git
9 years agotests: do not use |&
Zdenek Kabelac [Thu, 14 May 2015 08:20:24 +0000 (10:20 +0200)]
tests: do not use |&

Bash 3.2  doesn't understand this syntax (i.e. RHEL5).
And it's even better - reports syntax error and return success.

9 years agonix: socat is quite new package
Zdenek Kabelac [Thu, 14 May 2015 07:49:54 +0000 (09:49 +0200)]
nix: socat is quite new package

Install 'nc' on older systems.
Test suite handles both.

9 years agoconf: system_id_source is referencing CONFDIR
Zdenek Kabelac [Thu, 14 May 2015 08:50:21 +0000 (10:50 +0200)]
conf: system_id_source is referencing CONFDIR

Since we allow to configure /etc in configure and compile-in
dir for /etc we need to properly advertise this location later.

9 years agomakefiles: protect CFLAGS
Zdenek Kabelac [Wed, 13 May 2015 21:43:50 +0000 (23:43 +0200)]
makefiles: protect CFLAGS

When CFLAGS and LDFLAGS are passed into - protect them,
and avoid even recursive subdir 'extension' of them.

9 years agomakefiles: assign vars before include
Zdenek Kabelac [Wed, 13 May 2015 21:42:17 +0000 (23:42 +0200)]
makefiles: assign vars before include

Before we include, set INCLUDE and TARGETS.
Extend CFLAGS after include.

9 years agomakefiles: drop DEBUG mangling
Zdenek Kabelac [Wed, 13 May 2015 19:33:17 +0000 (21:33 +0200)]
makefiles: drop DEBUG mangling

DEBUG is already set through make.tmpl.

9 years agoconfigure: set optimize flags when CFLAGS is unset
Zdenek Kabelac [Wed, 13 May 2015 19:30:20 +0000 (21:30 +0200)]
configure: set optimize flags when CFLAGS is unset

If we are given CFLAGS - preserve user's request and avoid placing
just -O2 there.

9 years agoconfigure: preserve CXX/CFLAGS
Zdenek Kabelac [Wed, 13 May 2015 19:23:24 +0000 (21:23 +0200)]
configure: preserve CXX/CFLAGS

AC_PROG_CC
AC_PROG_CXX

Does not preserve CFLAGS CXXFLAGS

9 years agonix: fix socat package name
Zdenek Kabelac [Wed, 13 May 2015 19:22:08 +0000 (21:22 +0200)]
nix: fix socat package name

9 years agomakefiles: use fullpath when in assign
Zdenek Kabelac [Wed, 13 May 2015 13:43:55 +0000 (15:43 +0200)]
makefiles: use fullpath when in assign

We need to put full path right in the assign moment,
otherwise command:

make rpm rpmbuild=/my/tmp/dir

cannot work as one would have expected.

9 years agomakefiles: testclient is not valid target
Zdenek Kabelac [Wed, 13 May 2015 12:22:46 +0000 (14:22 +0200)]
makefiles: testclient is not valid target

9 years agomakefiles: drop way too generic deps
Zdenek Kabelac [Wed, 13 May 2015 12:22:18 +0000 (14:22 +0200)]
makefiles: drop way too generic deps

9 years agolibdaemon: Fix socket reuse error paths.
Alasdair G Kergon [Wed, 13 May 2015 12:42:09 +0000 (13:42 +0100)]
libdaemon: Fix socket reuse error paths.

Invert S_ISSOCK validation.
Fail instead of replacing a symlink with a new socket.
After failure, skip calling fcntl with invalid socket_fd.

9 years agoconfigure: start to use AS_IF
Zdenek Kabelac [Tue, 12 May 2015 12:46:36 +0000 (14:46 +0200)]
configure: start to use AS_IF

9 years agonix: more base packages
Zdenek Kabelac [Tue, 12 May 2015 12:33:14 +0000 (14:33 +0200)]
nix: more base packages

9 years agospec: packaging polld
Zdenek Kabelac [Wed, 13 May 2015 11:14:54 +0000 (13:14 +0200)]
spec: packaging polld

Package lvmpolld

Drop legacy SysV init subpackage.

9 years agolvmpolld: dump cleanup
Ondrej Kozina [Tue, 12 May 2015 15:05:45 +0000 (17:05 +0200)]
lvmpolld: dump cleanup

9 years agolvmpolld-client.c: use lvmpolld debug class where appropriate
Ondrej Kozina [Tue, 12 May 2015 14:28:42 +0000 (16:28 +0200)]
lvmpolld-client.c: use lvmpolld debug class where appropriate

9 years agotests: remove forgotten -vvvv option
Ondrej Kozina [Tue, 12 May 2015 14:00:08 +0000 (16:00 +0200)]
tests: remove forgotten -vvvv option

9 years agolibdm-common.c: remove trailing whitespace
Ondrej Kozina [Tue, 12 May 2015 13:28:38 +0000 (15:28 +0200)]
libdm-common.c: remove trailing whitespace

9 years agolvmpolld-client.c: be more specific about fallback on error
Ondrej Kozina [Tue, 12 May 2015 13:34:45 +0000 (15:34 +0200)]
lvmpolld-client.c: be more specific about fallback on error

if client fails to contact lvmpolld it fallbacks to using classical
polldaemon. Be more specific and give some hints to users what went
possibly wrong

9 years agonew debug class for lvmpolld client code
Ondrej Kozina [Tue, 12 May 2015 13:26:26 +0000 (15:26 +0200)]
new debug class for lvmpolld client code

9 years agolvmpolld.8.in: clarify the timeout parameter
Ondrej Kozina [Tue, 12 May 2015 08:20:39 +0000 (10:20 +0200)]
lvmpolld.8.in: clarify the timeout parameter

Remove references to systemd native service. Now
the libdaemon supports shutdown on idle no matter
the init process implementation installed.

9 years agolibdaemon: shutdown on idle also in non-systemd environment
Ondrej Kozina [Tue, 12 May 2015 07:37:19 +0000 (09:37 +0200)]
libdaemon: shutdown on idle also in non-systemd environment

9 years agotests: ndev by default
Zdenek Kabelac [Mon, 11 May 2015 18:04:35 +0000 (20:04 +0200)]
tests: ndev by default

9 years agoconfigure: spec.inc is generated at build
Zdenek Kabelac [Tue, 12 May 2015 10:07:44 +0000 (12:07 +0200)]
configure: spec.inc is generated at build

Collect all needed info at runtime for spec.inc

9 years agomakefiles: use LN_S
Zdenek Kabelac [Mon, 11 May 2015 19:47:39 +0000 (21:47 +0200)]
makefiles: use LN_S

9 years agomakefiles: runtime spec.inc
Zdenek Kabelac [Mon, 11 May 2015 19:48:11 +0000 (21:48 +0200)]
makefiles: runtime spec.inc

Support  CLEAN_DIRS
Var for rpmbuilddir
Use LN_S
Generate spec.inc at runtime for 'make rpm'.

9 years agotests: remove forgotten set -v in aux
Ondrej Kozina [Mon, 11 May 2015 16:49:24 +0000 (18:49 +0200)]
tests: remove forgotten set -v in aux

9 years agolvmpolld: by default spawn lvpoll cmd with -An
Ondrej Kozina [Mon, 11 May 2015 13:22:18 +0000 (15:22 +0200)]
lvmpolld: by default spawn lvpoll cmd with -An

9 years agolvmpolld: set use counters properly in lvmpolld_store
Ondrej Kozina [Mon, 11 May 2015 12:19:11 +0000 (14:19 +0200)]
lvmpolld: set use counters properly in lvmpolld_store

set active_polling_count to zero in pdst_init fn

9 years agolib/polldaemon.h: remove trailing whitespace
Ondrej Kozina [Mon, 11 May 2015 11:39:16 +0000 (13:39 +0200)]
lib/polldaemon.h: remove trailing whitespace

9 years agolvmdump.sh: print out lvmpolld service status
Ondrej Kozina [Mon, 11 May 2015 11:31:43 +0000 (13:31 +0200)]
lvmdump.sh: print out lvmpolld service status

9 years agotests: split flavours
Zdenek Kabelac [Mon, 11 May 2015 15:30:23 +0000 (17:30 +0200)]
tests: split flavours

Remove duplicate flavour-udev-lvmetad-lvmpolld
and put them 1-per-line.

9 years agonix: now some files are generate so keep them
Zdenek Kabelac [Mon, 11 May 2015 15:29:21 +0000 (17:29 +0200)]
nix: now some files are generate so keep them

more tweaks ahead

9 years agovgimport: fall back when lvmetad is not running
David Teigland [Mon, 11 May 2015 14:28:47 +0000 (09:28 -0500)]
vgimport: fall back when lvmetad is not running

If lvmetad is configured, but not running,
vgimport would not fall back and run without
lvmetad, but would report an error about
requiring lvmetad.

9 years agotests: typo in aux
Zdenek Kabelac [Mon, 11 May 2015 14:14:24 +0000 (16:14 +0200)]
tests: typo in aux

Ooops editor grabbed q in test.

9 years agomakefiles: move clean
Zdenek Kabelac [Mon, 11 May 2015 14:08:58 +0000 (16:08 +0200)]
makefiles: move clean

Move clean: target below, so it's not a default target to execute.

9 years agomakefile: cleanup after build
Zdenek Kabelac [Mon, 11 May 2015 13:52:11 +0000 (15:52 +0200)]
makefile: cleanup after build

Provide cleaning rules for build dir and release tgz.

9 years agotests: disable lvmetad and lvmpolld
Zdenek Kabelac [Mon, 11 May 2015 13:45:34 +0000 (15:45 +0200)]
tests: disable lvmetad and lvmpolld

Since now we enable those by default when compiled with those daemons,
explicitely disable them in tests when needed.

Alphabetically sort configurables.

9 years agospec: now generated
Zdenek Kabelac [Mon, 11 May 2015 12:30:54 +0000 (14:30 +0200)]
spec: now generated

9 years agomakefiles: dist and rpm target
Zdenek Kabelac [Mon, 11 May 2015 12:28:55 +0000 (14:28 +0200)]
makefiles: dist and rpm target

Basic support for upstream 'build' of rpm packages.
Make spec file generated.

2 new simple targets:

make dist  - create LVM2.MAJOR.MINOR.PATCHLEVEL.tgz  from git files.

make rpm   - some generic rpmbuilder using spec files.
             Create packages in build/ subdir.
             DO NOT USE created rpms in any distribution!

9 years agospec: writable instalation
Zdenek Kabelac [Mon, 11 May 2015 11:51:49 +0000 (13:51 +0200)]
spec: writable instalation

rpmbuild needs writable binaries (for debug symbol extraction)

9 years agoconfigure: use_lvmetad/polld configurable
Zdenek Kabelac [Mon, 11 May 2015 11:49:41 +0000 (13:49 +0200)]
configure: use_lvmetad/polld configurable

Configure provides proper settings for
use_lvmetad  and use_lvmpolld  conf setttings.

When the build of polld & lvmetad, these settings
are enabled by default unless explicitelly disabled
with --disable-use-lvmetad/--disable-use-lvmpolld.

9 years agometadata: use log_debug_metadata instead of general log_debug for BA debug messages
Peter Rajnoha [Mon, 11 May 2015 09:07:53 +0000 (11:07 +0200)]
metadata: use log_debug_metadata instead of general log_debug for BA debug messages

9 years agotests: missed conversion
Zdenek Kabelac [Sat, 9 May 2015 07:15:29 +0000 (09:15 +0200)]
tests: missed conversion

Assuming it should test same number as other functions.

9 years agotests: avoid clobering dmesg
Zdenek Kabelac [Fri, 8 May 2015 20:43:06 +0000 (22:43 +0200)]
tests: avoid clobering dmesg

Restore old harness access to /dev/kmsg.

9 years agocleanup: drop extra test for NULL
Zdenek Kabelac [Fri, 8 May 2015 21:01:32 +0000 (23:01 +0200)]
cleanup: drop extra test for NULL

vg cannot be NULL here - it's been already used in the code above.

9 years agocleanup: remove extraneous parentheses
Zdenek Kabelac [Fri, 8 May 2015 20:58:00 +0000 (22:58 +0200)]
cleanup: remove extraneous parentheses

9 years agolvmpolld: Add standalone polldaemon.
Ondrej Kozina [Fri, 8 May 2015 23:59:18 +0000 (00:59 +0100)]
lvmpolld: Add standalone polldaemon.

See doc/lvmpolld_overview.txt

9 years agolvmcache: set device in label when switching devs V2
David Teigland [Fri, 8 May 2015 22:10:53 +0000 (17:10 -0500)]
lvmcache: set device in label when switching devs V2

This is an alternative/equivalent to commit
ca67cf84df6015c990618de3dc45c0b87eee75ce

The problem (wrong label->dev after a new preferred
duplicate device is chosen) was isolated to the lvmetad
case (non-lvmetad worked fine), and this fixes the problem
by setting the new label->dev in the lvmetad-specific
code rather than in the general lvmcache code.

9 years agolvmcache: set device in label when switching devs
David Teigland [Fri, 8 May 2015 19:38:26 +0000 (14:38 -0500)]
lvmcache: set device in label when switching devs

When using lvmetad, the reporter code was not reporting
the new preferred device because the new preferred dev
was not being set in the label struct.

9 years agotests: better filter
Zdenek Kabelac [Fri, 8 May 2015 18:44:43 +0000 (20:44 +0200)]
tests: better filter

Filter $PREFIX rather then just LVMTEST.

9 years agotests: missing vg
Zdenek Kabelac [Fri, 8 May 2015 17:17:00 +0000 (19:17 +0200)]
tests: missing vg

9 years agotoollib: avoid repeated lvmetad vg_lookup
David Teigland [Tue, 5 May 2015 21:24:50 +0000 (16:24 -0500)]
toollib: avoid repeated lvmetad vg_lookup

In process_each_{vg,lv,pv} when no vgname args are given,
the first step is to get a list of all vgid/vgname on the
system.  This is exactly what lvmetad returns from a
vg_list request.  The current code is doing a vg_lookup
on each VG after the vg_list and populating lvmcache with
the info for each VG.  These preliminary vg_lookup's are
unnecessary, because they will be done again when the
processing functions call vg_read.  This patch eliminates
the initial round of vg_lookup's, which can roughly cut in
half the number of lvmetad requests and save a lot of extra work.

9 years agolvmcache: choose preferred device once
David Teigland [Wed, 6 May 2015 19:49:44 +0000 (14:49 -0500)]
lvmcache: choose preferred device once

Once the preferred duplicate devices have been set in
lvmcache, don't attempt to pick preferred duplicates
again.

9 years agolvmcache: update lvmcache with alternate device
David Teigland [Tue, 5 May 2015 19:02:43 +0000 (14:02 -0500)]
lvmcache: update lvmcache with alternate device

When there are duplicate PVs, and one device
replaces another in lvmcache, use label_read
to update lvmcache for the new device.

9 years agodebug: extra validation of passed segment
Zdenek Kabelac [Thu, 7 May 2015 12:04:22 +0000 (14:04 +0200)]
debug: extra validation of passed segment

Always check if passed segment really is correct cache segment.
(Avoids derefernce of possibly NULL seg->pool_lv).

9 years agodebug: tracing error path
Zdenek Kabelac [Thu, 7 May 2015 10:37:15 +0000 (12:37 +0200)]
debug: tracing error path

9 years agodebug: show sys errors
Zdenek Kabelac [Thu, 7 May 2015 09:38:43 +0000 (11:38 +0200)]
debug: show sys errors

9 years agocleanup: use 64bit ulongs
Zdenek Kabelac [Thu, 7 May 2015 09:17:36 +0000 (11:17 +0200)]
cleanup: use 64bit ulongs

Use 64bit arithmetics for all numbers (Coverity).

9 years agocleanup: cast minor to dev_t
Zdenek Kabelac [Thu, 7 May 2015 09:03:48 +0000 (11:03 +0200)]
cleanup: cast minor to dev_t

Let the arithmetic run with a single dev_t type (Coverity).

9 years agocleanup: indent mismatch
Zdenek Kabelac [Thu, 7 May 2015 09:00:23 +0000 (11:00 +0200)]
cleanup: indent mismatch

Aling break (Coverity).

9 years agocleanup: drop unneeded header file
Zdenek Kabelac [Thu, 7 May 2015 08:58:35 +0000 (10:58 +0200)]
cleanup: drop unneeded header file

Does not resolves any symbols (Coverity).

9 years agocleanup: drop unneeded int test
Zdenek Kabelac [Thu, 7 May 2015 08:54:55 +0000 (10:54 +0200)]
cleanup: drop unneeded int test

Testing int  region_size > INT32_MAX is always false
so drop the test (Coverity).

9 years agoformat1: check for lvm1_system_id
Zdenek Kabelac [Thu, 7 May 2015 11:09:43 +0000 (13:09 +0200)]
format1: check for lvm1_system_id

As in the code above in this function continue to check for
lvm1_system_id pointer existance before dereferencing it
(Coverity).

9 years agoformat_text: properly validate PV size for restore
Zdenek Kabelac [Thu, 7 May 2015 09:08:49 +0000 (11:08 +0200)]
format_text: properly validate PV size for restore

Use 64bit arithmentic for PV size calculation (Coverity).

Also remove sector shift for compared PV size, since all
values are already held in sectors.

This fixes validatio of PV size when restoring PV
from vg metadata backup file.

9 years agopvcreate: fix test for wiping status
Zdenek Kabelac [Thu, 7 May 2015 10:10:20 +0000 (12:10 +0200)]
pvcreate: fix test for wiping status

Commit ed420fb6917162ed17af69a9a0ec9ae26e61e209 changed
paramet wiped to be a pointer, but missed to switch
to test pointer dereferenced value and instead always
checked 'pointer'.

9 years agolvmcache: copy just 32bytes
Zdenek Kabelac [Thu, 7 May 2015 09:28:22 +0000 (11:28 +0200)]
lvmcache: copy just 32bytes

Copy only bytes which fits.

vginfo->vgid  is  [ID_LEN + 1]
vgsummary->vgid has only [ID_LEN]

Reported by Coverity.

9 years agoman: Fix recursive lvm-config man page.
Alasdair G Kergon [Thu, 7 May 2015 11:07:40 +0000 (12:07 +0100)]
man: Fix recursive lvm-config man page.

9 years agoPython: Improve lv property test coverage
Tony Asleson [Tue, 5 May 2015 18:48:52 +0000 (13:48 -0500)]
Python: Improve lv property test coverage

Improve the python unit test case to cover all of the properties of a LV and
the properties of a LV segment.

In addition we also add a 'tag' to the lv so that we can retrieve it
using the 'lv_tags' property to ensure that this works as expected.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
9 years agolvm2app: Correct missing string properties
Tony Asleson [Mon, 4 May 2015 20:20:55 +0000 (15:20 -0500)]
lvm2app: Correct missing string properties

Synopsis: STR_LIST needs to be treated as STR for properties.

For any lvm property that was internally 'typed' as a string list we were failing
to return a string in the property API.  This was due to the fact that for the
properties to work the value needs to either be evaulated as a string or a
number.  This change corrects the macro used to build the memory array of
structures so that the string bitfield is set as needed to ensure that the value
is a string.

https://bugzilla.redhat.com/show_bug.cgi?id=1139920

Signed-off-by: Tony Asleson <tasleson@redhat.com>
9 years agopython: Check for NULL value before constructing string property
Tony Asleson [Mon, 4 May 2015 20:19:48 +0000 (15:19 -0500)]
python: Check for NULL value before constructing string property

When retrieving a property value that is a string, if the character pointer in C
was NULL, we would segfault.  This change checks for non-null before creating a
python string representation.  In the case where the character pointer is NULL
we will return a python 'None' for the value.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
9 years agopython: Build correct python value for numerical property
Tony Asleson [Mon, 4 May 2015 19:55:00 +0000 (14:55 -0500)]
python: Build correct python value for numerical property

With the lvm2app C API adding the ability to determine when a property is
signed we can then use this information to construct the correct representation
of the number for python which will maintain value and sign.  Previously, we
only represented the numbers in python as positive integers.

Python long type exceeds the range for unsigned and signed integers, we just
need to use the appropriate parsing code to build correctly.

Python part of the fix for:
https://bugzilla.redhat.com/show_bug.cgi?id=838257

Signed-off-by: Tony Asleson <tasleson@redhat.com>
9 years agolvm2app: Add signed numerical property values
Tony Asleson [Mon, 4 May 2015 19:51:41 +0000 (14:51 -0500)]
lvm2app: Add signed numerical property values

Currently lvm2app properties have the following structure:

typedef struct lvm_property_value {
        uint32_t is_settable:1;
        uint32_t is_string:1;
        uint32_t is_integer:1;
        uint32_t is_valid:1;
        uint32_t padding:28;
        union {
                const char *string;
                uint64_t integer;
        } value;
} lvm_property_value_t;

which assumes that numerical values were in the range of 0 to 2**64-1.  However,
some of the properties were 'signed', like LV major/minor numbers and some
reserved values for properties that represent percentages.  Thus when the
values were retrieved they were in two's complement notation.  So for a -1
major number the API user would get a value of 18446744073709551615.  The
API user could cast the returned value to an int64_t to handle this, but that
requires the API developer to look at the source code and determine when it
should be done.

This change modifies the return property structure to:

typedef struct lvm_property_value {
        uint32_t is_settable:1;
        uint32_t is_string:1;
        uint32_t is_integer:1;
        uint32_t is_valid:1;
        uint32_t is_signed:1;
        uint32_t padding:27;
        union {
                const char *string;
                uint64_t integer;
                int64_t signed_integer;
        } value;
} lvm_property_value_t;

With this addition the API user can interrogate that the value is numerical,
(is_integer = 1) and subsequently check if it's signed (is_signed = 1) too.
If signed, then the API developer should use the union's signed_integer to
avoid casting.

This change maintains backwards compatibility as the structure size remains
unchanged and integer value remains unchanged.  Only the additional bit
taken from the pad is utilized.

Bugzilla reference:
https://bugzilla.redhat.com/show_bug.cgi?id=838257

Signed-off-by: Tony Asleson <tasleson@redhat.com>
9 years agotests: do not restart lvmetad when not necessary
Ondrej Kozina [Wed, 6 May 2015 13:20:11 +0000 (15:20 +0200)]
tests: do not restart lvmetad when not necessary

overlooked pvmove-restart test during cleanup

9 years agoWHATS_NEW: update for recent changes
Ondrej Kozina [Tue, 5 May 2015 17:35:52 +0000 (19:35 +0200)]
WHATS_NEW: update for recent changes

commits:
bda26acf70e92232b1ed644dba6b44ecbff2a058
76a0dffe6f4869de9ca457119c9d7ced837d4e0b

9 years agopolldaemon: make wait_for_single_lv public
Ondrej Kozina [Fri, 10 Apr 2015 14:36:50 +0000 (16:36 +0200)]
polldaemon: make wait_for_single_lv public

referenced by new lvpoll command after lvmpolld
gets merged.

9 years agopolldaemon: introduce _nanosleep function
Ondrej Kozina [Fri, 10 Apr 2015 14:31:28 +0000 (16:31 +0200)]
polldaemon: introduce _nanosleep function

querying future lvmpolld with zero wait time is highly undesirable
and can cause serious performance drop of the future daemon. The new
wrapper function may avoid immediate return from syscal by
introducing minimal wait time on demand.

9 years agopolldaemon: refactor polling interfaces
Ondrej Kozina [Fri, 10 Apr 2015 12:08:19 +0000 (14:08 +0200)]
polldaemon: refactor polling interfaces

Routines responsible for polling of in-progress pvmove, snapshot merge
or mirror conversion each used custom lookup functions to find vg and
lv involved in polling.

Especially pvmove used pvname to lookup pvmove in-progress. The future
lvmpolld will poll each operation by vg/lv name (internally by lvid).
Also there're plans to make pvmove able to move non-overlaping ranges
of extents instead of single PVs as of now. This would also require
to identify the opertion in different manner.

The poll_operation_id structure together with daemon_parms structure they
identify unambiguously the polling task.

9 years agopolldaemon: optimise out waiting after polling
Ondrej Kozina [Tue, 5 May 2015 14:09:53 +0000 (16:09 +0200)]
polldaemon: optimise out waiting after polling

Waiting even after _check_lv_status returned success and
'finished' flag was set to true doesn't make much sense.

Note that while we skip the wait() we also skip the
init_full_scan_done(0) inside the routine. This should
have no impact as long as the code after _wait_for_single_lv
doesn't presume anything about the state of the cache.

9 years agopolldaemon: get get_copy_vg ready for refactoring
Ondrej Kozina [Tue, 5 May 2015 14:06:24 +0000 (16:06 +0200)]
polldaemon: get get_copy_vg ready for refactoring

with refactored code we take some VG locks as read-only.
Make the poll_get_copy_vg ready for the change.

9 years agolvconvert: code cleanup and preps for refactoring
Ondrej Kozina [Tue, 5 May 2015 13:11:50 +0000 (15:11 +0200)]
lvconvert: code cleanup and preps for refactoring

just a code cleanup and preparations for adding
new code required for polldaemon refactoring.
This commit should not have any functional impact.

9 years agopolldaemon: respect lv_attr parm in poll_get_copy_lv
Ondrej Kozina [Mon, 4 May 2015 13:41:27 +0000 (15:41 +0200)]
polldaemon: respect lv_attr parm in poll_get_copy_lv

as a part of bigger effort to unify polling intefaces
poll_get_copy_lv should be able to look up LVs based
on theirs lv->status field.

Effective after pvmove starts using poll_get_copy_lv
fn as well.

9 years agopolldaemon: move lvconvert_get_copy_lv code
Ondrej Kozina [Fri, 10 Apr 2015 11:57:13 +0000 (13:57 +0200)]
polldaemon: move lvconvert_get_copy_lv code

Moving lvconvert_get_copy_lv to polldaemon (poll_get_copy_lv).
Clear move and rename.

9 years agopolldaemon: move lvconvert_get_copy_vg code
Ondrej Kozina [Mon, 4 May 2015 12:32:32 +0000 (14:32 +0200)]
polldaemon: move lvconvert_get_copy_vg code

Moving lvconvert_get_copy_vg to polldaemon (poll_get_copy_vg).
Clear move and rename.

9 years agotests: play better with mdadm
Zdenek Kabelac [Mon, 4 May 2015 11:07:33 +0000 (13:07 +0200)]
tests: play better with mdadm

Manage mdadm devices on older distros is a challange.

9 years agoraid: reread status when 0 is reported
Zdenek Kabelac [Mon, 4 May 2015 09:25:00 +0000 (11:25 +0200)]
raid: reread status when 0 is reported

When kernel target reports sync status as 0%  it might as well mean
it's 100% in sync, just the target is in some race inconsistent
state - so reread once again and take a more optimistic value ;)

Patch tries to work around:
https://bugzilla.redhat.com/show_bug.cgi?id=1210637

9 years agotests: check for open_count
Zdenek Kabelac [Mon, 4 May 2015 08:18:44 +0000 (10:18 +0200)]
tests: check for open_count

Instead of checking /proc/mounts check for open_count of snap device.
Parallel umount has race, so check for open_count.

9 years agotests: drop extra scsi init
Zdenek Kabelac [Mon, 4 May 2015 08:17:48 +0000 (10:17 +0200)]
tests: drop extra scsi init

Use first test also for checking the support is there -
avoid one extra unnecessary scsi_debug reload.

9 years agotests: check for clvmd process entry
Zdenek Kabelac [Mon, 4 May 2015 08:16:33 +0000 (10:16 +0200)]
tests: check for clvmd process entry

Instead of checking just for pid file - rather check
for process  - since there could be slight race, the
pid file is gone, but process still exists.

9 years agotests: validate passed LVM_TEST_DEVDIR
Zdenek Kabelac [Mon, 4 May 2015 08:15:56 +0000 (10:15 +0200)]
tests: validate passed LVM_TEST_DEVDIR

Quit test early if passed LVM_TEST_DEVDIR dir does not exists.

9 years agotests: wait for scsi device to appear
Zdenek Kabelac [Mon, 4 May 2015 08:14:52 +0000 (10:14 +0200)]
tests: wait for scsi device to appear

Continue with test as soon as device appear (avoid 2s delay)

9 years agotests: dd needs to fail in this case
Zdenek Kabelac [Sat, 2 May 2015 23:06:20 +0000 (01:06 +0200)]
tests: dd needs to fail in this case

9 years agotests: more waits on restart
Zdenek Kabelac [Sat, 2 May 2015 22:29:06 +0000 (00:29 +0200)]
tests: more waits on restart

Check for socket presence (hardcoded for now)

9 years agotests: use 800ms write delay
Zdenek Kabelac [Sat, 2 May 2015 20:03:19 +0000 (22:03 +0200)]
tests: use 800ms write delay

Since this value magically worked for  pvmove-abort*
use it here as well.

Also prepate_lvmetad has better kill&reload mechanism.

9 years agotests: use odirect
Zdenek Kabelac [Sat, 2 May 2015 19:14:45 +0000 (21:14 +0200)]
tests: use odirect

Fill snaphot with odirect so we know data hits disk
before we test how full the snapshot is.

9 years agolvm2app: call fin_locking in lvm_quit
Zdenek Kabelac [Sat, 2 May 2015 19:13:15 +0000 (21:13 +0200)]
lvm2app: call fin_locking in lvm_quit

lvm_quit() function should also close locking.
Fixes unclosed socket connecting clvmd.

9 years agoconfigure: detect /run dir
Zdenek Kabelac [Sat, 2 May 2015 21:57:52 +0000 (23:57 +0200)]
configure: detect /run dir

Access /run directly when system supports it.

9 years agoclvmd: missed newline in help text
Zdenek Kabelac [Sat, 2 May 2015 22:30:14 +0000 (00:30 +0200)]
clvmd: missed newline in help text

Print \n after listing included lock managers.

This page took 0.068466 seconds and 5 git commands to generate.