tools/maas2roottar doesn't exit non-zero if mount-image-callback is not installed

Bug #1466099 reported by Ryan Harper on 2015-06-17
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Low
Unassigned
curtin (Ubuntu)
Low
Unassigned
Trusty
Low
Unassigned
Vivid
Low
Unassigned

Bug Description

I'm using maas2roottar to unpack the maas image in a script like so:

       curtin/tools/maas2roottar $ephimg $roottar
        [ "$?" != "0" ] && {
            log "ERROR: Failed to convert ephemeral to roottar";
            return 1;
        }

But on a system that didn't have mount-image-callback from cloud-image-utils package, maas2roottar did not exit zero:

 /home/adam/download/curtin/tools/maas2roottar /home/adam/download/maas/daily/wily/amd64/20150612/root-image.gz /home/adam/download/maas/daily/wily/amd64/20150612/root.tar.gz
sudo: mount-image-callback: command not found
+ '[' 0 '!=' 0 ']'

looking at the call in maas2roottar; it just needs a check on the return code of mount-image-callback

    $sudo mount-image-callback "$img" -- "$0" create-tgz \
        ${vflags} "${pt[@]}" _MOUNTPOINT_ "$output"

1. % lsb_release -rd
Description: Ubuntu 14.04.2 LTS
Release: 14.04

2. % bzr info
Standalone tree (format: 2a)
Location:
  branch root: .

Related branches:
  parent branch: bzr+ssh://bazaar.launchpad.net/+branch/curtin/
(foudres) curtin % bzr revno
214

3. maas2roottar return non-zero if mount-image-callback command is not available

4. maas2roottar did not exit non-zero on system witout mount-image-callback installed.

Scott Moser (smoser) on 2015-07-07
no longer affects: curtin (Ubuntu)
Scott Moser (smoser) wrote :

fixed in trunk at 223.
I removed the ubuntu task as this program is not shipped in the package so its not really a bug against ubuntu.

Changed in curtin:
status: New → Fix Committed

Hello Ryan, 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~bzr227-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: added: verification-needed
Changed in curtin (Ubuntu):
status: New → Fix Released
Changed in curtin (Ubuntu Trusty):
status: New → Fix Committed
Changed in curtin (Ubuntu Vivid):
status: New → Fix Committed
Chris J Arges (arges) wrote :

Hello Ryan, 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~bzr227-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) on 2015-12-09
Changed in curtin:
importance: Undecided → Low
Changed in curtin (Ubuntu):
importance: Undecided → Low
Changed in curtin (Ubuntu Trusty):
importance: Undecided → Low
Changed in curtin (Ubuntu Vivid):
importance: Undecided → Low

The fix for this bug has been awaiting testing feedback in the -proposed repository for trusty for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Bartosz Kosiorek (gang65) wrote :

After apply the fix it is working perfectly for my Trusty and Vivid machine

tags: added: verification-done
removed: removal-candidate verification-needed
Launchpad Janitor (janitor) wrote :

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

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

  * New upstream snapshot.
    - fix uefi install path on nvme devices (LP: #1471928)
    - tools/maas2roottar: (development only tool) exit failure when missing
      dependency (LP: #1466099).
    - partition: leave space for secondary gpt header when creating mbr disks.
    - partition: when a second partition is created, assert its existance.
    - partition: when second partition is created, wipe fs info.
    - kernel command line: prefer the --- over -- to indicate that subsequent
      arguments should be copied to installed system. (LP: #1402042)

 -- Scott Moser <email address hidden> Tue, 22 Sep 2015 12:02:08 -0400

Changed in curtin (Ubuntu Trusty):
status: Fix Committed → Fix 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.

Launchpad Janitor (janitor) wrote :

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

---------------
curtin (0.1.0~bzr227-0ubuntu1~14.10.1) vivid-proposed; urgency=medium

  * New upstream snapshot.
    - fix uefi install path on nvme devices (LP: #1471928)
    - tools/maas2roottar: (development only tool) exit failure when missing
      dependency (LP: #1466099).
    - partition: leave space for secondary gpt header when creating mbr disks.
    - partition: when a second partition is created, assert its existance.
    - partition: when second partition is created, wipe fs info.
    - kernel command line: prefer the --- over -- to indicate that subsequent
      arguments should be copied to installed system. (LP: #1402042)

 -- Scott Moser <email address hidden> Tue, 22 Sep 2015 12:21:28 -0400

Changed in curtin (Ubuntu Vivid):
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