mount-image-callback getopt short_options misconfigured

Bug #1604011 reported by Ryan Harper
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-utils
Fix Released
Medium
Ryan Harper
cloud-utils (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

1. % lsb_release -rd
Description: Ubuntu 16.04 LTS
Release: 16.04

2. $ apt-cache policy cloud-image-utils
cloud-image-utils:
  Installed: 0.27-0ubuntu24
  Candidate: 0.27-0ubuntu24
  Version table:
 *** 0.27-0ubuntu24 500
        500 http://ports.ubuntu.com/ubuntu-ports xenial/main ppc64el Packages
        100 /var/lib/dpkg/status

3. mount-image-callback should chroot into the second partition of the image with this command:

mount-image-callback -P2 install_disk.img chroot _MOUNTPOINT_ /bin/bash

4. mount-image-callback fails to chroot into the second partition:

mount-image-callback: invalid option -- '2'

It looks like the short_opts passed to get_opt are incomplete: One options (overlay) is missing, and two options (mount) and (partition) are missing indicators that they accept inputs (: after the short option name).

One can workaround this by using --partition=X but the short options should work.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: cloud-image-utils 0.27-0ubuntu24
ProcVersionSignature: User Name 4.4.0-24.43-generic 4.4.10
Uname: Linux 4.4.0-24-generic ppc64le
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: ppc64el
Date: Mon Jul 18 13:46:19 2016
PackageArchitecture: all
ProcEnviron:
 TERM=screen
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcLoadAvg: 0.03 0.10 0.15 1/2778 3225
ProcSwaps:
 Filename Type Size Used Priority
 /swap.img file 8388544 0 -1
ProcVersion: Linux version 4.4.0-24-generic (buildd@bos01-ppc64el-023) (gcc version 5.3.1 20160413 (User Name/IBM 5.3.1-14ubuntu2.1) ) #43-User Name SMP Wed Jun 8 19:25:36 UTC 2016
SourcePackage: cloud-utils
UpgradeStatus: No upgrade log present (probably fresh install)
cpu_cores: Number of cores present = 20
cpu_coreson: Number of cores online = 20
cpu_smt: SMT is off

Related branches

Revision history for this message
Ryan Harper (raharper) wrote :
Revision history for this message
Ryan Harper (raharper) wrote :
Scott Moser (smoser)
Changed in cloud-utils:
status: New → Confirmed
Changed in cloud-utils (Ubuntu):
status: New → Confirmed
Changed in cloud-utils:
importance: Undecided → Medium
Changed in cloud-utils (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Scott Moser (smoser) wrote :

fixed in revno 296

Changed in cloud-utils:
assignee: nobody → Scott Moser (smoser)
status: Confirmed → Fix Committed
assignee: Scott Moser (smoser) → Ryan Harper (raharper)
Revision history for this message
Scott Moser (smoser) wrote :

well, revno 295, but close enough.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix-lp1604011.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

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

This bug was fixed in the package cloud-utils - 0.29-0ubuntu2

---------------
cloud-utils (0.29-0ubuntu2) yakkety; urgency=medium

  * bin/ubuntu-cloudimg-query: fix xenial default to be ebs-ssd
    as traditional ebs are no longer available. (LP: #1593451)

  [Ryan Harper]
  * bin/mount-image-callback: fix shortopt parsing (LP: #1604011)

 -- Scott Moser <email address hidden> Mon, 18 Jul 2016 10:48:38 -0400

Changed in cloud-utils (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote :

this is fixed in cloud-utils 0.30

Changed in cloud-utils:
status: Fix Committed → 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.