Got it.
The regression on the dialog is not a problem in the attached patch.
It's actually hit because the attached patch uncovered another problem, again
related to bug 1424734 (different multipath disk-partition separators / 'p' vs
'-part').
This probably requires another patch or discussion for the behavior described
below.
The regression was that, after the partman confirmation dialog
("confirm_changes partman", in /bin/partman), rather then proceeding to
the formatting stage, the installer goes back to the partitioning
dialog.
It's caused because the /lib/partman/commit.d/31multipath_partition
script is now exiting with non-zero exit code, making /bin/partman stop
processing the other scripts in commit.d/, including the formatting
ones.
The non-zero exit code comes from a kpartx command, that fails due to
the different disk-partition separators (see bug 1424734), yielding a
'device busy' error in syslog.
If the attached patch is not in place, this non-zero exit code is supressed by
other (incorrect) iterations of the for loop..
Other partman's /device/ dirs are created for each /partition/ (which is
incorrect).
Then, the for loop just goes over the failed kpartx command, and that non-zero
exit code is forgotten.
One can observe that with the trace of
/lib/partman/commit.d/31multipath_partition.
(add "set -x; exec 2>/31multipath_partitions.stderr" before the for-loop, and
'exit $?' after it)
Check that the for-loop goes over the kpartx error when there are devices for
each mpath0 partition (mpath0p1, mpath0p2 and mpath0p3).. but exits with the
error when they're not there anymore (as that's the last iteration in the
for-loop)
Without the patch:
~ # cat /31partition_multipath.stderr
+ [ -d /var/lib/partman/devices/=dev=mapper=mpath0 ]
+ cd /var/lib/partman/devices/=dev=mapper=mpath0
+ [ -f device ]
+ [ -f multipath ]
+ cat device
+ kpartx -d -p -part /dev/mapper/mpath0
+ cat device
+ kpartx -a -p -part /dev/mapper/mpath0
device-mapper: create ioctl on mpath0-part1 failed: Device or resource
busy
create/reload failed on mpath0-part1
device-mapper: create ioctl on mpath0-part2 failed: Device or resource
busy
create/reload failed on mpath0-part2
device-mapper: create ioctl on mpath0-part3 failed: Device or resource
busy
create/reload failed on mpath0-part3
+ [ -d /var/lib/partman/devices/=dev=mapper=mpath0p1 ]
+ cd /var/lib/partman/devices/=dev=mapper=mpath0p1
+ [ -f device ]
+ [ -f multipath ]
+ continue
+ [ -d /var/lib/partman/devices/=dev=mapper=mpath0p2 ]
+ cd /var/lib/partman/devices/=dev=mapper=mpath0p2
+ [ -f device ]
+ [ -f multipath ]
+ continue
+ [ -d /var/lib/partman/devices/=dev=mapper=mpath0p3 ]
+ cd /var/lib/partman/devices/=dev=mapper=mpath0p3
+ [ -f device ]
+ [ -f multipath ]
+ continue
+ exit 0
With the patch:
~ # cat /31partition_multipath.stderr
+ [ -d /var/lib/partman/devices/=dev=mapper=mpath0 ]
+ cd /var/lib/partman/devices/=dev=mapper=mpath0
+ [ -f device ]
+ [ -f multipath ]
+ cat device
+ kpartx -d -p -part /dev/mapper/mpath0
+ cat device
+ kpartx -a -p -part /dev/mapper/mpath0
device-mapper: create ioctl on mpath0-part1 failed: Device or resource
busy
create/reload failed on mpath0-part1
device-mapper: create ioctl on mpath0-part2 failed: Device or resource
busy
create/reload failed on mpath0-part2
device-mapper: create ioctl on mpath0-part3 failed: Device or resource
busy
create/reload failed on mpath0-part3
+ exit 3
So, we can either append an 'exit 0' to the
/lib/partman/commit.d/31multipath_partition script (because it seems
that kpartx failures can be safely ignored if there are other devices to
check).. or wait until the more general multipath disk-partition
separator issue is resolved.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1425153
Title:
Do not list block-devices/partitions that are part of multipath
devices for partitioning
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/partman-base/+bug/1425153/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs