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

10871 Commits

Author SHA1 Message Date
Ondrej Kozina
1aba262edb lvmpolld: terminate error message with a dot and LF 2015-05-27 11:10:43 +02:00
Ondrej Kozina
f0268585dd WHATS_NEW: various updates
commit c069aff21b
commit 8af5f54824
2015-05-26 16:28:04 +02:00
Ondrej Kozina
8af5f54824 dmsetup: zero errno in before strtoul call
Testing errno value without explicitly setting to
zero in before the strtoul call may lead to
unexpected failures.
2015-05-26 16:27:10 +02:00
Ondrej Kozina
c069aff21b lvmpolld: zero errno in before strtoul call
Testing errno value without explicitly setting to
zero in before the strtoul call may lead to
unexpected failures.
2015-05-26 16:27:03 +02:00
Ondrej Kozina
a72a805896 lvconvert.c: fix whitespace mess 2015-05-26 16:26:57 +02:00
Alasdair G Kergon
eeb498627c libdm: Add dm_task_get_errno to return ioctl errno.
There are reports of unexplained ioctl failures when using dmeventd.
An explanation might be that the wrong value of errno is being used.

Change libdevmapper to store an errno set by from dm ioctl() directly
and provide it to the caller through a new dm_task_get_errno() function.

[Replaced f9510548667754d9209b232348ccd2d806c0f1d8]
2015-05-26 15:13:49 +01:00
Ondrej Kozina
b244fffc18 WHATS_NEW: update
update for commit: f8bf641095
2015-05-25 10:48:53 +02:00
Ondrej Kozina
da20e0c507 tests: add test for pvscan --cache --background
regression test for a segfault in pvscan --cache --background
bug fixed by commit:
f8bf641095
2015-05-25 10:48:45 +02:00
Ondrej Kozina
f8bf641095 lvmetad.c: ignore lvmetad global handle on disconnect
do not unset lvmetad global handle on disconnect. This is
hotfix for issue described in:
https://www.redhat.com/archives/linux-lvm/2015-May/msg00008.html

Reported-by: Christian Hesse <list@eworm.de>
2015-05-25 09:11:04 +02:00
Lidong Zhong
9d558fbcc2 lvconvert: change how to get failed mirrors number
Commit  b00711e312 improperly
convert _area_missing() replacment and moved check for
AREA_PV seg_type() into same if() section.

Signed-off-by: Lidong Zhong <lzhong@suse.com>
2015-05-22 15:35:36 +02:00
Peter Rajnoha
ba68aed836 scripts: activation generator: do not use --sysinit if lvmpolld used
If lvmetad is not used, we generate lvm2-activation{-early,-net}.service
systemd services to activate any VGs found on the system. So far we used
--sysinit during this activation as polling was still forked off of the
lvm activation command.

This has changed with lvmpolld - we have proper lvmpolld systemd
service now (activated via its socket unit). As such, we don't need
to use --sysinit anymore during activation in systemd environment
as polling was the only barrier to remove the need for --sysinit.
2015-05-21 12:20:30 +02:00
Ondrej Kozina
6d998aa13d lvmpolld-client.c: debug print when querying progress 2015-05-21 11:20:21 +02:00
Ondrej Kozina
01b06cb71b polldaemon.c: modify log levels in report_progress
There's a race when asking lvmpolld about progress_status and
actually reading the progress info from kernel:

Even with lvmpolld being used we read status info from
LVM2 command issued by a user (client side from lvmpolld perspective).
The whole cycle may look like following:

1) set up an operation that requires polling (i.e. pvmove /dev/sda)
2) notify lvmpolld about such operation (lvmpolld_poll_init())
3) in case 1) was not called with --background it would continue with:
4) Ask lvmpolld about progress status. it may respond with one of:
   a) in_progress
   b) not_found
   c) finished
   d) any low level error

5) provided the answer was 4a) try to read progress info from polling LV
(i.e. vg00/pvmove1). Repeat steps 4) and 5) until the answer is != 4a).

And now we got into racy configuration: lvmpolld answered with in_progress
but it may be the that in_between 4) and 5) the operation has already
finished and polling LV is already gone or there's nothing to ask for.
Up to now, 5) would report warning and it could print such warning many
times if --interval was set to 0.

