mount-image-callback getopt short_options misconfigured

Bug #1604011 reported by Ryan Harper on 2016-07-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ryan Harper
cloud-utils (Ubuntu)

Bug Description

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

2. $ apt-cache policy cloud-image-utils
  Installed: 0.27-0ubuntu24
  Candidate: 0.27-0ubuntu24
  Version table:
 *** 0.27-0ubuntu24 500
        500 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
 PATH=(custom, no user)
ProcLoadAvg: 0.03 0.10 0.15 1/2778 3225
 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

Ryan Harper (raharper) wrote :
Ryan Harper (raharper) wrote :
Scott Moser (smoser) on 2016-07-18
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
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)
Scott Moser (smoser) wrote :

well, revno 295, but close enough.

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
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
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  Edit
Everyone can see this information.

Other bug subscribers