Activity log for bug #1524031

Date Who What changed Old value New value Message
2015-12-08 18:17:02 Ryan Harper bug added bug
2015-12-09 18:37:58 Scott Moser curtin: status New Confirmed
2015-12-09 18:38:01 Scott Moser curtin: importance Undecided Medium
2016-06-04 00:20:59 Wesley Wiedenmeier bug added subscriber Wesley Wiedenmeier
2016-06-06 14:59:41 Wesley Wiedenmeier branch linked lp:~wesley-wiedenmeier/curtin/trusty-preserve
2016-07-29 15:25:34 Launchpad Janitor branch linked lp:curtin
2016-07-30 05:46:35 Wesley Wiedenmeier curtin: status Confirmed 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:04:12 Ryan Harper description On a trusty host, this storage configuration breaks: storage: version: 1 config: - id: vdg model: Unknown Model preserve: true ptable: gpt serial: 64bddb21-61f3-4869-8 type: disk wipe: superblock like this: Running command ['partprobe', '/dev/vdg'] with allowed return codes [0, 1] (shell=False, capture=False) Running command ['udevadm', 'settle'] with allowed return codes [0] (shell=False, capture=False) Running command ['blkid', '-o', 'export', '/dev/vdg'] with allowed return codes [0] (shell=False, capture=True) An error occured handling 'vdg': IndexError - list index out of range Traceback (most recent call last): File "/usr/lib/python3/dist-packages/curtin/commands/main.py", line 208, in main ret = args.func(args) File "/usr/lib/python3/dist-packages/curtin/commands/block_meta.py", line 63, in block_meta meta_custom(args) File "/usr/lib/python3/dist-packages/curtin/commands/block_meta.py", line 1208, in meta_custom handler(command, storage_config_dict) File "/usr/lib/python3/dist-packages/curtin/commands/block_meta.py", line 530, in disk_handler out.splitlines()))[0].split("=")[-1] IndexError: list index out of range list index out of range From this code here: # Check state of current ptable try: (out, _err) = util.subp(["blkid", "-o", "export", disk], capture=True) except util.ProcessExecutionError: raise ValueError("disk '%s' has no readable partition table or \ cannot be accessed, but preserve is set to true, so cannot \ continue") current_ptable = list(filter(lambda x: "PTTYPE" in x, out.splitlines()))[0].split("=")[-1] And the output of blkid -o export /dev/vdg on trusty instance is: # blkid -o export /dev/vdg UUID=ef30955b-8aa0-453f-a37d-d631a09a6f7c UUID_SUB=9a21ae23-6f14-405d-9e9a-8955855132d5 TYPE=btrfs [Impact] * On a Trusty host, if users enable storage disk preserve feature, the use of blkid expects PTTYPE value in the output, however, this is not present in Trusty blkid output. This prevents Trusty hosts from preserving existing partitions. Curtin has been updated to fallback to using parted to determine how to preserve existing partitions on disks when directed. [Test Case] * Install proposed curtin package and deploy in a Trusty ephemeral environment with the following storage configuration: storage: version: 1 config: - id: vdg model: Unknown Model preserve: true ptable: gpt serial: 64bddb21-61f3-4869-8 type: disk wipe: superblock PASS: Successfully deploy image while preserving the original partition table. FAIL: Deployment fails with the following error: line 530, in disk_handler out.splitlines()))[0].split("=")[-1] IndexError: list index out of range list index out of range [Regression Potential] * No known other failures when using parted as replacement for blkid partition data. [Original Description] On a trusty host, this storage configuration breaks: storage:   version: 1   config:     - id: vdg       model: Unknown Model       preserve: true       ptable: gpt       serial: 64bddb21-61f3-4869-8       type: disk       wipe: superblock like this: Running command ['partprobe', '/dev/vdg'] with allowed return codes [0, 1] (shell=False, capture=False) Running command ['udevadm', 'settle'] with allowed return codes [0] (shell=False, capture=False) Running command ['blkid', '-o', 'export', '/dev/vdg'] with allowed return codes [0] (shell=False, capture=True) An error occured handling 'vdg': IndexError - list index out of range Traceback (most recent call last):   File "/usr/lib/python3/dist-packages/curtin/commands/main.py", line 208, in main     ret = args.func(args)   File "/usr/lib/python3/dist-packages/curtin/commands/block_meta.py", line 63, in block_meta     meta_custom(args)   File "/usr/lib/python3/dist-packages/curtin/commands/block_meta.py", line 1208, in meta_custom     handler(command, storage_config_dict)   File "/usr/lib/python3/dist-packages/curtin/commands/block_meta.py", line 530, in disk_handler     out.splitlines()))[0].split("=")[-1] IndexError: list index out of range list index out of range From this code here:         # Check state of current ptable         try:             (out, _err) = util.subp(["blkid", "-o", "export", disk],                                     capture=True)         except util.ProcessExecutionError:             raise ValueError("disk '%s' has no readable partition table or \                 cannot be accessed, but preserve is set to true, so cannot \                 continue")         current_ptable = list(filter(lambda x: "PTTYPE" in x,                                      out.splitlines()))[0].split("=")[-1] And the output of blkid -o export /dev/vdg on trusty instance is: # blkid -o export /dev/vdg UUID=ef30955b-8aa0-453f-a37d-d631a09a6f7c UUID_SUB=9a21ae23-6f14-405d-9e9a-8955855132d5 TYPE=btrfs
2016-10-05 15:38:39 Andy Whitcroft bug added subscriber Ubuntu Stable Release Updates Team
2016-10-05 15:38:44 Andy Whitcroft bug added subscriber SRU Verification
2016-10-05 15:38:49 Andy Whitcroft tags verification-needed
2016-10-05 15:42:49 Andy Whitcroft bug task added curtin (Ubuntu)
2016-10-05 15:43:02 Andy Whitcroft nominated for series Ubuntu Xenial
2016-10-05 15:43:02 Andy Whitcroft bug task added curtin (Ubuntu Xenial)
2016-10-05 15:49:46 Andy Whitcroft curtin (Ubuntu): status New Fix Released
2016-10-05 15:49:51 Andy Whitcroft curtin (Ubuntu Xenial): status New Fix Committed
2016-10-06 21:48:41 Ryan Harper 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:32 Martin Pitt removed subscriber Ubuntu Stable Release Updates Team
2017-12-15 22:09:59 Scott Moser curtin: status Fix Committed Fix Released