We don't want to scary users by warnings in such situation so let's just
print these messages in verbose mode. Error messages due to error while
reading kernel status info (on existing, active and locked LV) remained
the same.
2015-05-21 11:20:11 +02:00
Petr Rockai
43224f22e4 format_text: Parse (optional) outdated_pvs section in VG metadata. 2015-05-20 19:46:14 +02:00
Petr Rockai
e8d00e0687 lvmetad: Set up lvmcache & PV structs for outdated_pvs. 2015-05-20 19:46:14 +02:00
Petr Rockai
55f3369692 lvmetad: Provide entire pvmeta sections for outdated_pvs. 2015-05-20 19:46:14 +02:00
Petr Rockai
611c8b6d29 metadata: Add pvs_outdated to struct volume_group.
This is a list of PVs that should have their MDAs wiped because they carry
outdated metadata (that used to belong to the VG they are attached to).
2015-05-20 19:46:14 +02:00
Petr Rockai
5435346052 metadata: Factor _wipe_outdated_pvs() PVs out of _vg_read(). 2015-05-20 19:46:13 +02:00
Petr Rockai
1562cd7320 lvmetad: Attach an outdated_pvs list to vg_lookup replies. 2015-05-20 19:46:13 +02:00
Petr Rockai
da1527d65d lvmetad: Clear the vgid_to_outdated_pvs hash on shutdown. 2015-05-20 19:46:13 +02:00
Petr Rockai
925268794f lvmetad: Maintain info about outdated PVs. 2015-05-20 19:46:13 +02:00
Zdenek Kabelac
f3c7bd4004 makefiles: use bash subshell
Avoid using  make's $(shell invocation since the eval order is
then somewhat different and use $$(  subshell.

This also fixes a problem when more then one symbol is found,
since target shell has been given separate word list
so the 'R' assignment would need "" around it.
2015-05-20 09:33:51 +02:00
Zdenek Kabelac
682e0c898e configure: fix missing [ 2015-05-20 09:32:03 +02:00
Ondrej Kozina
788e4c5423 WHATS_NEW: various updates 2015-05-19 21:01:24 +02:00
Ondrej Kozina
e6b5eb88f2 polldaemon.c: do not report error when LV not found
currently in wait_for_single_lv() fn trying to poll missing pvmove LV
is considered success. It may have been already finished by another
instance of polldaemon. either by another forked off polldaemon
or by lvmpolld.

Let's try to handle the mirror conversion and snapshot merge the same
way.
2015-05-19 20:56:46 +02:00
David Teigland
cf5b4a2286 lvconvert.c: drop get_vg_lock_and_logical_volume fn 2015-05-19 20:56:32 +02:00
David Teigland
f400f9db19 pvmove.c: code cleanup 2015-05-19 20:56:24 +02:00
David Teigland
7a8ce8dbf7 polldaemon: remove get_copy_vg and get_copy_lv wrappers
These wrappers have been replaced by direct calls
to vg_read() and find_lv() in previous commits.

This commit should have no functional impact since
all bits were already unreachable.
2015-05-19 20:56:15 +02:00
Ondrej Kozina
6fba37777c polldaemon.c: call find_lv directly 2015-05-19 20:56:07 +02:00
David Teigland
08114840ca lvconvert.c: call find_lv directly 2015-05-19 20:55:57 +02:00
David Teigland
0d300b70f9 polldaemon.c: call vg_read directly
replace calls in wait_for_single_lv() and report_progress() fns
2015-05-19 20:55:50 +02:00
David Teigland
15939e3435 lvconvert.c: call vg_read directly 2015-05-19 20:55:41 +02:00
David Teigland
131c657735 pvmove.c: call vg_read directly 2015-05-19 20:55:31 +02:00
Ondrej Kozina
e5e0e22022 polldaemon: move dev_close_all out of poll_get_copy_vg
let's call dev_close_all() only before we're about to 'sleep'
for at least one second during the polling.

(it's questionable whether to call dev_close_all() at all in
polldaemon code. Natural extension would be to drop it completely)
2015-05-19 20:55:22 +02:00
David Teigland
e27182249a tests: add test for duplicate pvs 2015-05-19 11:02:53 -05:00
Zdenek Kabelac
dc49e1cde0 configure: update localedir
Previous patch incorrectly skipped replace of @LOCALEDIR@.

The standard option is --localedir  so use --with-localedir
as backward compatible option and set localedir if it's not
yet been set (if the could ever happen).

Use double-eval to translate $datarootdir to $prefix to real dir.
2015-05-18 18:48:18 +02:00
Zdenek Kabelac
aa2d39c2ca configure: LOCALEDIR needs evaluated value
Also fix typo.
2015-05-18 13:06:34 +02:00
Zdenek Kabelac
0cb9df3cec tests: fix calcucaltion
Code works properly.
2015-05-18 12:45:43 +02:00
Zdenek Kabelac
caaca15854 tests: thin_restore not needed
Few more test which could live without thin_restore.
2015-05-18 12:45:42 +02:00
Zdenek Kabelac
62ac80c8fa makefiles: drop LVM_SHARED_PATH
We already have LVM_PATH define used everywhere else
to access LVM binary so stay with one name.
2015-05-18 12:45:42 +02:00
Zdenek Kabelac
30c3bbcd9e makefiles: better clean
More exact clean of library exported symbols files.

Also use $(firstword) test to check for empty string
so 'make clean' has now cleaner condensed look.

Clean also created include links.
2015-05-18 12:45:42 +02:00
Zdenek Kabelac
1bed578535 makefiles: use := for shell calls 2015-05-18 12:45:42 +02:00
Zdenek Kabelac
bf2b1986c2 makefiles: use single target
Possibly  easier to follow - to have just a single dependency line
and use  if() within rule.

Also replace $(words) with $(firstword) which is more commonly used.
2015-05-18 12:45:42 +02:00
Zdenek Kabelac
fe00b163d6 configure: move DEFS to configure.h 2015-05-18 12:43:25 +02:00
Zdenek Kabelac
76cc477fba tests: no warn if test does not need thin_repair
Set LVM_TEST_THIN_REPAIR_CMD to /bin/false for test which
doesn't need it.

This way - even if on the system there is no such tool present,
test will not result with warning about missing tool.

Also remove from Makefile settings of TEST vars which are set in
through /lib/paths  - this also allows to override them in test.
2015-05-17 20:24:36 +02:00
Alasdair G Kergon
2fca6cdeb3 post-release 2015-05-15 23:28:47 +01:00
Alasdair G Kergon
0300730cc9 pre-release 2015-05-15 23:19:29 +01:00
Zdenek Kabelac
9e102ecbd9 mirror: use proper 64bit constants
ed2a08bf25 missed to use 64bit
constants.
2015-05-15 22:53:12 +02:00
Zdenek Kabelac
190e91231c spec: new man page 2015-05-15 21:31:28 +02:00
David Teigland
463c86008b config: remove UNDEFINED from cache_pool_cachemode
Replace UNDEFINED with COMMENTED because the code
requires a value to be returned from the config.
2015-05-15 14:24:23 -05:00