failure with utopic level lsblk. should use --output, not --out.

Bug #1386275 reported by Scott Moser
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Fix Released
High
Unassigned
curtin (Ubuntu)
Fix Released
High
Unassigned
Trusty
Fix Released
Medium
Unassigned
Utopic
Fix Released
High
Unassigned
Vivid
Fix Released
High
Unassigned

Bug Description

=== Begin SRU Information ===
[Impact]
curtin install if util-linux is at utopic version or later.

The problem is that curtin's '_lsblock' which is used to get invoke lsblock to
get information about the block devices of the system used '--out=' to specify
the output format rather than '--output'. In utopic the version of util-linux
contains a lsblock with '--output-all' flag, which made '--output' ambiguous
and the command would fail.

The fix is then straight forward and is to just use '--output=' rather than
'--out='. I'm not sure where the usage of '--out' came from as versions
of util-linux back to 12.04 support '--output'.

[Test Case]
$ sudo apt-get update -qy && apt-get install -qy python-curtin
$ dpkg-query --show python-curtin util-linux
python-curtin 0.1.0~bzr190-0ubuntu1
util-linux 2.25.1-3ubuntu4
$ python -c 'from curtin import block; import pprint; pprint.pprint(block._lsblock())'

Result currently is stack trace on utopic.
Success is a pretty printed dictionary of 'lsblk' information like:
{
 'vdb1': {'ALIGNMENT': '0',
          'DISC-ALN': '0',
          'DISC-GRAN': '0',
 ..
          'UUID': '',
          'device_path': '/dev/vdb1'}}
}

=== End SRU Information ===

$ dpkg-query --show curtin python-curtin util-linux
curtin 0.1.0~bzr190-0ubuntu1
python-curtin 0.1.0~bzr190-0ubuntu1
util-linux 2.25.1-3ubuntu4

$ sudo curtin --showtrace install http://cloud-images.ubuntu.com/utopic/current/utopic-server-cloudimg-amd64-root.tar.gz

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/curtin/commands/main.py", line 96, in main
    sys.exit(args.func(args))
  File "/usr/lib/python2.7/dist-packages/curtin/commands/block_meta.py", line 53, in block_meta
    meta_simple(args)
  File "/usr/lib/python2.7/dist-packages/curtin/commands/block_meta.py", line 150, in meta_simple
    devices = block.get_installable_blockdevs()
  File "/usr/lib/python2.7/dist-packages/curtin/block/__init__.py", line 118, in get_installable_blockdevs
    unused = get_unused_blockdev_info()
  File "/usr/lib/python2.7/dist-packages/curtin/block/__init__.py", line 81, in get_unused_blockdev_info
    bdinfo = _lsblock(['--nodeps'])
  File "/usr/lib/python2.7/dist-packages/curtin/block/__init__.py", line 70, in _lsblock
    (out, _err) = util.subp(basecmd + list(args), capture=True)
  File "/usr/lib/python2.7/dist-packages/curtin/util.py", line 67, in subp
    cmd=args)
ProcessExecutionError: Unexpected error while running command.
Command: ['lsblk', '--noheadings', '--bytes', '--pairs', '--out=ALIGNMENT,DISC-ALN,DISC-GRAN,DISC-MAX,DISC-ZERO,FSTYPE,GROUP,KNAME,LABEL,LOG-SEC,MAJ:MIN,MIN-IO,MODE,MODEL,MOUNTPOINT,NAME,OPT-IO,OWNER,PHY-SEC,RM,RO,ROTA,RQ-SIZE,SIZE,STATE,TYPE,UUID', '--nodeps']
Exit code: 1
...
is ambiguous; possibilities: \'--output\' \'--output-all\'\n\nUsage:\n lsblk [options] [<device> ...]\n\nOptions:\n -a, --all

basically, util-linux's lsblk gained a '--output-all' argument, which made our use of '--out' ambiguous. Note, back to 12.04 supports --output per http://manpages.ubuntu.com/manpages/precise/en/man8/lsblk.8.html .
not sure why I used '--out'.

