Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package multipath-tools

These are minor changes, which should qualify for an upload exception. The new
file additions are mostly autopkg tests related, which have no impact on the
software. The other changes are good to have for Stretch.

unblock multipath-tools/0.6.4-4

-- System Information:
Debian Release: 9.0
  APT prefers unstable-debug
  APT policy: (990, 'unstable-debug'), (990, 'testing-debug'), (990, 
'unstable'), (990, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.10.0+ (SMP w/4 CPU cores)
Locale: LANG=en_IN.utf8, LC_CTYPE=en_IN.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
 changelog                  |   16 +++
 control                    |    4 
 initramfs/hooks            |    2 
 initramfs/local-top        |    6 -
 tests/control              |    8 +
 tests/kpartx-file-loopback |   51 +++++++++++
 tests/tgtbasedmpaths       |  204 +++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 285 insertions(+), 6 deletions(-)

diff -Nru multipath-tools-0.6.4/debian/changelog 
multipath-tools-0.6.4/debian/changelog
--- multipath-tools-0.6.4/debian/changelog      2017-01-25 14:58:53.000000000 
+0530
+++ multipath-tools-0.6.4/debian/changelog      2017-02-20 19:36:31.000000000 
+0530
@@ -1,3 +1,19 @@
+multipath-tools (0.6.4-4) unstable; urgency=medium
+
+  [ Ritesh Raj Sarraf ]
+  * [65ba796] Fix path for udevadm, which now resides in /bin.
+    Thanks to Michael Biebl (Closes: #852586)
+  * [5291947] Drop non-existent dm-emc module and include
+    dm-round-robin, in initramfs.
+    Thanks to Allan Jacobsen (Closes: #855585)
+
+  [ Christian Ehrhardt ]
+  * [6159c78] debian/control: Bump to an updated udev dependency
+  * [8649315] debian/tests/kpartx-file-loopback: test kpartx
+  * [137dcc1] add Test using tgt and open-iscsi
+
+ -- Ritesh Raj Sarraf <r...@debian.org>  Mon, 20 Feb 2017 19:36:31 +0530
+
 multipath-tools (0.6.4-3) unstable; urgency=medium
 
   * [3eecdba] Include libmpathcmd.so in the udeb package.
diff -Nru multipath-tools-0.6.4/debian/control 
multipath-tools-0.6.4/debian/control
--- multipath-tools-0.6.4/debian/control        2017-01-23 16:51:48.000000000 
+0530
+++ multipath-tools-0.6.4/debian/control        2017-02-20 19:36:31.000000000 
+0530
@@ -11,7 +11,7 @@
 
 Package: multipath-tools
 Architecture: linux-any
-Depends: ${shlibs:Depends}, ${misc:Depends}, udev (>= 0.124), kpartx (>= 
${binary:Version}), lsb-base (>= 3.0-6), libaio1 (>= 0.3.106-8), sg3-utils-udev
+Depends: ${shlibs:Depends}, ${misc:Depends}, udev (>> 136-1), kpartx (>= 
${binary:Version}), lsb-base (>= 3.0-6), libaio1 (>= 0.3.106-8), sg3-utils-udev
 Breaks: multipath-tools-initramfs (<= 1.0.1),
  multipath-tools-boot (<= 0.4.8+git0.761c66f-2~)
 Suggests: multipath-tools-boot
@@ -24,7 +24,7 @@
 
 Package: kpartx
 Architecture: linux-any
-Depends: ${shlibs:Depends}, ${misc:Depends}, udev (>> 0.086), dmsetup (>= 
2:1.02.24)
+Depends: ${shlibs:Depends}, ${misc:Depends}, udev (>> 136-1), dmsetup (>= 
2:1.02.24)
 Replaces: multipath-tools (<< 0.4.7-3)
 Description: create device mappings for partitions
  Kpartx can be used to set up device mappings for the partitions of any
diff -Nru multipath-tools-0.6.4/debian/initramfs/hooks 
multipath-tools-0.6.4/debian/initramfs/hooks
--- multipath-tools-0.6.4/debian/initramfs/hooks        2016-12-08 
23:56:02.000000000 +0530
+++ multipath-tools-0.6.4/debian/initramfs/hooks        2017-02-20 
19:36:31.000000000 +0530
@@ -48,7 +48,7 @@
 [ -r /etc/multipath.conf ] && cp /etc/multipath.conf $DESTDIR/etc/
 add_bindings
 
-for x in dm-multipath dm-service-time dm-round-robin dm-emc; do
+for x in dm-multipath dm-service-time dm-round-robin; do
        manual_add_modules ${x}
 done
 
diff -Nru multipath-tools-0.6.4/debian/initramfs/local-top 
multipath-tools-0.6.4/debian/initramfs/local-top
--- multipath-tools-0.6.4/debian/initramfs/local-top    2016-12-08 
23:56:02.000000000 +0530
+++ multipath-tools-0.6.4/debian/initramfs/local-top    2017-02-20 
19:36:31.000000000 +0530
@@ -26,7 +26,7 @@
 
 maybe_break pre-multipath
 VERBOSITY=0
-MP_MODULES="dm-multipath dm-emc"
+MP_MODULES="dm-multipath dm-round-robin"
 
 if [ ! -e /sbin/multipath ]; then
        exit 0
@@ -50,8 +50,8 @@
     /sbin/dmsetup ls --target multipath --exec "/sbin/kpartx -a -p -part" 
>/dev/null
 fi
 
-if [ -x /sbin/udevadm ]; then
-    /sbin/udevadm settle --timeout=10
+if [ -x /bin/udevadm ]; then
+    /bin/udevadm settle --timeout=10
 fi
 
 maybe_break post-multipath
diff -Nru multipath-tools-0.6.4/debian/tests/control 
multipath-tools-0.6.4/debian/tests/control
--- multipath-tools-0.6.4/debian/tests/control  1970-01-01 05:30:00.000000000 
+0530
+++ multipath-tools-0.6.4/debian/tests/control  2017-02-20 19:36:31.000000000 
+0530
@@ -0,0 +1,8 @@
+
+Tests: kpartx-file-loopback
+Depends: kpartx, qemu-utils, gdisk
+Restrictions: needs-root, isolation-machine
+
+Tests: tgtbasedmpaths
+Depends: multipath-tools, tgt, open-iscsi, fio, lsscsi
+Restrictions: needs-root isolation-machine allow-stderr
diff -Nru multipath-tools-0.6.4/debian/tests/kpartx-file-loopback 
multipath-tools-0.6.4/debian/tests/kpartx-file-loopback
--- multipath-tools-0.6.4/debian/tests/kpartx-file-loopback     1970-01-01 
05:30:00.000000000 +0530
+++ multipath-tools-0.6.4/debian/tests/kpartx-file-loopback     2017-02-20 
19:36:31.000000000 +0530
@@ -0,0 +1,51 @@
+#!/bin/sh
+# autopkgtest check: Try to loopback-mount a disk image.
+# (C) 2016 Canonical Ltd.
+# Author: Mathieu Trudel-Lapierre <mathieu...@ubuntu.com>
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+
+DATAFILE=foo.img
+qemu-img create "$DATAFILE" 20M
+sgdisk -n 1 "$DATAFILE"
+kpartx -asv "$DATAFILE"
+udevadm settle
+loopdev=$(kpartx -lv "$DATAFILE" | awk '{ print $5; }')
+if losetup "$loopdev" 2>/dev/null | grep -qc "$loopdev"; then
+       echo "standard_filename: OK"
+       kpartx -dsv "$DATAFILE"
+       losetup
+       dmsetup ls --tree -o blkdevname
+       (losetup -j "$DATAFILE" | grep -qc $loopdev ) \
+               && ( echo "standard_filename_cleanup: FAIL"; exit 4 )
+       echo "standard_filename_cleanup: OK"
+else
+       echo "standard_filename: FAIL"
+       echo "standard_filename_cleanup: ERROR"
+       exit 6
+fi
+
+DATAFILE="fou du FaFa.img"
+qemu-img create "$DATAFILE" 20M
+sgdisk -n 1 "$DATAFILE"
+kpartx -asv "$DATAFILE"
+udevadm settle
+loopdev=$(kpartx -lv "$DATAFILE" | awk '{ print $5; }')
+if losetup "$loopdev" 2>/dev/null | grep -qc "$loopdev"; then
+       echo "filename_with_spaces: OK"
+       kpartx -dsv "$DATAFILE"
+       losetup
+       dmsetup ls --tree -o blkdevname
+       (losetup -j "$DATAFILE" | grep -qc $loopdev ) \
+               && ( echo "filename_with_spaces_cleanup: FAIL"; exit 4 )
+       echo "filename_with_spaces_cleanup: OK"
+else
+       echo "filename_with_spaces: FAIL"
+       echo "filename_with_spaces_cleanup: ERROR"
+       exit 6
+fi
+
diff -Nru multipath-tools-0.6.4/debian/tests/tgtbasedmpaths 
multipath-tools-0.6.4/debian/tests/tgtbasedmpaths
--- multipath-tools-0.6.4/debian/tests/tgtbasedmpaths   1970-01-01 
05:30:00.000000000 +0530
+++ multipath-tools-0.6.4/debian/tests/tgtbasedmpaths   2017-02-20 
19:36:31.000000000 +0530
@@ -0,0 +1,204 @@
+#!/bin/sh
+# autopkgtest check: tgt and open-iscsi based mpath operations
+# The test is intentionally extra verbose to have rich log and to stress
+# some of the code paths in and around multipath on top of the actual IO test.
+# (C) 2016 Canonical Ltd.
+# Author: Christian Ehrhardt <christian.ehrha...@canonical.com>
+
+# Tests the creation and usage of a tgt target and lun on localhost
+set -uxe
+
+targetname="iqn.2016-11.foo.com:target.iscsi"
+cwd=$(pwd)
+testdir="/mnt/tgtmpathtest"
+localhost="127.0.0.1"
+portal="${localhost}:3260"
+maxpaths=4
+backfn="backingfile"
+expectwwid="360000000000000000e00000000010001"
+testdisk="/dev/disk/by-id/scsi-${expectwwid}"
+bglog="$AUTOPKGTEST_ARTIFACTS/test-background.log"
+fioprep="$AUTOPKGTEST_ARTIFACTS/path-change-prep.fio"
+fiovrfy="$AUTOPKGTEST_ARTIFACTS/path-change-check.fio"
+
+# Restart tgtd to make sure modules are all loaded
+service tgt restart || echo "Failed to restart tgt" >&2
+
+# prep SINGLE test file
+truncate --size 100M ${backfn}
+
+# create target
+tgtadm --lld iscsi --op new --mode target --tid 1 -T "${targetname}"
+# allow all to bind the target
+tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL
+# set backing file
+tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b 
"${cwd}/${backfn}"
+
+# scan for targets (locally)
+iscsiadm --mode discovery --type sendtargets --portal ${localhost}
+
+# login
+echo "login #1"
+iscsiadm --mode node --targetname "${targetname}" --portal ${portal} --login
+# duplicate this session (always 1)
+for i in $(seq 2 ${maxpaths})
+do
+    echo "extra login #${i}"
+    iscsiadm --mode session -r 1 --op new
+done
+
+udevadm settle
+
+# status summary
+echo "Status after initial setup"
+tgtadm --lld iscsi --mode target --op show
+tgtadm --lld iscsi --op show --mode conn --tid 1
+iscsiadm --mode session -P 1
+lsscsi -liv
+multipath -v3 -ll
+dmsetup table
+
+echo "Test WWN should now point to DM"
+readlink "${testdisk}" | grep dm
+
+# create FS on the mpathed device
+mkfs.ext4 -F "${testdisk}"
+udevadm settle
+sleep 3s
+mkdir -p ${testdir}
+mount "${testdisk}" ${testdir}
+
+# based on /usr/share/doc/fio/examples/surface-scan.fio
+cat << EOF > ${fioprep}
+; writes 512 byte verification blocks until the disk is full,
+; then verifies written data
+[global]
+directory=${testdir}
+thread=1
+bs=64k
+direct=1
+ioengine=sync
+verify=meta
+verify_pattern=0xaa555aa5
+verify_interval=512
+
+[write-phase]
+filename=datafile.tmp   ; or use a full disk, for example /dev/sda
+rw=write
+fill_device=1
+do_verify=0
+EOF
+
+cat << EOF > ${fiovrfy}
+; verifies written data
+[global]
+directory=${testdir}
+thread=1
+bs=64k
+direct=1
+ioengine=sync
+verify=meta
+verify_pattern=0xaa555aa5
+verify_interval=512
+
+[verify-phase]
+stonewall
+create_serialize=0
+filename=datafile.tmp
+rw=read
+do_verify=1
+runtime=180
+time_based
+EOF
+
+# IO Bench with verify
+# prep files
+fio "${fioprep}"
+
+# while verify is running unplud/plug paths as well as restart the daemon
+# Note - we run in a clean env, so we just assume each new session is an 
increment
+# Even with other multipath/scsi devices on the system this is true, jutst no
+# other iscsi logins are allowed - since the test runs under isolation-machine
+# that should be safe.
+# That way we can directly call IDs without huge logic on the session IDs
+echo "Starting the path changes in background"
+(
+    iscsiadm --mode session
+    sleep 10s
+    date +'MP report (expect 4) %H:%M:%S.%N'
+    multipath -ll
+    date +'UN-plug path 1 %H:%M:%S.%N'
+    iscsiadm --mode session -r 1 -u
+    iscsiadm --mode session
+    sleep 10s
+    date +'MP report (expect 3) %H:%M:%S.%N'
+    multipath -ll
+    date +'UN-plug path 2 %H:%M:%S.%N'
+    iscsiadm --mode session -r 2 -u
+    iscsiadm --mode session
+    sleep 10s
+    date +'MP report (expect 2) %H:%M:%S.%N'
+    multipath -ll
+    date +'UN-plug path 3 %H:%M:%S.%N'
+    iscsiadm --mode session -r 3 -u
+    iscsiadm --mode session
+    sleep 10s
+    date +'MP report (expect 1) %H:%M:%S.%N'
+    multipath -ll
+    date +'Add paths 5/6/7/8 %H:%M:%S.%N'
+    iscsiadm --mode session -r 4 --op new
+    iscsiadm --mode session -r 4 --op new
+    iscsiadm --mode session -r 4 --op new
+    iscsiadm --mode session -r 4 --op new
+    iscsiadm --mode session
+    sleep 10s
+    date +'MP report (expect 5) %H:%M:%S.%N'
+    multipath -ll
+    date +'UN-plug multiple paths 4/7/8 %H:%M:%S.%N'
+    iscsiadm --mode session -r 4 -u
+    iscsiadm --mode session -r 7 -u
+    iscsiadm --mode session -r 8 -u
+    iscsiadm --mode session
+    sleep 10s
+    date +'Restart multipath daemon %H:%M:%S.%N'
+    systemctl restart multipathd
+    sleep 10s
+    date +'Final background report (expect 2) %H:%M:%S.%N'
+    multipath -ll
+) > "${bglog}" 2>&1 &
+
+# test I/O with verification of actual content
+# on any I/O error or verification of read data it would fail
+date +'Pre FIO %H:%M:%S.%N'
+fio "${fiovrfy}"
+date +'Post FIO %H:%M:%S.%N'
+
+echo "FIO verify test with changing paths - OK"
+
+echo "Report log of background activity"
+cat "${bglog}"
+
+sync
+umount "${testdisk}"
+
+# report stats - might be useful if checked across various tests that misbehave
+echo "Final stats"
+iscsiadm --mode session --stats
+journalctl --no-pager -u multipathd
+
+echo "Check final path status"
+multipath -ll
+# ensure we have one active and one running path
+diskc=$(multipath -ll | grep --count 'status=')
+diska=$(multipath -ll | grep --count 'status=active')
+diske=$(multipath -ll | grep --count 'status=enabled')
+if [ "${diskc}" -ne "2" -o "${diska}" -ne "1" -o "${diske}" -ne "1" ]; then
+    echo "Error: Not the expected count of active/enabled disks"
+    exit 1
+else
+    echo "OK"
+fi
+
+# logout and target delete should work even after all of this
+iscsiadm --mode node --targetname "${targetname}" --portal "${portal}" --logout
+tgtadm --lld iscsi --op delete --mode logicalunit --tid 1 --lun 1

Reply via email to