master - libdm: Raid status region units are sectors
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a5d53aec839e7f...
Commit: a5d53aec839e7fbe558b26e3195a8a18d3451ab5
Parent: d243db5466591412a3c99bb5be84e338da9ba4c9
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Thu Mar 24 17:42:36 2016 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Thu Mar 24 17:42:36 2016 +0000
libdm: Raid status region units are sectors
---
libdm/libdevmapper.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index ac79a57..a90013f 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -321,8 +321,8 @@ int dm_get_status_mirror(struct dm_pool *mem, const char *params,
/* Parse params from STATUS call for raid target */
struct dm_status_raid {
uint64_t reserved;
- uint64_t total_regions;
- uint64_t insync_regions;
+ uint64_t total_regions; /* sectors */
+ uint64_t insync_regions; /* sectors */
uint64_t mismatch_count;
uint32_t dev_count;
char *raid_type;
8 years, 1 month
master - lvmdbusd: Add '-' to allowable PV device path chars
by tasleson
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d243db54665914...
Commit: d243db5466591412a3c99bb5be84e338da9ba4c9
Parent: 109b7e2095a7bc5603bf79db0224b8399463af7c
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Thu Mar 24 12:26:28 2016 -0500
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Thu Mar 24 12:27:02 2016 -0500
lvmdbusd: Add '-' to allowable PV device path chars
---
daemons/lvmdbusd/utils.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/daemons/lvmdbusd/utils.py b/daemons/lvmdbusd/utils.py
index dacd0ef..3dcb373 100644
--- a/daemons/lvmdbusd/utils.py
+++ b/daemons/lvmdbusd/utils.py
@@ -389,7 +389,7 @@ def round_size(size_bytes):
return size_bytes + bs - remainder
-_ALLOWABLE_CH = string.ascii_letters + string.digits + '#+.:=@_\/%'
+_ALLOWABLE_CH = string.ascii_letters + string.digits + '#+-.:=@_\/%'
_ALLOWABLE_CH_SET = set(_ALLOWABLE_CH)
_ALLOWABLE_VG_LV_CH = string.ascii_letters + string.digits + '.-_+'
8 years, 1 month
master - revert: 6129d2e64d14047169048775dc7081135c0fcc50
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=109b7e2095a7bc...
Commit: 109b7e2095a7bc5603bf79db0224b8399463af7c
Parent: 37b548c6b5106315943454df8c5392c9bd604368
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Mar 24 14:04:43 2016 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Mar 24 14:06:12 2016 +0100
revert: 6129d2e64d14047169048775dc7081135c0fcc50
Unfortunately, commit 6129d2e64d14047169048775dc7081135c0fcc50 may
cause performance issue. There's going to be a better fix...
---
WHATS_NEW | 1 -
lib/activate/activate.c | 6 ------
2 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 652b24f..32528a2 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,6 +1,5 @@
Version 2.02.148 -
==================================
- Fix missing /dev sync in lvm2 command before dmeventd monitor/unmonitor.
Replace hard-coded module and target names with macros.
Add pv_major and pv_minor report fields.
Detect and warn about mismatch between devices used and assumed for an LV.
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index 7dce0da..2eb24d4 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -1746,12 +1746,6 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume
if (test_mode())
continue;
- /*
- * Sync all queued device names/symlinks so dmeventd
- * has consistent view during possible device scan.
- */
- fs_unlock();
-
/* FIXME specify events */
if (!monitor_fn(seg, 0)) {
log_error("%s: %s segment monitoring function failed.",
8 years, 1 month
master - WHATS_NEW: commit 6129d2e64d14047169048775dc7081135c0fcc50
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=37b548c6b51063...
Commit: 37b548c6b5106315943454df8c5392c9bd604368
Parent: 6129d2e64d14047169048775dc7081135c0fcc50
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Mar 24 12:47:35 2016 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Mar 24 12:47:35 2016 +0100
WHATS_NEW: commit 6129d2e64d14047169048775dc7081135c0fcc50
---
WHATS_NEW | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 32528a2..652b24f 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.148 -
==================================
+ Fix missing /dev sync in lvm2 command before dmeventd monitor/unmonitor.
Replace hard-coded module and target names with macros.
Add pv_major and pv_minor report fields.
Detect and warn about mismatch between devices used and assumed for an LV.
8 years, 1 month
master - monitoring: sync /dev content before contacting dmeventd for monitor/unmonitor
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6129d2e64d1404...
Commit: 6129d2e64d14047169048775dc7081135c0fcc50
Parent: 82d92009ae37bea3cd6a3f754c25d56b12959676
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Mar 24 11:13:21 2016 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Mar 24 12:40:19 2016 +0100
monitoring: sync /dev content before contacting dmeventd for monitor/unmonitor
dmeventd daemon may call further code itself that looks at /dev, e.g.
via dmeventd_lvm2_command call. We need to have a consistent view of
the /dev content at that time. Therefore, sync /dev content before
calling monitoring hook which contacts dmeventd.
This problem was quite hidden before, but now it has manifested itself
because of recent additions to dev-cache code where we started looking
at device holders as seen in sysfs. What happened here was that the
device was already in sysfs, but not yet under /dev and this triggered
the new error message sometimes:
log_error("%s: failed to find associated device structure for holder %s.", devname, devpath);
This problem has manifested recently in our api/pytest.sh test from
testsuite where we create thin pool LVs and thin LVs and hence it also
causes dmeventd to be used as well and these error messages were
visible there.
---
lib/activate/activate.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index 2eb24d4..7dce0da 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -1746,6 +1746,12 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume
if (test_mode())
continue;
+ /*
+ * Sync all queued device names/symlinks so dmeventd
+ * has consistent view during possible device scan.
+ */
+ fs_unlock();
+
/* FIXME specify events */
if (!monitor_fn(seg, 0)) {
log_error("%s: %s segment monitoring function failed.",
8 years, 1 month
master - test: Move bus configuration to prepare function
by Marian Csontos
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=82d92009ae37be...
Commit: 82d92009ae37bea3cd6a3f754c25d56b12959676
Parent: 1b0775916b78e1270872d3649a2c9abf0a1bb790
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Mar 22 09:15:40 2016 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed Mar 23 12:27:34 2016 +0100
test: Move bus configuration to prepare function
---
test/api/dbustest.sh | 9 ---------
test/lib/aux.sh | 8 ++++++++
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/test/api/dbustest.sh b/test/api/dbustest.sh
index 79e3224..8741eb9 100644
--- a/test/api/dbustest.sh
+++ b/test/api/dbustest.sh
@@ -16,16 +16,7 @@ SKIP_WITH_CLVMD=1
. lib/inittest
-# Will default to skip until we can get this reviewed
-#skip
-
aux prepare_pvs 6
-# Copy the needed file to run on the system bus if it doesn't
-# already exist
-if [ ! -f /etc/dbus-1/system.d/com.redhat.lvmdbus1.conf ]; then
- install -m 644 $abs_top_builddir/scripts/com.redhat.lvmdbus1.conf /etc/dbus-1/system.d/.
-fi
-
aux prepare_lvmdbusd
$test_data_dir/dbus/lvmdbustest.py -v
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 2767880..9fd1922 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -306,6 +306,7 @@ prepare_lvmdbusd() {
kill_sleep_kill_ LOCAL_LVMDBUSD 0
+ # FIXME: This is not correct! Daemon is auto started.
echo "checking lvmdbusd is NOT running..."
if ps -elf | grep lvmdbusd | grep python3; then
echo "Cannot run while existing lvmdbusd process exists"
@@ -327,6 +328,13 @@ prepare_lvmdbusd() {
which python3 >/dev/null || skip "Missing python3"
python3 -c "import pyudev, dbus, gi.repository" || skip "Missing python modules"
+ # TODO: Tests should use session bus instead of system bus
+ # Copy the needed file to run on the system bus if it doesn't
+ # already exist
+ if [ ! -f /etc/dbus-1/system.d/com.redhat.lvmdbus1.conf ]; then
+ install -m 644 $abs_top_builddir/scripts/com.redhat.lvmdbus1.conf /etc/dbus-1/system.d/
+ fi
+
echo "preparing lvmdbusd..."
"$daemon" --debug --udev > debug.log_LVMDBUSD_out 2>&1 &
local pid=$!
8 years, 1 month
master - test: Remove pidfile after killing the process
by Marian Csontos
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1b0775916b78e1...
Commit: 1b0775916b78e1270872d3649a2c9abf0a1bb790
Parent: bb93a28bc1d8b284c13ca5e5c925ce5b67d12204
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed Mar 23 12:18:08 2016 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed Mar 23 12:25:18 2016 +0100
test: Remove pidfile after killing the process
Though unlikely keeping files in place may result in random process
killed.
---
test/lib/aux.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 4f5daaf..2767880 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -435,6 +435,7 @@ kill_sleep_kill_() {
slow=$2
if test -s $pidfile ; then
pid=$(< $pidfile)
+ rm -f $pidfile
kill -TERM $pid 2>/dev/null || return 0
if test $slow -eq 0 ; then sleep .1 ; else sleep 1 ; fi
kill -KILL $pid 2>/dev/null || true
8 years, 1 month
master - test: Fix lvmdbusd tests to work with installed testsuite
by Marian Csontos
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=bb93a28bc1d8b2...
Commit: bb93a28bc1d8b284c13ca5e5c925ce5b67d12204
Parent: c1d376b1abdb6b6a2410a5372a3a76748c1daa98
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed Mar 23 11:56:25 2016 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed Mar 23 11:59:04 2016 +0100
test: Fix lvmdbusd tests to work with installed testsuite
---
test/Makefile.in | 3 +++
test/api/dbustest.sh | 5 +----
test/lib/aux.sh | 18 +++++++++++++-----
3 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/test/Makefile.in b/test/Makefile.in
index 43e321d..ded155d 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -205,6 +205,7 @@ install: .tests-stamp lib/paths-installed
$(INSTALL_DATA) shell/*.sh $(DATADIR)/shell
$(INSTALL_DATA) api/*.sh $(DATADIR)/api
$(INSTALL_PROGRAM) api/*.{t,py} $(DATADIR)/api
+ $(INSTALL_PROGRAM) dbus/*.py $(DATADIR)/dbus/
$(INSTALL_DATA) lib/paths-installed $(DATADIR)/lib/paths
cd lib && $(INSTALL_DATA) \
$(LIB_FLAVOURS) \
@@ -274,12 +275,14 @@ lib/paths-installed: lib/paths-common
$(RM) $@-t
cat lib/paths-common > $@-t
echo 'installed_testsuite=1' >> $@-t
+ echo 'test_data_dir="@datadir@/lvm2-testsuite"' >> $@-t
echo 'export PATH=@libexecdir@/lvm2-testsuite:@datadir@/lvm2-testsuite/lib:@datadir@/lvm2-testsuite/api:$$PATH' >> $@-t
mv $@-t $@
lib/paths: lib/paths-common
$(RM) $@-t
cat lib/paths-common > $@-t
+ echo 'test_data_dir="$(abs_top_builddir)/test"' >> $@-t
echo 'top_srcdir="$(top_srcdir)"' >> $@-t
echo 'abs_top_builddir="$(abs_top_builddir)"' >> $@-t
echo 'abs_top_srcdir="$(abs_top_srcdir)"' >> $@-t
diff --git a/test/api/dbustest.sh b/test/api/dbustest.sh
index dd9b23d..79e3224 100644
--- a/test/api/dbustest.sh
+++ b/test/api/dbustest.sh
@@ -27,8 +27,5 @@ if [ ! -f /etc/dbus-1/system.d/com.redhat.lvmdbus1.conf ]; then
install -m 644 $abs_top_builddir/scripts/com.redhat.lvmdbus1.conf /etc/dbus-1/system.d/.
fi
-# Setup the python path so we can run
-export PYTHONPATH=$abs_top_builddir/daemons
-
aux prepare_lvmdbusd
-$abs_top_builddir/test/dbus/lvmdbustest.py -v
+$test_data_dir/dbus/lvmdbustest.py -v
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index ed1e3d8..4f5daaf 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -301,8 +301,11 @@ lvmpolld_dump() {
}
prepare_lvmdbusd() {
+ local daemon=
rm -f debug.log_LVMDBUSD_out
+ kill_sleep_kill_ LOCAL_LVMDBUSD 0
+
echo "checking lvmdbusd is NOT running..."
if ps -elf | grep lvmdbusd | grep python3; then
echo "Cannot run while existing lvmdbusd process exists"
@@ -311,16 +314,21 @@ prepare_lvmdbusd() {
echo ok
# skip if we don't have our own lvmdbusd...
- # NOTE: this is always present - additional checks are needed:
- [[ -x $abs_top_builddir/daemons/lvmdbusd/lvmdbusd ]] || skip
+ if test -z "${installed_testsuite+varset}"; then
+ # NOTE: this is always present - additional checks are needed:
+ daemon="$abs_top_builddir/daemons/lvmdbusd/lvmdbusd"
+ # Setup the python path so we can run
+ export PYTHONPATH=$abs_top_builddir/daemons
+ else
+ daemon="$(which lvmdbusd)"
+ fi
+ [[ -n $daemon && -x $daemon ]] || skip "The daemon is missing"
which python3 >/dev/null || skip "Missing python3"
python3 -c "import pyudev, dbus, gi.repository" || skip "Missing python modules"
- kill_sleep_kill_ LOCAL_LVMDBUSD 0
-
echo "preparing lvmdbusd..."
- $abs_top_builddir/daemons/lvmdbusd/lvmdbusd --debug --udev > debug.log_LVMDBUSD_out 2>&1 &
+ "$daemon" --debug --udev > debug.log_LVMDBUSD_out 2>&1 &
local pid=$!
sleep 1
8 years, 1 month
master - test: Fix checks to skip lvmdbusd tests
by Marian Csontos
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c1d376b1abdb6b...
Commit: c1d376b1abdb6b6a2410a5372a3a76748c1daa98
Parent: c6d383a6da5cd7f5acddb314e1419243447e7be8
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed Mar 23 11:45:21 2016 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed Mar 23 11:58:48 2016 +0100
test: Fix checks to skip lvmdbusd tests
The executable is always present in the tree, need to check the
runtime dependencies.
---
test/lib/aux.sh | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index af6b25a..ed1e3d8 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -311,10 +311,12 @@ prepare_lvmdbusd() {
echo ok
# skip if we don't have our own lvmdbusd...
- # TODO: lvmdbusd is not in PATH
- #(which lvmdbusd 2>/dev/null | grep "$abs_builddir") || skip
+ # NOTE: this is always present - additional checks are needed:
[[ -x $abs_top_builddir/daemons/lvmdbusd/lvmdbusd ]] || skip
+ which python3 >/dev/null || skip "Missing python3"
+ python3 -c "import pyudev, dbus, gi.repository" || skip "Missing python modules"
+
kill_sleep_kill_ LOCAL_LVMDBUSD 0
echo "preparing lvmdbusd..."
8 years, 1 month
master - properties: use proper 'get' variant for unimplemented _pv_major_get and _pv_minor_get fns
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c6d383a6da5cd7...
Commit: c6d383a6da5cd7f5acddb314e1419243447e7be8
Parent: 1056894f1f1d48eb295d283859473cd9bc6b9df5
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Mar 23 10:52:46 2016 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Mar 23 10:52:46 2016 +0100
properties: use proper 'get' variant for unimplemented _pv_major_get and _pv_minor_get fns
---
lib/report/properties.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/report/properties.c b/lib/report/properties.c
index 7c9bb0c..234712c 100644
--- a/lib/report/properties.c
+++ b/lib/report/properties.c
@@ -194,9 +194,9 @@ GET_PV_NUM_PROPERTY_FN(pv_ba_size, SECTOR_SIZE * pv->ba_size)
#define _pv_ext_vsn_set prop_not_implemented_set
#define _pv_in_use_get prop_not_implemented_get
#define _pv_in_use_set prop_not_implemented_set
-#define _pv_major_get prop_not_implemented_set
+#define _pv_major_get prop_not_implemented_get
#define _pv_major_set prop_not_implemented_set
-#define _pv_minor_get prop_not_implemented_set
+#define _pv_minor_get prop_not_implemented_get
#define _pv_minor_set prop_not_implemented_set
#define _vg_permissions_set prop_not_implemented_set
8 years, 1 month