Activity log for bug #1598310

Date Who What changed Old value New value Message
2016-07-01 21:45:38 Wesley Wiedenmeier bug added bug
2016-07-02 16:57:27 Wesley Wiedenmeier branch linked lp:~wesley-wiedenmeier/curtin/1598310
2016-07-30 02:06:53 Launchpad Janitor branch linked lp:curtin
2016-07-30 05:46:08 Wesley Wiedenmeier curtin: status New Fix Committed
2016-09-29 18:05:15 Launchpad Janitor branch linked lp:~smoser/ubuntu/yakkety/curtin/pkg
2016-10-03 18:52:23 Launchpad Janitor branch linked lp:~raharper/ubuntu/xenial/curtin/pkg-sru-revno425
2016-10-03 21:14:43 Ryan Harper description The function curtin.get_blockdev_sector_size will not work when called with a devpath which lsblk will return multiple lines of results for. This means that in some cases formatting a device other than a partition may fail, because block.mkfs checks for logical block size using this function. For example: Python 3.5.1+ (default, Mar 30 2016, 22:46:26) [GCC 5.3.1 20160330] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from curtin import block >>> block.get_blockdev_sector_size('/dev/sda1') (512, 512) >>> block.get_blockdev_sector_size('/dev/sda5') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/magicanus/code/curtin-clean/curtin/curtin/block/__init__.py", line 426, in get_blockdev_sector_size [parent] = info ValueError: too many values to unpack (expected 1) >>> block.get_blockdev_sector_size('/dev/sda') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/magicanus/code/curtin-clean/curtin/curtin/block/__init__.py", line 426, in get_blockdev_sector_size [parent] = info ValueError: too many values to unpack (expected 1) [Impact] * Curtin block module method `get_blockdev_sector_size` fails when pointed at a device with multiple partitions instead of only a partition. Curtin has been updated to filter the results to find the expected device path and return results for that device. [Test Case] * Install proposed curtin package on a system with a block device with multiple partitions. - python3 -c 'from curtin import block; block.get_blockdev_sector_size("/dev/sda")' PASS: method call returns tuple with values - (512, 512) FAIL: method call fails with stacktrace like - Traceback (most recent call last): File "<stdin>", line 1, in <module> File "curtin/curtin/block/__init__.py", line 426, in get_blockdev_sector_size [parent] = info ValueError: too many values to unpack (expected 1) [Regression Potential] * Third-party consumers of curtin modules may have relied on this failure to detect devices which contained partitions. [Original Description] The function curtin.get_blockdev_sector_size will not work when called with a devpath which lsblk will return multiple lines of results for. This means that in some cases formatting a device other than a partition may fail, because block.mkfs checks for logical block size using this function. For example: Python 3.5.1+ (default, Mar 30 2016, 22:46:26) [GCC 5.3.1 20160330] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from curtin import block >>> block.get_blockdev_sector_size('/dev/sda1') (512, 512) >>> block.get_blockdev_sector_size('/dev/sda5') Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "/home/magicanus/code/curtin-clean/curtin/curtin/block/__init__.py", line 426, in get_blockdev_sector_size     [parent] = info ValueError: too many values to unpack (expected 1) >>> block.get_blockdev_sector_size('/dev/sda') Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "/home/magicanus/code/curtin-clean/curtin/curtin/block/__init__.py", line 426, in get_blockdev_sector_size     [parent] = info ValueError: too many values to unpack (expected 1)
2016-10-05 15:40:01 Andy Whitcroft bug added subscriber Ubuntu Stable Release Updates Team
2016-10-05 15:40:03 Andy Whitcroft bug added subscriber SRU Verification
2016-10-05 15:40:09 Andy Whitcroft tags verification-needed
2016-10-05 15:46:40 Andy Whitcroft bug task added curtin (Ubuntu)
2016-10-05 15:46:49 Andy Whitcroft nominated for series Ubuntu Xenial
2016-10-05 15:46:49 Andy Whitcroft bug task added curtin (Ubuntu Xenial)
2016-10-05 15:50:36 Andy Whitcroft curtin (Ubuntu): status New Fix Released
2016-10-05 15:50:39 Andy Whitcroft curtin (Ubuntu Xenial): status New Fix Committed
2016-10-07 05:32:06 Wesley Wiedenmeier tags verification-needed verification-done
2016-10-17 03:58:02 Launchpad Janitor curtin (Ubuntu Xenial): status Fix Committed Fix Released
2016-10-17 03:58:50 Martin Pitt removed subscriber Ubuntu Stable Release Updates Team
2017-12-15 22:10:46 Scott Moser curtin: status Fix Committed Fix Released