stable-2.02 - test: Fix handling leftovers from previous tests
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=61c321d110630d4fc2e...
Commit: 61c321d110630d4fc2ed8f75cb3a9ba78e29599b
Parent: 26f94d91195531730c22eac26c741f1b4d2e0f1e
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed Nov 20 15:23:48 2019 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed Nov 20 15:31:21 2019 +0100
test: Fix handling leftovers from previous tests
teardown fails current PREFIX is prefix of previously failed test with
leftovers in dmtable.
(cherry picked from commit 1e669ab315c32aba3f47c37771f26ab7c8e151dd)
---
test/lib/aux.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 2241062..ec0699f 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -568,7 +568,7 @@ teardown() {
if test ! -f SKIP_THIS_TEST ; then
# Evaluate left devices only for non-skipped tests
- TEST_LEAKED_DEVICES=$(dmsetup table | grep "$PREFIX" | grep -v "${PREFIX}pv") || true
+ TEST_LEAKED_DEVICES=$(dmsetup table | grep "$PREFIX" | grep -Ev "${PREFIX}(pv|[0-9])") || true
fi
kill_tagged_processes
4 years, 5 months
stable-2.02 - WHATS_NEW: update
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=26f94d91195531730c2...
Commit: 26f94d91195531730c22eac26c741f1b4d2e0f1e
Parent: 9e45ad04b035468bc4ed7a68e654bfa5641f6b2c
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed Oct 23 09:32:36 2019 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed Nov 20 15:30:34 2019 +0100
WHATS_NEW: update
---
WHATS_NEW | 2 ++
WHATS_NEW_DM | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 49c31a4..50fd519 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -3,6 +3,7 @@ Version 2.02.187 -
Fix resize of thin-pool with data and metadata of different segtype.
Fix splitting mirror leg in cluster.
Fix activation order when removing merged snapshot.
+ Add support for DM_DEVICE_GET_TARGET_VERSION into device_mapper.
Add lvextend-raid.sh to check on RaidLV extensions synchronization.
Fix lvmetad shutdown and avoid lenghty timeouts when rebooting system.
Prevent creating VGs with PVs with different logical block sizes.
@@ -10,6 +11,7 @@ Version 2.02.187 -
Activate thin-pool layered volume as 'read-only' device.
Ignore crypto devices with UUID signature CRYPT-SUBDEV.
Enhance validation for thin and cache pool conversion and swapping.
+ Fixed activation on boot - lvm2 no longer activates incomplete VGs.
Version 2.02.186 - 27th August 2019
===================================
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 576ad38..6a909c0 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.166 -
===================================
+ Add support for DM_DEVICE_GET_TARGET_VERSION.
Version 1.02.164 - 27th August 2019
===================================
4 years, 5 months
stable-2.02 - build: autoconf
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9e45ad04b035468bc4e...
Commit: 9e45ad04b035468bc4ed7a68e654bfa5641f6b2c
Parent: 245d7fcd590583166f6cdd78a81bac903fea92eb
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed Oct 23 09:22:42 2019 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed Nov 20 15:27:42 2019 +0100
build: autoconf
---
configure | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 4d2fb2f..fe0e8e2 100755
--- a/configure
+++ b/configure
@@ -12688,7 +12688,7 @@ if ${am_cv_pathless_PYTHON+:} false; then :
$as_echo_n "(cached) " >&6
else
- for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
+ for am_cv_pathless_PYTHON in python python2 python3 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
test "$am_cv_pathless_PYTHON" = none && break
prog="import sys
# split strings by '.' and convert to numeric. Append some zeros
@@ -13256,7 +13256,7 @@ if ${am_cv_pathless_PYTHON+:} false; then :
$as_echo_n "(cached) " >&6
else
- for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
+ for am_cv_pathless_PYTHON in python python2 python3 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
test "$am_cv_pathless_PYTHON" = none && break
prog="import sys
# split strings by '.' and convert to numeric. Append some zeros
4 years, 5 months
master - test: Fix handling leftovers from previous tests
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1e669ab315c32aba3f4...
Commit: 1e669ab315c32aba3f47c37771f26ab7c8e151dd
Parent: 7474440d3b540d20eb4f997efeb31b881cc6ac8e
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed Nov 20 15:23:48 2019 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed Nov 20 15:27:03 2019 +0100
test: Fix handling leftovers from previous tests
teardown fails current PREFIX is prefix of previously failed test with
leftovers in dmtable.
---
test/lib/aux.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 6822d7e..566e9b5 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -520,7 +520,7 @@ teardown() {
if test ! -f SKIP_THIS_TEST ; then
# Evaluate left devices only for non-skipped tests
- TEST_LEAKED_DEVICES=$(dmsetup table | grep "$PREFIX" | grep -v "${PREFIX}pv") || true
+ TEST_LEAKED_DEVICES=$(dmsetup table | grep "$PREFIX" | grep -Ev "${PREFIX}(pv|[0-9])") || true
fi
kill_tagged_processes
4 years, 5 months
master - lvs: disable scanning optimization
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7474440d3b540d20eb4...
Commit: 7474440d3b540d20eb4f997efeb31b881cc6ac8e
Parent: f88f7c0fdcdfbefa37df6adb36a637526bd7e93b
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Nov 19 10:27:02 2019 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Nov 19 10:56:12 2019 -0600
lvs: disable scanning optimization
The scanning optimization can produce warnings from
'lvs' when run concurrently with commands modifying LVs,
so disable the optimization until it can be improved.
Without the scanning optimization, lvs will always
read all PVs twice:
1. read metadata from all PVs, saving it in memory
2. for each VG
3. lock VG
4. reread metadata from all PVs in VG, replacing metadata
saved from step 1
5. run command on VG
6. unlock VG
The optimization would usually cause step 4 to be skipped,
and PVs would be read only once.
Running the command in step 5 using metadata that was not
read under the VG lock is usually fine, except for the
fact that lvs attempts to validate the metadata by comparing
it to current dm state. If other commands are modifying dm
state while lvs is running, lvs may see differences between
metadata from step 1 and dm state checked during step 5,
and print warnings.
(A better fix may be to detect the concurrent change and
fall back to rereading metadata in step 4 only when needed.)
---
tools/commands.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/commands.h b/tools/commands.h
index c1670ae..77cf1fa 100644
--- a/tools/commands.h
+++ b/tools/commands.h
@@ -99,7 +99,7 @@ xx(lvresize,
xx(lvs,
"Display information about logical volumes",
- PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH | CAN_USE_ONE_SCAN | ALLOW_HINTS)
+ PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH | ALLOW_HINTS)
xx(lvscan,
"List all logical volumes in all volume groups",
4 years, 5 months
master - tests: add more tracing info
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f88f7c0fdcdfbefa37d...
Commit: f88f7c0fdcdfbefa37df6adb36a637526bd7e93b
Parent: 496c368528c20b02d12be19b8fe359b9f0c2cea6
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Nov 15 12:37:13 2019 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 15 12:37:44 2019 +0100
tests: add more tracing info
---
test/shell/nomda-missing.sh | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/test/shell/nomda-missing.sh b/test/shell/nomda-missing.sh
index dd57867..1899f03 100644
--- a/test/shell/nomda-missing.sh
+++ b/test/shell/nomda-missing.sh
@@ -74,6 +74,8 @@ check active $vg mirror12
vgchange -a n $vg
aux enable_dev "$dev3"
aux disable_dev "$dev4"
+dmsetup table
+dmsetup info -c
vgchange -aey $vg
not vgck $vg
4 years, 5 months
master - tests: reduce amount of written date
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=496c368528c20b02d12...
Commit: 496c368528c20b02d12be19b8fe359b9f0c2cea6
Parent: dccc50f6f60390b18e5387cd38647209f36fa998
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Nov 15 12:36:39 2019 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 15 12:37:44 2019 +0100
tests: reduce amount of written date
Since we reduced created LV to 4M - dd also just 4M.
---
.../lvconvert-raid-reshape-stripes-load-reload.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/lvconvert-raid-reshape-stripes-load-reload.sh b/test/shell/lvconvert-raid-reshape-stripes-load-reload.sh
index 185bb57..a38d928 100644
--- a/test/shell/lvconvert-raid-reshape-stripes-load-reload.sh
+++ b/test/shell/lvconvert-raid-reshape-stripes-load-reload.sh
@@ -56,7 +56,7 @@ mount "$DM_DEV_DIR/$vg/$lv1" "$mount_dir"
echo 3 >/proc/sys/vm/drop_caches
# FIXME: This is filling up ram disk. Use sane amount of data please! Rate limit the data written!
-dd if=/dev/urandom of="$mount_dir/random" bs=1M count=50 conv=fdatasync
+dd if=/dev/urandom of="$mount_dir/random" bs=1M count=4 conv=fdatasync
checksum_ "$mount_dir/random" >MD5
# FIXME: wait_for_sync - is this really testing anything under load?
4 years, 5 months
master - revert "dmeventd: vdo plugin link lvm library"
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=dccc50f6f60390b18e5...
Commit: dccc50f6f60390b18e5387cd38647209f36fa998
Parent: 7ea71a9eb94a703975d8f59f941d02039def3be4
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Nov 15 12:20:28 2019 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 15 12:37:41 2019 +0100
revert "dmeventd: vdo plugin link lvm library"
This reverts commit cbabdf2fca6131660cfb5525ed9edb3f7a41525a.
and add extra comment why this code may look unused, but
in runtime is necessary.
---
daemons/dmeventd/plugins/vdo/dmeventd_vdo.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c b/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c
index 7c4ec47..399b737 100644
--- a/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c
+++ b/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c
@@ -16,6 +16,14 @@
#include "daemons/dmeventd/plugins/lvm2/dmeventd_lvm.h"
#include "daemons/dmeventd/libdevmapper-event.h"
+/*
+ * Use parser from new device_mapper library.
+ * Although during compilation we can see dm_vdo_status_parse()
+ * in runtime we are linked agains systems libdm 'older' library
+ * which does not provide this symbol and plugin fails to load
+ */
+#include "device_mapper/vdo/status.c"
+
#include <sys/wait.h>
#include <stdarg.h>
4 years, 5 months
master - Revert "hints: rewrite function"
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7ea71a9eb94a703975d...
Commit: 7ea71a9eb94a703975d8f59f941d02039def3be4
Parent: 31a862a6be181764c3f505580916e11882b195a7
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Nov 14 12:15:05 2019 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Nov 14 12:15:05 2019 -0600
Revert "hints: rewrite function"
This reverts commit 70fb31b5d6863248b5adfb2581b706cbb158b30e.
---
lib/label/hints.c | 39 ++++++++++++++++++++++++++-------------
1 files changed, 26 insertions(+), 13 deletions(-)
diff --git a/lib/label/hints.c b/lib/label/hints.c
index 45ab2ff..f8e8f45 100644
--- a/lib/label/hints.c
+++ b/lib/label/hints.c
@@ -586,29 +586,42 @@ static void _filter_to_str(struct cmd_context *cmd, int filter_cfg, char **strp)
char *str;
int pos = 0;
int len = 0;
+ int ret;
*strp = NULL;
- if (!(cn = find_config_tree_array(cmd, filter_cfg, NULL)))
+ if (!(cn = find_config_tree_array(cmd, filter_cfg, NULL))) {
/* shouldn't happen because default is a|*| */
return;
+ }
+
+ for (cv = cn->v; cv; cv = cv->next) {
+ if (cv->type != DM_CFG_STRING)
+ continue;
- for (cv = cn->v; cv; cv = cv->next)
- if (cv->type == DM_CFG_STRING)
- len += strlen(cv->v.str) + 1;
+ len += (strlen(cv->v.str) + 1);
+ }
+ len++;
+
+ if (len == 1) {
+ /* shouldn't happen because default is a|*| */
+ return;
+ }
- if (!len++ || !(str = malloc(len)))
+ if (!(str = malloc(len)))
return;
+ memset(str, 0, len);
- for (cv = cn->v; cv; cv = cv->next)
- if (cv->type == DM_CFG_STRING) {
- len = strlen(cv->v.str);
- memcpy(str + pos, cv->v.str, len);
- pos += len;
- str[pos++] = 0;
- }
+ for (cv = cn->v; cv; cv = cv->next) {
+ if (cv->type != DM_CFG_STRING)
+ continue;
- str[pos] = 0;
+ ret = snprintf(str + pos, len - pos, "%s", cv->v.str);
+
+ if (ret >= len - pos)
+ break;
+ pos += ret;
+ }
*strp = str;
}
4 years, 5 months
master - Revert "debug: enhance debug messages"
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=31a862a6be181764c3f...
Commit: 31a862a6be181764c3f505580916e11882b195a7
Parent: 91df257b53849ca4206f4c3d45c71bff83c4a5ee
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Nov 14 12:11:53 2019 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Nov 14 12:11:53 2019 -0600
Revert "debug: enhance debug messages"
This reverts commit e92d3bd1f75d335fba5303c433516ea4ebe5cab1.
---
lib/label/hints.c | 42 ++++++++++++++++++++----------------------
1 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/lib/label/hints.c b/lib/label/hints.c
index d913b68..45ab2ff 100644
--- a/lib/label/hints.c
+++ b/lib/label/hints.c
@@ -192,7 +192,7 @@ static int _hints_exists(void)
if (!stat(_hints_file, &buf))
return 1;
if (errno != ENOENT)
- log_sys_debug("stat", _hints_file);
+ log_debug("hints_exist errno %d", errno);
return 0;
}
@@ -203,7 +203,7 @@ static int _nohints_exists(void)
if (!stat(_nohints_file, &buf))
return 1;
if (errno != ENOENT)
- log_sys_debug("stat", _nohints_file);
+ log_debug("nohints_exist errno %d", errno);
return 0;
}
@@ -214,7 +214,7 @@ static int _newhints_exists(void)
if (!stat(_newhints_file, &buf))
return 1;
if (errno != ENOENT)
- log_sys_debug("stat", _newhints_file);
+ log_debug("newhints_exist errno %d", errno);
return 0;
}
@@ -225,7 +225,7 @@ static int _touch_newhints(void)
if (!(fp = fopen(_newhints_file, "w")))
return_0;
if (fclose(fp))
- log_sys_debug("fclose", _newhints_file);
+ stack;
return 1;
}
@@ -236,7 +236,7 @@ static int _touch_nohints(void)
if (!(fp = fopen(_nohints_file, "w")))
return_0;
if (fclose(fp))
- log_sys_debug("fclose", _nohints_file);
+ stack;
return 1;
}
@@ -247,26 +247,26 @@ static int _touch_hints(void)
if (!(fp = fopen(_hints_file, "w")))
return_0;
if (fclose(fp))
- log_sys_debug("fclose", _hints_file);
+ stack;
return 1;
}
static void _unlink_nohints(void)
{
- if (unlink(_nohints_file) && errno != ENOENT)
- log_sys_debug("unlink", _nohints_file);
+ if (unlink(_nohints_file))
+ log_debug("unlink_nohints errno %d", errno);
}
static void _unlink_hints(void)
{
- if (unlink(_hints_file) && errno != ENOENT)
- log_sys_debug("unlink", _hints_file);
+ if (unlink(_hints_file))
+ log_debug("unlink_hints errno %d", errno);
}
static void _unlink_newhints(void)
{
- if (unlink(_newhints_file) && errno != ENOENT)
- log_sys_debug("unlink", _newhints_file);
+ if (unlink(_newhints_file))
+ log_debug("unlink_newhints errno %d", errno);
}
static int _clear_hints(struct cmd_context *cmd)
@@ -275,7 +275,7 @@ static int _clear_hints(struct cmd_context *cmd)
time_t t;
if (!(fp = fopen(_hints_file, "w"))) {
- log_warn("WARNING: Failed to clear hint file.");
+ log_warn("Failed to clear hint file.");
/* shouldn't happen, but try to unlink in case */
_unlink_hints();
return 0;
@@ -286,10 +286,10 @@ static int _clear_hints(struct cmd_context *cmd)
fprintf(fp, "# Created empty by %s pid %d %s", cmd->name, getpid(), ctime(&t));
if (fflush(fp))
- log_sys_debug("fflush", _hints_file);
+ log_debug("clear_hints flush errno %d", errno);
if (fclose(fp))
- log_sys_debug("fclose", _hints_file);
+ log_debug("clear_hints close errno %d", errno);
return 1;
}
@@ -313,7 +313,7 @@ static int _lock_hints(struct cmd_context *cmd, int mode, int nonblock)
fd = open(_hints_file, O_RDWR);
if (fd < 0) {
- log_sys_debug("open", _hints_file);
+ log_debug("lock_hints open errno %d", errno);
return 0;
}
@@ -641,13 +641,10 @@ static int _read_hint_file(struct cmd_context *cmd, struct dm_list *hints, int *
int ret = 1;
int i;
- if (!(fp = fopen(_hints_file, "r"))) {
- if (errno != ENOENT)
- log_sys_debug("fopen", _hints_file);
+ if (!(fp = fopen(_hints_file, "r")))
return 0;
- }
- log_debug("Reading hint file %s.", _hints_file);
+ log_debug("Reading hint file");
for (i = 0; i < HINT_LINE_WORDS; i++)
split[i] = NULL;
@@ -776,7 +773,7 @@ static int _read_hint_file(struct cmd_context *cmd, struct dm_list *hints, int *
}
if (fclose(fp))
- log_sys_debug("fclose", _hints_file);
+ stack;
if (!ret)
return 0;
@@ -1357,3 +1354,4 @@ int get_hints(struct cmd_context *cmd, struct dm_list *hints_out, int *newhints,
return 1;
}
+
4 years, 5 months