master - test: add make check_lvmlockd_test
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=161ae36363f5fa...
Commit: 161ae36363f5fa1b1469fd3a42c096c878002b31
Parent: ed5e5c38b5ac4b7c8cb7e809d9d35c72f087e29e
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Jan 14 16:12:46 2016 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Feb 22 09:36:35 2016 -0600
test: add make check_lvmlockd_test
Which runs lvmlockd in --test mode, without
any lock manager.
Also make some adjustments to the check_lvmlockd
variations using the lock managds.
---
daemons/lvmlockd/lvmlockd-core.c | 5 ++
test/Makefile.in | 21 +++----
test/lib/flavour-udev-lvmlockd-test.sh | 6 ++
test/lib/test-sanlock-conf | 2 +-
test/shell/aa-lvmlockd-dlm-prepare.sh | 90 +++++++++++++++++++++++++++++
test/shell/aa-lvmlockd-sanlock-prepare.sh | 85 +++++++++++++++++++++++++++
test/shell/aa-lvmlockd-test-prepare.sh | 44 ++++++++++++++
test/shell/dlm-prepare.sh | 90 -----------------------------
test/shell/dlm-remove.sh | 24 --------
test/shell/lvmlockd-lv-types.sh | 6 ++
test/shell/sanlock-prepare.sh | 87 ----------------------------
test/shell/sanlock-remove.sh | 39 ------------
test/shell/zz-lvmlockd-dlm-remove.sh | 24 ++++++++
test/shell/zz-lvmlockd-sanlock-remove.sh | 41 +++++++++++++
test/shell/zz-lvmlockd-test-remove.sh | 23 +++++++
15 files changed, 334 insertions(+), 253 deletions(-)
diff --git a/daemons/lvmlockd/lvmlockd-core.c b/daemons/lvmlockd/lvmlockd-core.c
index 292d19c..76a7650 100644
--- a/daemons/lvmlockd/lvmlockd-core.c
+++ b/daemons/lvmlockd/lvmlockd-core.c
@@ -3365,6 +3365,11 @@ static void *worker_thread_main(void *arg_in)
int run_sanlock = lm_is_running_sanlock();
int run_dlm = lm_is_running_dlm();
+ if (daemon_test) {
+ run_sanlock = gl_use_sanlock;
+ run_dlm = gl_use_dlm;
+ }
+
if (run_sanlock && run_dlm)
act->result = -EXFULL;
else if (!run_sanlock && !run_dlm)
diff --git a/test/Makefile.in b/test/Makefile.in
index 742399b..19a0214 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -74,6 +74,7 @@ help:
@echo " check_lvmpolld Run tests with lvmpolld daemon."
@echo " check_lvmlockd_sanlock Run tests with lvmlockd and sanlock."
@echo " check_lvmlockd_dlm Run tests with lvmlockd and dlm."
+ @echo " check_lvmlockd_test Run tests with lvmlockd --test."
@echo " clean Clean dir."
@echo " help Display callable targets."
@echo -e "\nSupported variables:"
@@ -146,26 +147,21 @@ ifeq ("@BUILD_LVMLOCKD@", "yes")
check_lvmlockd_sanlock: .tests-stamp
VERBOSE=$(VERBOSE) ./lib/runner \
--testdir . --outdir results \
- --flavours udev-lvmlockd-sanlock --only shell/sanlock-prepare.sh
- VERBOSE=$(VERBOSE) ./lib/runner \
- --testdir . --outdir results \
- --flavours udev-lvmlockd-sanlock --only $(T) --skip $(S)
- VERBOSE=$(VERBOSE) ./lib/runner \
- --testdir . --outdir results \
- --flavours udev-lvmlockd-sanlock --only shell/sanlock-remove.sh
+ --flavours udev-lvmlockd-sanlock --only shell/aa-lvmlockd-sanlock-prepare.sh,$(T),shell/zz-lvmlockd-sanlock-remove.sh --skip $(S)
endif
ifeq ("@BUILD_LVMLOCKD@", "yes")
check_lvmlockd_dlm: .tests-stamp
VERBOSE=$(VERBOSE) ./lib/runner \
--testdir . --outdir results \
- --flavours udev-lvmlockd-dlm --only shell/dlm-prepare.sh
- VERBOSE=$(VERBOSE) ./lib/runner \
- --testdir . --outdir results \
- --flavours udev-lvmlockd-dlm --only $(T) --skip $(S)
+ --flavours udev-lvmlockd-dlm --only shell/aa-lvmlockd-dlm-prepare.sh,$(T),shell/zz-lvmlockd-dlm-remove.sh --skip $(S)
+endif
+
+ifeq ("@BUILD_LVMLOCKD@", "yes")
+check_lvmlockd_test: .tests-stamp
VERBOSE=$(VERBOSE) ./lib/runner \
--testdir . --outdir results \
- --flavours udev-lvmlockd-dlm --only shell/dlm-remove.sh
+ --flavours udev-lvmlockd-test --only shell/aa-lvmlockd-test-prepare.sh,$(T),shell/zz-lvmlockd-test-remove.sh --skip $(S)
endif
DATADIR = $(datadir)/lvm2-testsuite
@@ -185,6 +181,7 @@ LIB_FLAVOURS = \
flavour-udev-lvmpolld\
flavour-udev-lvmlockd-sanlock\
flavour-udev-lvmlockd-dlm\
+ flavour-udev-lvmlockd-test\
flavour-udev-vanilla
LIB_LVMLOCKD_CONF = \
diff --git a/test/lib/flavour-udev-lvmlockd-test.sh b/test/lib/flavour-udev-lvmlockd-test.sh
new file mode 100644
index 0000000..60b67b1
--- /dev/null
+++ b/test/lib/flavour-udev-lvmlockd-test.sh
@@ -0,0 +1,6 @@
+export LVM_TEST_LOCKING=1
+export LVM_TEST_LVMETAD=1
+export LVM_TEST_LVMPOLLD=1
+export LVM_TEST_LVMLOCKD=1
+export LVM_TEST_LVMLOCKD_TEST=1
+export LVM_TEST_DEVDIR=/dev
diff --git a/test/lib/test-sanlock-conf b/test/lib/test-sanlock-conf
index d1df598..6285d63 100644
--- a/test/lib/test-sanlock-conf
+++ b/test/lib/test-sanlock-conf
@@ -1,2 +1,2 @@
# created by lvm test suite
-SANLOCKOPTS="-U sanlock -G sanlock -w 0"
+use_watchdog=0
diff --git a/test/shell/aa-lvmlockd-dlm-prepare.sh b/test/shell/aa-lvmlockd-dlm-prepare.sh
new file mode 100644
index 0000000..e1e1a73
--- /dev/null
+++ b/test/shell/aa-lvmlockd-dlm-prepare.sh
@@ -0,0 +1,90 @@
+#!/bin/sh
+# Copyright (C) 2008-2012 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+test_description='Set up things to run tests with dlm'
+
+. lib/utils
+. lib/inittest
+
+[ -z "$LVM_TEST_LOCK_TYPE_DLM" ] && skip;
+
+COROSYNC_CONF="/etc/corosync/corosync.conf"
+COROSYNC_NODE="$(hostname)"
+create_corosync_conf() {
+ if test -a $COROSYNC_CONF; then
+ if ! grep "created by lvm test suite" $COROSYNC_CONF; then
+ rm $COROSYNC_CONF
+ else
+ mv $COROSYNC_CONF $COROSYNC_CONF.prelvmtest
+ fi
+ fi
+
+ sed -e "s/@LOCAL_NODE@/$COROSYNC_NODE/" lib/test-corosync-conf > $COROSYNC_CONF
+ echo "created new $COROSYNC_CONF"
+}
+
+DLM_CONF="/etc/dlm/dlm.conf"
+create_dlm_conf() {
+ if test -a $DLM_CONF; then
+ if ! grep "created by lvm test suite" $DLM_CONF; then
+ rm $DLM_CONF
+ else
+ mv $DLM_CONF $DLM_CONF.prelvmtest
+ fi
+ fi
+
+ cp lib/test-dlm-conf $DLM_CONF
+ echo "created new $DLM_CONF"
+}
+
+prepare_lvmlockd_dlm() {
+ if pgrep lvmlockd ; then
+ echo "Cannot run while existing lvmlockd process exists"
+ exit 1
+ fi
+
+ if pgrep dlm_controld ; then
+ echo "Cannot run while existing dlm_controld process exists"
+ exit 1
+ fi
+
+ if pgrep corosync; then
+ echo "Cannot run while existing corosync process exists"
+ exit 1
+ fi
+
+ create_corosync_conf
+ create_dlm_conf
+
+ systemctl start corosync
+ sleep 1
+ if ! pgrep corosync; then
+ echo "Failed to start corosync"
+ exit 1
+ fi
+
+ systemctl start dlm
+ sleep 1
+ if ! pgrep dlm_controld; then
+ echo "Failed to start dlm"
+ exit 1
+ fi
+
+ lvmlockd
+ sleep 1
+ if ! pgrep lvmlockd ; then
+ echo "Failed to start lvmlockd"
+ exit 1
+ fi
+}
+
+prepare_lvmlockd_dlm
+
diff --git a/test/shell/aa-lvmlockd-sanlock-prepare.sh b/test/shell/aa-lvmlockd-sanlock-prepare.sh
new file mode 100644
index 0000000..22127ad
--- /dev/null
+++ b/test/shell/aa-lvmlockd-sanlock-prepare.sh
@@ -0,0 +1,85 @@
+#!/bin/sh
+# Copyright (C) 2008-2012 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+test_description='Set up things to run tests with sanlock'
+
+. lib/utils
+. lib/inittest
+
+[ -z "$LVM_TEST_LOCK_TYPE_SANLOCK" ] && skip;
+
+SANLOCK_CONF="/etc/sanlock/sanlock.conf"
+create_sanlock_conf() {
+ if test -a $SANLOCK_CONF; then
+ if ! grep "created by lvm test suite" $SANLOCK_CONF; then
+ rm $SANLOCK_CONF
+ else
+ mv $SANLOCK_CONF $SANLOCK_CONF.prelvmtest
+ fi
+ fi
+
+ cp lib/test-sanlock-conf $SANLOCK_CONF
+ echo "created new $SANLOCK_CONF"
+}
+
+prepare_lvmlockd_sanlock() {
+ if pgrep lvmlockd ; then
+ echo "Cannot run while existing lvmlockd process exists"
+ exit 1
+ fi
+
+ if pgrep sanlock ; then
+ echo "Cannot run while existing sanlock process exists"
+ exit 1
+ fi
+
+ create_sanlock_conf
+
+ systemctl start sanlock
+ if ! pgrep sanlock; then
+ echo "Failed to start sanlock"
+ exit 1
+ fi
+
+ # FIXME: use 'systemctl start lvm2-lvmlockd' once we can pass -o 2
+ lvmlockd -o 2
+ sleep 1
+ if ! pgrep lvmlockd; then
+ echo "Failed to start lvmlockd"
+ exit 1
+ fi
+}
+
+# Create a device and a VG that are both outside the scope of
+# the standard lvm test suite so that they will not be removed
+# and will remain in place while all the tests are run.
+#
+# Use this VG to hold the sanlock global lock which will be used
+# by lvmlockd during other tests.
+#
+# This script will be run before any standard tests are run.
+# After all the tests are run, another script will be run
+# to remove this VG and device.
+
+GL_DEV="/dev/mapper/GL_DEV"
+GL_FILE="$PWD/gl_file.img"
+dmsetup remove GL_DEV || true
+rm -f "$GL_FILE"
+dd if=/dev/zero of="$GL_FILE" bs=$((1024*1024)) count=1024 2> /dev/null
+GL_LOOP=$(losetup -f "$GL_FILE" --show)
+echo "0 `blockdev --getsize $GL_LOOP` linear $GL_LOOP 0" | dmsetup create GL_DEV
+
+prepare_lvmlockd_sanlock
+
+vgcreate --config 'devices { global_filter=["a|GL_DEV|", "r|.*|"] filter=["a|GL_DEV|", "r|.*|"]}' --lock-type sanlock glvg $GL_DEV
+
+vgs --config 'devices { global_filter=["a|GL_DEV|", "r|.*|"] filter=["a|GL_DEV|", "r|.*|"]}' -o+locktype,lockargs glvg
+
diff --git a/test/shell/aa-lvmlockd-test-prepare.sh b/test/shell/aa-lvmlockd-test-prepare.sh
new file mode 100644
index 0000000..99ec86f
--- /dev/null
+++ b/test/shell/aa-lvmlockd-test-prepare.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Copyright (C) 2008-2012 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+test_description='Set up things to run tests with lvmlockd'
+
+. lib/utils
+. lib/inittest
+
+[ -z "$LVM_TEST_LVMLOCKD_TEST" ] && skip;
+
+# TODO: allow this to be configured sanlock/dlm
+LVM_TEST_LVMLOCKD_TEST_DLM=1
+
+prepare_lvmlockd_test() {
+ if pgrep lvmlockd ; then
+ echo "Cannot run while existing lvmlockd process exists"
+ exit 1
+ fi
+
+ if test -n "$LVM_TEST_LVMLOCKD_TEST_SANLOCK"; then
+ lvmlockd --test -g sanlock
+ fi
+
+ if test -n "$LVM_TEST_LVMLOCKD_TEST_DLM"; then
+ lvmlockd --test -g dlm
+ fi
+
+ sleep 1
+ if ! pgrep lvmlockd ; then
+ echo "Failed to start lvmlockd"
+ exit 1
+ fi
+}
+
+prepare_lvmlockd_test
+
diff --git a/test/shell/dlm-prepare.sh b/test/shell/dlm-prepare.sh
deleted file mode 100644
index e1e1a73..0000000
--- a/test/shell/dlm-prepare.sh
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2008-2012 Red Hat, Inc. All rights reserved.
-#
-# This copyrighted material is made available to anyone wishing to use,
-# modify, copy, or redistribute it subject to the terms and conditions
-# of the GNU General Public License v.2.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-test_description='Set up things to run tests with dlm'
-
-. lib/utils
-. lib/inittest
-
-[ -z "$LVM_TEST_LOCK_TYPE_DLM" ] && skip;
-
-COROSYNC_CONF="/etc/corosync/corosync.conf"
-COROSYNC_NODE="$(hostname)"
-create_corosync_conf() {
- if test -a $COROSYNC_CONF; then
- if ! grep "created by lvm test suite" $COROSYNC_CONF; then
- rm $COROSYNC_CONF
- else
- mv $COROSYNC_CONF $COROSYNC_CONF.prelvmtest
- fi
- fi
-
- sed -e "s/@LOCAL_NODE@/$COROSYNC_NODE/" lib/test-corosync-conf > $COROSYNC_CONF
- echo "created new $COROSYNC_CONF"
-}
-
-DLM_CONF="/etc/dlm/dlm.conf"
-create_dlm_conf() {
- if test -a $DLM_CONF; then
- if ! grep "created by lvm test suite" $DLM_CONF; then
- rm $DLM_CONF
- else
- mv $DLM_CONF $DLM_CONF.prelvmtest
- fi
- fi
-
- cp lib/test-dlm-conf $DLM_CONF
- echo "created new $DLM_CONF"
-}
-
-prepare_lvmlockd_dlm() {
- if pgrep lvmlockd ; then
- echo "Cannot run while existing lvmlockd process exists"
- exit 1
- fi
-
- if pgrep dlm_controld ; then
- echo "Cannot run while existing dlm_controld process exists"
- exit 1
- fi
-
- if pgrep corosync; then
- echo "Cannot run while existing corosync process exists"
- exit 1
- fi
-
- create_corosync_conf
- create_dlm_conf
-
- systemctl start corosync
- sleep 1
- if ! pgrep corosync; then
- echo "Failed to start corosync"
- exit 1
- fi
-
- systemctl start dlm
- sleep 1
- if ! pgrep dlm_controld; then
- echo "Failed to start dlm"
- exit 1
- fi
-
- lvmlockd
- sleep 1
- if ! pgrep lvmlockd ; then
- echo "Failed to start lvmlockd"
- exit 1
- fi
-}
-
-prepare_lvmlockd_dlm
-
diff --git a/test/shell/dlm-remove.sh b/test/shell/dlm-remove.sh
deleted file mode 100644
index 3848c0e..0000000
--- a/test/shell/dlm-remove.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2008-2012 Red Hat, Inc. All rights reserved.
-#
-# This copyrighted material is made available to anyone wishing to use,
-# modify, copy, or redistribute it subject to the terms and conditions
-# of the GNU General Public License v.2.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-test_description='Remove the dlm test setup'
-
-. lib/inittest
-
-[ -z "$LVM_TEST_LOCK_TYPE_DLM" ] && skip;
-
-# FIXME: collect debug logs (only if a test failed?)
-# lvmlockctl -d > lvmlockd-debug.txt
-# dlm_tool dump > dlm-debug.txt
-
-systemctl stop dlm
-systemctl stop corosync
-killall lvmlockd
diff --git a/test/shell/lvmlockd-lv-types.sh b/test/shell/lvmlockd-lv-types.sh
index 70c856e..8e12776 100644
--- a/test/shell/lvmlockd-lv-types.sh
+++ b/test/shell/lvmlockd-lv-types.sh
@@ -27,6 +27,12 @@ LOCKARGS2="dlm"
LOCKARGS3="dlm"
fi
+if test -n "$LVM_TEST_LVMLOCKD_TEST" ; then
+LOCKARGS1="dlm"
+LOCKARGS2="dlm"
+LOCKARGS3="dlm"
+fi
+
aux prepare_devs 5
vgcreate --shared $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5"
diff --git a/test/shell/sanlock-prepare.sh b/test/shell/sanlock-prepare.sh
deleted file mode 100644
index aabd9f6..0000000
--- a/test/shell/sanlock-prepare.sh
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2008-2012 Red Hat, Inc. All rights reserved.
-#
-# This copyrighted material is made available to anyone wishing to use,
-# modify, copy, or redistribute it subject to the terms and conditions
-# of the GNU General Public License v.2.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-test_description='Set up things to run tests with sanlock'
-
-. lib/utils
-. lib/inittest
-
-[ -z "$LVM_TEST_LOCK_TYPE_SANLOCK" ] && skip;
-
-SANLOCK_CONF="/etc/sysconfig/sanlock"
-create_sanlock_conf() {
- if test -a $SANLOCK_CONF; then
- if ! grep "created by lvm test suite" $SANLOCK_CONF; then
- rm $SANLOCK_CONF
- else
- mv $SANLOCK_CONF $SANLOCK_CONF.prelvmtest
- fi
- fi
-
- cp lib/test-sanlock-conf $SANLOCK_CONF
- echo "created new $SANLOCK_CONF"
-}
-
-prepare_lvmlockd_sanlock() {
- if pgrep lvmlockd ; then
- echo "Cannot run while existing lvmlockd process exists"
- exit 1
- fi
-
- if pgrep sanlock ; then
- echo "Cannot run while existing sanlock process exists"
- exit 1
- fi
-
- create_sanlock_conf
-
- # FIXME: use 'systemctl start sanlock' once we can pass options
- sanlock daemon -U sanlock -G sanlock -w 0 -e testhostname
- sleep 1
- if ! pgrep sanlock; then
- echo "Failed to start sanlock"
- exit 1
- fi
-
- # FIXME: use 'systemctl start lvm2-lvmlockd' once we can pass -o 2
- lvmlockd -o 2
- sleep 1
- if ! pgrep lvmlockd; then
- echo "Failed to start lvmlockd"
- exit 1
- fi
-}
-
-# Create a device and a VG that are both outside the scope of
-# the standard lvm test suite so that they will not be removed
-# and will remain in place while all the tests are run.
-#
-# Use this VG to hold the sanlock global lock which will be used
-# by lvmlockd during other tests.
-#
-# This script will be run before any standard tests are run.
-# After all the tests are run, another script will be run
-# to remove this VG and device.
-
-GL_DEV="/dev/mapper/GL_DEV"
-GL_FILE="$PWD/gl_file.img"
-dmsetup remove GL_DEV || true
-rm -f "$GL_FILE"
-dd if=/dev/zero of="$GL_FILE" bs=$((1024*1024)) count=1024 2> /dev/null
-GL_LOOP=$(losetup -f "$GL_FILE" --show)
-echo "0 `blockdev --getsize $GL_LOOP` linear $GL_LOOP 0" | dmsetup create GL_DEV
-
-prepare_lvmlockd_sanlock
-
-vgcreate --config 'devices { global_filter=["a|GL_DEV|", "r|.*|"] filter=["a|GL_DEV|", "r|.*|"]}' --lock-type sanlock glvg $GL_DEV
-
-vgs --config 'devices { global_filter=["a|GL_DEV|", "r|.*|"] filter=["a|GL_DEV|", "r|.*|"]}' -o+locktype,lockargs glvg
-
diff --git a/test/shell/sanlock-remove.sh b/test/shell/sanlock-remove.sh
deleted file mode 100644
index e22aae8..0000000
--- a/test/shell/sanlock-remove.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2008-2012 Red Hat, Inc. All rights reserved.
-#
-# This copyrighted material is made available to anyone wishing to use,
-# modify, copy, or redistribute it subject to the terms and conditions
-# of the GNU General Public License v.2.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-test_description='Remove the sanlock test setup'
-
-. lib/inittest
-
-[ -z "$LVM_TEST_LOCK_TYPE_SANLOCK" ] && skip;
-
-# FIMXME: get this to run after a test fails
-
-# Removes the VG with the global lock that was created by
-# the corresponding create script.
-
-vgremove --config 'devices { global_filter=["a|GL_DEV|", "r|.*|"] filter=["a|GL_DEV|", "r|.*|"]}' glvg
-
-# FIXME: collect debug logs (only if a test failed?)
-# lvmlockctl -d > lvmlockd-debug.txt
-# sanlock log_dump > sanlock-debug.txt
-
-killall lvmlockd
-killall sanlock
-
-killall -9 lvmlockd
-killall -9 sanlock
-
-# FIXME: dmsetup remove LVMTEST*-lvmlock
-
-dmsetup remove glvg-lvmlock || true
-dmsetup remove GL_DEV || true
-
diff --git a/test/shell/zz-lvmlockd-dlm-remove.sh b/test/shell/zz-lvmlockd-dlm-remove.sh
new file mode 100644
index 0000000..3848c0e
--- /dev/null
+++ b/test/shell/zz-lvmlockd-dlm-remove.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Copyright (C) 2008-2012 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+test_description='Remove the dlm test setup'
+
+. lib/inittest
+
+[ -z "$LVM_TEST_LOCK_TYPE_DLM" ] && skip;
+
+# FIXME: collect debug logs (only if a test failed?)
+# lvmlockctl -d > lvmlockd-debug.txt
+# dlm_tool dump > dlm-debug.txt
+
+systemctl stop dlm
+systemctl stop corosync
+killall lvmlockd
diff --git a/test/shell/zz-lvmlockd-sanlock-remove.sh b/test/shell/zz-lvmlockd-sanlock-remove.sh
new file mode 100644
index 0000000..ae5bdef
--- /dev/null
+++ b/test/shell/zz-lvmlockd-sanlock-remove.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+# Copyright (C) 2008-2012 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+test_description='Remove the sanlock test setup'
+
+. lib/inittest
+
+[ -z "$LVM_TEST_LOCK_TYPE_SANLOCK" ] && skip;
+
+# FIMXME: get this to run after a test fails
+
+# Removes the VG with the global lock that was created by
+# the corresponding create script.
+
+vgremove --config 'devices { global_filter=["a|GL_DEV|", "r|.*|"] filter=["a|GL_DEV|", "r|.*|"]}' glvg
+
+# FIXME: collect debug logs (only if a test failed?)
+# lvmlockctl -d > lvmlockd-debug.txt
+# sanlock log_dump > sanlock-debug.txt
+
+killall lvmlockd
+sleep 1
+killall sanlock
+sleep 1
+
+killall -9 lvmlockd || true
+killall -9 sanlock || true
+
+# FIXME: dmsetup remove LVMTEST*-lvmlock
+
+dmsetup remove glvg-lvmlock || true
+dmsetup remove GL_DEV || true
+
diff --git a/test/shell/zz-lvmlockd-test-remove.sh b/test/shell/zz-lvmlockd-test-remove.sh
new file mode 100644
index 0000000..44749f0
--- /dev/null
+++ b/test/shell/zz-lvmlockd-test-remove.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Copyright (C) 2008-2012 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+test_description='Remove the dlm test setup'
+
+. lib/inittest
+
+[ -z "$LVM_TEST_LVMLOCKD_TEST" ] && skip;
+
+killall lvmlockd
+sleep 1
+killall lvmlockd || true
+sleep 1
+killall -9 lvmlockd || true
+
8 years, 2 months
master - tests: skip thin-flags test on 32bit el6 kernel
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ed5e5c38b5ac4b...
Commit: ed5e5c38b5ac4b7c8cb7e809d9d35c72f087e29e
Parent: 3178cfc81823589cde16668b90a04a35fe0b758b
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Feb 22 14:52:01 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 22 14:59:28 2016 +0100
tests: skip thin-flags test on 32bit el6 kernel
Until kernel is fixed, stop running test always hitting OOPS there.
---
test/lib/aux.sh | 12 ++++++++++++
test/shell/thin-flags.sh | 1 +
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 6250143..12316aa 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -1007,6 +1007,18 @@ raid456_replace_works() {
esac
}
+#
+# Some 32bit kernel cannot pass some erroring magic which forces
+# thin-pool to be falling into Error state.
+#
+# Skip test on such kernels (see: https://bugzilla.redhat.com/1310661)
+#
+thin_pool_error_works_32() {
+ case "$(uname -r)" in
+ 2.6.32-618.*.i686) return 1 ;;
+ esac
+}
+
udev_wait() {
pgrep udev >/dev/null || return 0
which udevadm &>/dev/null || return 0
diff --git a/test/shell/thin-flags.sh b/test/shell/thin-flags.sh
index 7dd0d6e..95eafa0 100644
--- a/test/shell/thin-flags.sh
+++ b/test/shell/thin-flags.sh
@@ -39,6 +39,7 @@ fake_metadata_() {
# Main
#
aux have_thin 1 3 0 || skip
+aux thin_pool_error_works_32 || skip
aux prepare_vg 2 256
8 years, 2 months
master - cleanup: use char arrays.
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3178cfc8182358...
Commit: 3178cfc81823589cde16668b90a04a35fe0b758b
Parent: 2d6ef123a673d0982e9d3900ab4953ce146e4fc6
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Feb 22 14:11:02 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 22 14:27:44 2016 +0100
cleanup: use char arrays.
---
libdm/libdm-stats.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index 1eeca06..82d3fa5 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -453,7 +453,7 @@ static int _stats_parse_histogram_spec(struct dm_stats *dms,
struct dm_stats_region *region,
const char *histogram)
{
- static const char *_valid_chars = "0123456789,";
+ static const char _valid_chars[] = "0123456789,";
uint64_t scale = region->timescale, this_val = 0;
struct dm_pool *mem = dms->hist_mem;
struct dm_histogram_bin cur;
@@ -740,8 +740,8 @@ static int _stats_parse_histogram(struct dm_pool *mem, char *hist_str,
struct dm_histogram **histogram,
struct dm_stats_region *region)
{
+ static const char _valid_chars[] = "0123456789:";
struct dm_histogram *bounds = region->bounds;
- static const char *_valid_chars = "0123456789:";
struct dm_histogram hist = {
.nr_bins = region->bounds->nr_bins
};
@@ -2000,7 +2000,7 @@ static struct dm_histogram *_alloc_dm_histogram(int nr_bins)
*/
struct dm_histogram *dm_histogram_bounds_from_string(const char *bounds_str)
{
- static const char *_valid_chars = "0123456789,muns";
+ static const char _valid_chars[] = "0123456789,muns";
uint64_t this_val = 0, mult = 1;
const char *c, *v, *val_start;
struct dm_histogram_bin *cur;
8 years, 2 months
master - cleanup: indent changes
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2d6ef123a673d0...
Commit: 2d6ef123a673d0982e9d3900ab4953ce146e4fc6
Parent: fba54ae55e888d290f8783d813bbecf3f1cfdd61
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Feb 22 10:44:46 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 22 14:26:15 2016 +0100
cleanup: indent changes
Some code indention.
Use dm_strncpy() for simplier code.
TODO: we could possibly use %32s for printing pvid...
so maybe adding extra FMT_PVID....
---
lib/cache/lvmetad.c | 50 +++++++++++++++++++++++++++++++-------------------
1 files changed, 31 insertions(+), 19 deletions(-)
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
index dbb3739..b68e6c9 100644
--- a/lib/cache/lvmetad.c
+++ b/lib/cache/lvmetad.c
@@ -105,6 +105,7 @@ void lvmetad_disconnect(void)
{
if (_lvmetad_connected)
daemon_close(_lvmetad);
+
_lvmetad_connected = 0;
}
@@ -165,14 +166,17 @@ int lvmetad_socket_present(void)
int lvmetad_active(void)
{
lvmetad_connect_or_warn();
+
return _lvmetad_connected;
}
void lvmetad_set_active(struct cmd_context *cmd, int active)
{
_lvmetad_use = active;
+
if (!active && lvmetad_active())
lvmetad_disconnect();
+
if (cmd && !refresh_filters(cmd))
stack;
}
@@ -282,6 +286,7 @@ static int _token_update(void)
}
daemon_reply_destroy(repl);
+
return 1;
}
@@ -490,6 +495,7 @@ static int _pv_populate_lvmcache(struct cmd_context *cmd,
static int _pv_update_struct_pv(struct physical_volume *pv, struct format_instance *fid)
{
struct lvmcache_info *info;
+
if ((info = lvmcache_info_from_pvid((const char *)&pv->id, 0))) {
pv->label_sector = lvmcache_get_label(info)->sector;
pv->dev = lvmcache_device(info);
@@ -497,9 +503,10 @@ static int _pv_update_struct_pv(struct physical_volume *pv, struct format_instan
pv->status |= MISSING_PV;
if (!lvmcache_fid_add_mdas_pv(info, fid))
return_0;
- pv->fid = fid;
+ pv->fid = fid;
} else
pv->status |= MISSING_PV; /* probably missing */
+
return 1;
}
@@ -680,9 +687,12 @@ struct _fixup_baton {
static int _fixup_ignored(struct metadata_area *mda, void *baton) {
struct _fixup_baton *b = baton;
+
if (b->i == b->find)
mda_set_ignored(mda, b->ignore);
+
b->i ++;
+
return 1;
}
@@ -829,6 +839,7 @@ out_success:
out:
daemon_reply_destroy(reply);
+
return result;
}
@@ -903,6 +914,7 @@ int lvmetad_get_vgnameids(struct cmd_context *cmd, struct dm_list *vgnameids)
}
daemon_reply_destroy(reply);
+
return 1;
}
@@ -938,6 +950,7 @@ int lvmetad_vg_list_to_lvmcache(struct cmd_context *cmd)
}
daemon_reply_destroy(reply);
+
return 1;
}
@@ -1005,13 +1018,15 @@ static int _extract_ba(struct disk_locn *ba, void *baton)
static int _extract_mdas(struct lvmcache_info *info, struct dm_config_tree *cft,
struct dm_config_node *pre_sib)
{
- struct _extract_dl_baton baton = { .i = 0, .cft = cft, .pre_sib = NULL };
+ struct _extract_dl_baton baton = { .cft = cft };
if (!lvmcache_foreach_mda(info, &_extract_mda, &baton))
return 0;
+
baton.i = 0;
if (!lvmcache_foreach_da(info, &_extract_da, &baton))
return 0;
+
baton.i = 0;
if (!lvmcache_foreach_ba(info, &_extract_ba, &baton))
return 0;
@@ -1172,11 +1187,11 @@ int lvmetad_pv_gone(dev_t devno, const char *pv_name, activation_handler handler
return 1;
/*
- * TODO: automatic volume deactivation takes place here *before*
- * all cached info is gone - call handler. Also, consider
- * integrating existing deactivation script that deactivates
- * the whole stack from top to bottom (not yet upstream).
- */
+ * TODO: automatic volume deactivation takes place here *before*
+ * all cached info is gone - call handler. Also, consider
+ * integrating existing deactivation script that deactivates
+ * the whole stack from top to bottom (not yet upstream).
+ */
log_debug_lvmetad("Telling lvmetad to forget any PV on %s", pv_name);
reply = _lvmetad_send("pv_gone", "device = %" PRId64, (int64_t) devno, NULL);
@@ -1415,8 +1430,9 @@ int lvmetad_pvscan_single(struct cmd_context *cmd, struct device *dev,
bad:
/* FIXME kill lvmetad automatically if we can */
- log_error("Update of lvmetad failed. This is a serious problem.\n "
+ log_error("Update of lvmetad failed. This is a serious problem.\n"
"It is strongly recommended that you restart lvmetad immediately.");
+
return 0;
}
@@ -1536,6 +1552,7 @@ static int _lvmetad_get_pv_cache_list(struct cmd_context *cmd, struct dm_list *p
return 1;
log_debug_lvmetad("Asking lvmetad for complete list of known PVs");
+
reply = _lvmetad_send("pv_list", NULL);
if (!_lvmetad_handle_reply(reply, "list PVs", "", NULL)) {
log_error("lvmetad message failed.");
@@ -1632,10 +1649,8 @@ static void _update_changed_pvs_in_udev(struct cmd_context *cmd,
continue;
if (!id_equal(&before->pvid, &after->pvid)) {
- memset(id_before, 0, sizeof(id_before));
- memset(id_after, 0, sizeof(id_after));
- strncpy(&id_before[0], (char *) &before->pvid, sizeof(id_before) - 1);
- strncpy(&id_after[0], (char *) &after->pvid, sizeof(id_after) - 1);
+ dm_strncpy(id_before, (char *) &before->pvid, sizeof(id_before));
+ dm_strncpy(id_after, (char *) &after->pvid, sizeof(id_after));
log_debug_devs("device %d:%d changed pvid from %s to %s",
(int)MAJOR(before->devt), (int)MINOR(before->devt),
@@ -1661,8 +1676,7 @@ static void _update_changed_pvs_in_udev(struct cmd_context *cmd,
}
if (!found) {
- memset(id_before, 0, sizeof(id_before));
- strncpy(&id_before[0], (char *) &before->pvid, sizeof(id_before) - 1);
+ dm_strncpy(id_before, (char *) &before->pvid, sizeof(id_before));
log_debug_devs("device %d:%d pvid %s vg %s is gone",
(int)MAJOR(before->devt), (int)MINOR(before->devt),
@@ -1754,10 +1768,8 @@ void lvmetad_validate_global_cache(struct cmd_context *cmd, int force)
daemon_reply_destroy(reply);
- if (!global_invalid) {
- /* cache is valid */
- return;
- }
+ if (!global_invalid)
+ return; /* cache is valid */
do_scan:
/*
@@ -1839,6 +1851,6 @@ int lvmetad_vg_is_foreign(struct cmd_context *cmd, const char *vgname, const cha
ret = !is_system_id_allowed(cmd, system_id);
daemon_reply_destroy(reply);
+
return ret;
}
-
8 years, 2 months
master - cleanup: libdm clang warnings
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fba54ae55e888d...
Commit: fba54ae55e888d290f8783d813bbecf3f1cfdd61
Parent: 275c9f7e7789124ba67533522e7b3a347f5a6f8f
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Feb 22 10:49:45 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 22 14:18:28 2016 +0100
cleanup: libdm clang warnings
Add some extra clang pointer validation so we do not try deref NULL.
---
libdm/libdm-stats.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index d32e4ea..1eeca06 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -963,7 +963,9 @@ static void _stats_walk_next(const struct dm_stats *dms, int region,
if (!dms || !dms->regions)
return;
- cur = &dms->regions[*cur_r];
+ if (!(cur = &dms->regions[*cur_r]))
+ return;
+
present = _stats_region_present(cur);
if (region && present)
@@ -1314,7 +1316,7 @@ static int _dm_stats_populate_region(struct dm_stats *dms, uint64_t region_id,
if (!_stats_bound(dms))
return_0;
- if (!_stats_parse_region(dms, resp, region, region->timescale)) {
+ if (!region || !_stats_parse_region(dms, resp, region, region->timescale)) {
log_error("Could not parse @stats_print message response.");
return 0;
}
8 years, 2 months
master - libdm: grow with initialized struct content
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=275c9f7e778912...
Commit: 275c9f7e7789124ba67533522e7b3a347f5a6f8f
Parent: 30a73d1604aeb318709a01f4cc238e2d872be8de
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Feb 22 11:14:30 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 22 14:17:32 2016 +0100
libdm: grow with initialized struct content
Coverity noticed struct hist has been copied uninitalized into mempool.
---
WHATS_NEW_DM | 1 +
libdm/libdm-stats.c | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index dd47c6b..3dbbfae 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.118 -
=====================================
+ Always initialized hist struct in _stats_parse_histogram().
Version 1.02.117 - 21st February 2016
=====================================
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index 0c1fe7a..d32e4ea 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -740,9 +740,11 @@ static int _stats_parse_histogram(struct dm_pool *mem, char *hist_str,
struct dm_histogram **histogram,
struct dm_stats_region *region)
{
- struct dm_histogram hist, *bounds = region->bounds;
+ struct dm_histogram *bounds = region->bounds;
static const char *_valid_chars = "0123456789:";
- int nr_bins = region->bounds->nr_bins;
+ struct dm_histogram hist = {
+ .nr_bins = region->bounds->nr_bins
+ };
const char *c, *v, *val_start;
struct dm_histogram_bin cur;
uint64_t sum = 0, this_val;
@@ -754,8 +756,6 @@ static int _stats_parse_histogram(struct dm_pool *mem, char *hist_str,
if (!dm_pool_begin_object(mem, sizeof(cur)))
return_0;
- hist.nr_bins = nr_bins;
-
if (!dm_pool_grow_object(mem, &hist, sizeof(hist)))
goto_bad;
@@ -800,7 +800,7 @@ static int _stats_parse_histogram(struct dm_pool *mem, char *hist_str,
}
} while (*c && (*c != '\n'));
- log_debug("Added region histogram data with %d entries.", nr_bins);
+ log_debug("Added region histogram data with %d entries.", hist.nr_bins);
*histogram = dm_pool_end_object(mem);
(*histogram)->sum = sum;
8 years, 2 months
master - lvmetad: fix error path
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=30a73d1604aeb3...
Commit: 30a73d1604aeb318709a01f4cc238e2d872be8de
Parent: 44b3909e588bc8d1896b4a94cf7d0ce85e251960
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Feb 22 10:45:01 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 22 14:15:53 2016 +0100
lvmetad: fix error path
Coverity noticed the internal error path would be using uninit struct.
So always make sure reply is initilized.
---
WHATS_NEW | 1 +
lib/cache/lvmetad.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index f94cabd..f15d885 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.144 -
=====================================
+ Fix error path for internal error in lvmetad vg lookup code.
Version 2.02.143 - 21st February 2016
=====================================
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
index 7d6356d..dbb3739 100644
--- a/lib/cache/lvmetad.c
+++ b/lib/cache/lvmetad.c
@@ -507,7 +507,7 @@ struct volume_group *lvmetad_vg_lookup(struct cmd_context *cmd, const char *vgna
{
struct volume_group *vg = NULL;
struct volume_group *vg2 = NULL;
- daemon_reply reply;
+ daemon_reply reply = { 0 };
int found;
char uuid[64];
struct format_instance *fid = NULL;
8 years, 2 months
v2_02_143 annotated tag has been created
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5734e4d24502ec...
Commit: 5734e4d24502ec787e584f245938ec632d7d08a7
Parent: 0000000000000000000000000000000000000000
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: 2016-02-21 23:32 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: 2016-02-21 23:32 +0000
annotated tag: v2_02_143 has been created
at 5734e4d24502ec787e584f245938ec632d7d08a7 (tag)
tagging 3ef36f05b6269f752a6d8fb62e098e89843958fa (commit)
replaces v2_02_142
Release 2.02.143.
Experimental release including lvmdbusd.
(No change related to lvmdbusd or python in this release should be considered
frozen.)
83 files changed, 9680 insertions(+), 305 deletions(-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAlbKSV4ACgkQIoGRwVZ+LBeGhACg7dpf3avexsf96iFauYCEk0Fm
NGIAoPT1iPI5ce6M4KPXL5tGWP/HQaAM
=s//r
-----END PGP SIGNATURE-----
Alasdair G Kergon (10):
post-release
lvmdbus: Add new daemon.
WHATS_NEW
lvmdbus: resync latest changes with original repo
autoconf: Fix py-compile permissions
lvmdbusd: Rename module to lvmdbusd
.
configure: Use python-config if python2-config not found.
lbmdbusd: Support in-tree testing.
pre-release
Marian Csontos (2):
Fix rpm builds
spec: Update python bindings and dbus-service
Peter Rajnoha (36):
refactor: rename struct pv_to_create --> struct pv_to_write
format: add FMT_PV_FLAGS to indicate format supports PV flags
metadata: introduce PV_EXT_USED flag and bump PV_HEADER_EXTENSION_VSN
lvmcache/lvmetad: cache PV extension flags
lvmcache/lvmetad: cache PV extension version
pv: add is_used_pv fn
metadata: add_pv_to_vg: add 'new_pv' arg to state if the PV is about to be created
metadata: schedule PV for header rewrite if adding a PV to VG or restoring VG
pv: format-text: store PV_EXT_USED flag if PV is used and unset it otherwise
pv: check for the PV_EXT_USED flag and deny pvcreate/pvchange/pvremove/vgcreate on such PV (unless forced)
pv: issue different message of different type when we're overwriting existing PV header instead of creating a new one
pv: _pvcreate_write: do label removal and zeroing only if creating a new PV
report: add pv_in_use field to display whether PV is in use or not
metadata: _vg_read: check if PV_EXT_USED flag is set correctly for orphan PVs and do a repair if needed
metadata: check for PV extension version before doing any checks on PV extension flags
report: add pv_ext_vsn field to display PV header extension version used
metadata: _vg_read: check if PV_EXT_USED flag is set correctly for non-orphan PVs and do a repair if needed
backup: backup_restore_vg: register PVs that need writing via vg->pvs_to_write list
report: always display 0 for pv_free field if we don't have any mda and PV is marked as used at the same time
report: identify used PVs in pv_attr field with 'u' char
format: format_text: add pv_needs_rewrite to format_handler and implemention for format_text
vg: automatically update to newest PV ext version during vg_write
tests: add pv-ext-flags.sh test
tests: fix tests checking pv_attr - there's a new bit now
WHATS_NEW: PV_EXT_USED flag and related
cleanup: use is_used_pv fn to detect whether PV is in use while reporting pv_free field
pv: mark fake PVs as not used
toollib: skip PV if system ID is used and PV marked as used but metadata missing
cleanup: make the message about marked PVs consistent with the others
pv: use pv->fmt to check for fake PVs, not pv->vg
refactor: add common _is_foreign_vg fn
metadata: do not repair missing PV_EXT_USED flag for PVs belonging to foreign VG
metadata: add missing _repair_inconsinstent_vg call during PV ext repair
man: fix list of restricted LV name suffixes
report: report -1, not 'unkown' for lv_{snapshot_invalid,merge_failed} with --binary
metadata: ask for confirmation before really initializing/removing PV that is marked as belonging to a VG
Tony Asleson (1):
lvmdbustest.py: resync latest changes
Zdenek Kabelac (8):
libdm: thin status update
thin: report PERCENT_INVALID for failed pool
thin: report needs_check and fail state
man: lvs updates
tests: checking thin flags
thin: fix test for nonexisting status
tests: needs_check needs version 16
thin: fix update_pool_lv error path
8 years, 2 months
master - post-release
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=44b3909e588bc8...
Commit: 44b3909e588bc8d1896b4a94cf7d0ce85e251960
Parent: 3ef36f05b6269f752a6d8fb62e098e89843958fa
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Sun Feb 21 23:37:48 2016 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Sun Feb 21 23:37:48 2016 +0000
post-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 3 +++
WHATS_NEW_DM | 3 +++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/VERSION b/VERSION
index b7455e6..d831047 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.143(2)-git (2016-02-21)
+2.02.144(2)-git (2016-02-21)
diff --git a/VERSION_DM b/VERSION_DM
index 505ccd5..c19e2b5 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.117-git (2016-02-21)
+1.02.118-git (2016-02-21)
diff --git a/WHATS_NEW b/WHATS_NEW
index 9097ce9..f94cabd 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.02.144 -
+=====================================
+
Version 2.02.143 - 21st February 2016
=====================================
Fix error path when sending thin-pool message fails in update_pool_lv().
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index f23c541..dd47c6b 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.118 -
+=====================================
+
Version 1.02.117 - 21st February 2016
=====================================
Improve status parsing for thin-pool and thin devices.
8 years, 2 months
master - pre-release
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3ef36f05b6269f...
Commit: 3ef36f05b6269f752a6d8fb62e098e89843958fa
Parent: 8b6cad32199dd08d8f56d5f0cec0f5e24928211c
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Sun Feb 21 23:17:24 2016 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Sun Feb 21 23:17:24 2016 +0000
pre-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 2 +-
WHATS_NEW_DM | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/VERSION b/VERSION
index 3dc718b..b7455e6 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.143(2)-git (2016-02-15)
+2.02.143(2)-git (2016-02-21)
diff --git a/VERSION_DM b/VERSION_DM
index 621718a..505ccd5 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.117-git (2016-02-15)
+1.02.117-git (2016-02-21)
diff --git a/WHATS_NEW b/WHATS_NEW
index 654f0a1..9097ce9 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,4 +1,4 @@
-Version 2.02.143 -
+Version 2.02.143 - 21st February 2016
=====================================
Fix error path when sending thin-pool message fails in update_pool_lv().
Support reporting CheckNeeded and Fail state for thin-pool and thin LV.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 984d7fa..f23c541 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,4 +1,4 @@
-Version 1.02.117 -
+Version 1.02.117 - 21st February 2016
=====================================
Improve status parsing for thin-pool and thin devices.
8 years, 2 months