Scott Moser (smoser)
Changed in curtin (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in curtin:
status: New → Confirmed
importance: Undecided → High
Scott Moser (smoser)
Changed in curtin (Ubuntu Trusty):
status: New → Confirmed
Changed in curtin (Ubuntu Utopic):
status: New → Confirmed
Changed in curtin (Ubuntu Trusty):
importance: Undecided → High
Changed in curtin (Ubuntu Utopic):
importance: Undecided → High
Changed in curtin (Ubuntu Trusty):
importance: High → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package curtin - 0.1.0~bzr195-0ubuntu1

---------------
curtin (0.1.0~bzr195-0ubuntu1) vivid; urgency=medium

  * New upstream snapshot.
    * move install log from /var/log/curtin_install.log to
      /var/log/curtin/install.log (LP: #1378910)
    * to not use '--acl' when extracting tar files (LP: #1382632)
      as it inadvertently writes default directory acls.
    * invoke lsblk with '--output' rather than '--out' to avoid
      ambiguity in newer versions of lsblk (LP: #1386275)
 -- Scott Moser <email address hidden> Mon, 27 Oct 2014 12:25:27 -0400

Changed in curtin (Ubuntu Vivid):
status: Confirmed → Fix Released
Scott Moser (smoser)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Scott, or anyone else affected,

Accepted curtin into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/curtin/0.1.0~bzr195-0ubuntu1~14.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in curtin (Ubuntu Trusty):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Scott, or anyone else affected,

Accepted curtin into utopic-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/curtin/0.1.0~bzr195-0ubuntu1~14.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in curtin (Ubuntu Utopic):
status: Confirmed → Fix Committed
Revision history for this message
Andres Rodriguez (andreserl) wrote :

This has been tested and works as expcted. Marking verification-done

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package curtin - 0.1.0~bzr195-0ubuntu1~14.10.1

---------------
curtin (0.1.0~bzr195-0ubuntu1~14.10.1) utopic-proposed; urgency=medium

  * New upstream snapshot / sync to vivid version.
    - move install log from /var/log/curtin_install.log to
      /var/log/curtin/install.log (LP: #1378910)
    - to not use '--acl' when extracting tar files (LP: #1382632)
      as it inadvertently writes default directory acls.
    - invoke lsblk with '--output' rather than '--out' to avoid
      ambiguity in newer versions of lsblk (LP: #1386275)
 -- Scott Moser <email address hidden> Mon, 27 Oct 2014 13:08:50 -0400

Changed in curtin (Ubuntu Utopic):
status: Fix Committed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of the Stable Release Update for curtin has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package curtin - 0.1.0~bzr195-0ubuntu1~14.04.1

---------------
curtin (0.1.0~bzr195-0ubuntu1~14.04.1) trusty-proposed; urgency=medium

  * New upstream snapshot.
    - hardware enablement: ppc64 support (LP: #1386394)
    - hardware enablement: know kernel mapping for utopic (hwe-u = 3.16)
      (LP: #1386394)
    - feature: support installing disk images including windows. (LP: #1386394)
    - feature: support creating swap file (LP: #1386394)
    - feature: support reporting logs back to MAAS (LP: #1386394)
    - feature: enable logging of installation to /var/log/curtin/install.log
      (LP: #1378910)
    - bug fix: extract tar files with xattr support when available (LP: #1313550)
    - bug fix: fix broken use of os.path.join for curtin hooks (LP: #1328521)
    - bug fix: util.subp to decode command output as utf-8 (LP: #1370249).
    - bug fix: call update-grub to ensure that /boot/grub/grub.cfg is created
      (LP: #1373137)
    - bug fix: do not use '--acl' when extracting tar files (LP: #1382632)
      as it inadvertently writes default directory acls.
    - bug fix: invoke lsblk with '--output' rather than '--out' to avoid
      ambiguity in newer versions of lsblk (LP: #1386275)
    - internal: part2bd helper added in helpers/common
    - internal: helpers: inherit curtin_verbosity (make the helper tools
      verbose if curtin invoked with verbose flags)
 -- Scott Moser <email address hidden> Mon, 27 Oct 2014 20:58:43 -0400

Changed in curtin (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Scott, or anyone else affected,

Accepted curtin into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/curtin/0.1.0~bzr221-0ubuntu1~14.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-done
tags: added: verification-needed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Scott, or anyone else affected,

Accepted curtin into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/curtin/0.1.0~bzr221-0ubuntu1~14.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Scott Moser (smoser)
tags: added: verification-done
removed: verification-needed
Changed in curtin:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.