Merge lp:~serge-hallyn/ubuntu/maverick/multipath-tools/backport-fixes into lp:ubuntu/maverick/multipath-tools

Proposed by Serge Hallyn
Status: Needs review
Proposed branch: lp:~serge-hallyn/ubuntu/maverick/multipath-tools/backport-fixes
Merge into: lp:ubuntu/maverick/multipath-tools
Diff against target: 134 lines (+88/-1)
5 files modified
debian/changelog (+29/-0)
debian/initramfs/local-top (+10/-0)
debian/kpartx.udev (+1/-1)
debian/patches/1002--Fix-for-uevent-devpath-handling.patch (+47/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~serge-hallyn/ubuntu/maverick/multipath-tools/backport-fixes
Reviewer Review Type Date Requested Status
Chuck Short (community) Needs Fixing
Review via email: mp+45187@code.launchpad.net

Description of the change

These fixes are needed in lucid and maverick. I've done a separate merge request of the more uptodate Debian experimental package for natty, which is why I'm not requesting this be merged for natty first.

        a. device map not ready before root mount (use bug 686832)
        b. modprobe -q not -Q (#644481)
        c. fix pathnames in uevents (#660597)
        d. scsi_wait_scan needed

I suspect I need to create a separate SRU with targeted debdiffs for each one, but am hoping there is a way to do it from the bzr tree.

To post a comment you must log in.
Revision history for this message
Chuck Short (zulcss) wrote :

If this is for an SRU in maverick, then the changelog probably needs to be collapsed into one entry and the release have to be maverick-propsed and the version has to be ubuntu4.1

review: Needs Fixing

Unmerged revisions

38. By Serge Hallyn

Have the initramfs/local-top script use the scsi_wait_scan module to
make sure all LUNs are found before we proceed.

37. By Serge Hallyn

Add patch to fix the expected pathname from multipath uevents
(LP: #660597)

36. By Serge Hallyn

* Fix in debian/kpartx.udev:
    - modprobe -q instead of incorrect modprobe -Q (LP: #644481)

35. By Serge Hallyn

Make the initramfs local-top script wait until all devices
are mapped, to make sure no /dev/sdget mounted before
multipath has a chance to take it. (LP: #686832)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-03-08 14:50:04 +0000
3+++ debian/changelog 2011-01-04 22:42:18 +0000
4@@ -1,3 +1,32 @@
5+multipath-tools (0.4.8-14ubuntu8) natty; urgency=low
6+
7+ * Have the initramfs/local-top script use the scsi_wait_scan module to
8+ make sure all LUNs are found before we proceed.
9+
10+ -- Serge Hallyn <serge.hallyn@ubuntu.com> Tue, 04 Jan 2011 16:34:56 -0600
11+
12+multipath-tools (0.4.8-14ubuntu7) natty; urgency=low
13+
14+ * Add patch to fix the expected pathname from multipath uevents
15+ (LP: #660597)
16+
17+ -- Serge Hallyn <serge.hallyn@ubuntu.com> Tue, 04 Jan 2011 16:06:29 -0600
18+
19+multipath-tools (0.4.8-14ubuntu6) maverick; urgency=low
20+
21+ * Fix in debian/kpartx.udev:
22+ - modprobe -q instead of incorrect modprobe -Q (LP: #644481)
23+
24+ -- Serge Hallyn <serge.hallyn@ubuntu.com> Tue, 04 Jan 2011 15:58:13 -0600
25+
26+multipath-tools (0.4.8-14ubuntu5) maverick; urgency=low
27+
28+ * Make the initramfs local-top script wait until all devices
29+ are mapped, to make sure no /dev/sd* get mounted before
30+ multipath has a chance to take it. (LP: #686832)
31+
32+ -- Serge Hallyn <serge.hallyn@ubuntu.com> Tue, 04 Jan 2011 15:55:48 -0600
33+
34 multipath-tools (0.4.8-14ubuntu4) lucid; urgency=low
35
36 * debian/control: Move libreadline5-dev build dependency to libreadline-dev.
37
38=== modified file 'debian/initramfs/local-top'
39--- debian/initramfs/local-top 2009-02-12 15:07:42 +0000
40+++ debian/initramfs/local-top 2011-01-04 22:42:18 +0000
41@@ -21,9 +21,19 @@
42 modprobe -q dm-multipath
43 modprobe -q dm-emc
44
45+# Sync waiting for storage.
46+{ rmmod scsi_wait_scan ; modprobe scsi_wait_scan ; rmmod scsi_wait_scan ; } >/dev/null 2>&1
47+
48 echo "Discovering multipaths..."
49
50 /sbin/multipath -v $VERBOSITY
51
52+if [ -x /sbin/kpartx ]; then
53+ /sbin/dmsetup ls --target multipath --exec "/sbin/kpartx -a -p p" >/dev/null
54+fi
55+udevadm settle
56+
57+echo "Completed (discovering multipaths)."
58+
59 exit 0
60
61
62=== modified file 'debian/kpartx.udev'
63--- debian/kpartx.udev 2009-03-10 11:54:01 +0000
64+++ debian/kpartx.udev 2011-01-04 22:42:18 +0000
65@@ -7,7 +7,7 @@
66 # Always attempt to load dm-multipath. This way we can get rid of the
67 # init script.
68 ACTION=="add|change", SUBSYSTEM=="block", \
69- RUN+="/sbin/modprobe -Qba dm-multipath"
70+ RUN+="/sbin/modprobe -qba dm-multipath"
71
72 KERNEL!="dm-*", GOTO="kpartx_end"
73 ACTION=="remove", GOTO="kpartx_end"
74
75=== added file 'debian/patches/1002--Fix-for-uevent-devpath-handling.patch'
76--- debian/patches/1002--Fix-for-uevent-devpath-handling.patch 1970-01-01 00:00:00 +0000
77+++ debian/patches/1002--Fix-for-uevent-devpath-handling.patch 2011-01-04 22:42:18 +0000
78@@ -0,0 +1,47 @@
79+commit 7fa7affc3d23dd9dc906804d22a61144bca9f9b9
80+Author: Benjamin Marzinski <bmarzins@redhat.com>
81+Date: Thu Dec 11 16:03:28 2008 -0600
82+
83+ Fix for uevent devpath handling
84+
85+ This is necessary to make uevents work on fedora, since devpath appears as
86+ something like:
87+ '/devices/pci0000:00/0000:00:0a.0/0000:06:00.0/host11/rport-11:0-1/target11:0:1/11:0:1:0/block/sdi'
88+
89+ It simply strips off the everything up to the /block.
90+
91+ [ also pull in trivial fix of potential stack overflow,
92+ commit 15d4bdddcb9b71e0ec6fecc3c37a1b8cae8f51ff, by making
93+ a and b length 11 not 10 ]
94+
95+ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
96+
97+Index: delme1/multipathd/main.c
98+===================================================================
99+--- delme1.orig/multipathd/main.c 2011-01-04 16:00:58.936899000 -0600
100++++ delme1/multipathd/main.c 2011-01-04 16:03:04.783628002 -0600
101+@@ -615,14 +615,20 @@
102+ static int
103+ uev_discard(char * devpath)
104+ {
105+- char a[10], b[10];
106++ char *tmp;
107++ char a[11], b[11];
108+
109+ /*
110+ * keep only block devices, discard partitions
111+ */
112+- if (sscanf(devpath, "/block/%10s", a) != 1 ||
113+- sscanf(devpath, "/block/%10[^/]/%10s", a, b) == 2) {
114+- condlog(4, "discard event on %s", devpath);
115++ tmp = strstr(devpath, "/block/");
116++ if (tmp == NULL){
117++ condlog(0, "no /block/ in '%s'", devpath);
118++ return 1;
119++ }
120++ if (sscanf(tmp, "/block/%10s", a) != 1 ||
121++ sscanf(tmp, "/block/%10[^/]/%10s", a, b) == 2) {
122++ condlog(0, "discard event on %s", devpath);
123+ return 1;
124+ }
125+ return 0;
126
127=== modified file 'debian/patches/series'
128--- debian/patches/series 2010-02-12 11:52:22 +0000
129+++ debian/patches/series 2011-01-04 22:42:18 +0000
130@@ -12,3 +12,4 @@
131 0012--libmultipath-Update-discovery-to-work-with-new-sys.patch
132 1000--set-umask-in-multipathd.patch
133 1001--intel-mpath-prio-alua.patch
134+1002--Fix-for-uevent-devpath-handling.patch

Subscribers

People subscribed via source and target branches

to all changes: