fails to install with fsimage source file:///foo.squashfs

Bug #1775630 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Fix Released
Medium
Unassigned
curtin (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

There is a bug in extract_root_fsimage_url that causes stack trace when attempting to extract a local filesystem image.
The stack trace looks like below.
The bug is fairly clear in the following:

def extract_root_fsimage_url(url, target):
    path = _path_from_file_url(url)
    if path != url or os.path.isfile(path):
        return _extract_root_fsimage(path(url), target)

finish: cmd-install/stage-network/builtin/cmd-net-meta: SUCCESS: curtin command net-meta
start: cmd-install/stage-extract/builtin/cmd-extract: curtin command extract
Installing sources: [{'type': 'fsimage', 'uri': 'file:///tmp/xenial-server-cloudimg-amd64.squashfs'}] to target at /target
start: cmd-install/stage-extract/builtin/cmd-extract: acquiring and extracting image from file:///tmp/xenial-server-cloudimg-amd64.squashfs
finish: cmd-install/stage-extract/builtin/cmd-extract: FAIL: acquiring and extracting image from file:///tmp/xenial-server-cloudimg-amd64.squashfs
finish: cmd-install/stage-extract/builtin/cmd-extract: FAIL: curtin command extract
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/curtin/commands/main.py", line 201, in main
    ret = args.func(args)
  File "/usr/lib/python3/dist-packages/curtin/commands/extract.py", line 135, in extract
    extract_root_fsimage_url(source['uri'], target=target)
  File "/usr/lib/python3/dist-packages/curtin/commands/extract.py", line 62, in extract_root_fsimage_url
    return _extract_root_fsimage(path(url), target)
TypeError: 'str' object is not callable
'str' object is not callable
curtin: Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'extract']
Exit code: 3
Reason: -
Stdout: start: cmd-install/stage-extract/builtin/cmd-extract: curtin command extract
        Installing sources: [{'type': 'fsimage', 'uri': 'file:///tmp/xenial-server-cloudimg-amd64.squashfs'}] to target at /target
        start: cmd-install/stage-extract/builtin/cmd-extract: acquiring and extracting image from file:///tmp/xenial-server-cloudimg-amd64.squashfs
        finish: cmd-install/stage-extract/builtin/cmd-extract: FAIL: acquiring and extracting image from file:///tmp/xenial-server-cloudimg-amd64.squashfs
        finish: cmd-install/stage-extract/builtin/cmd-extract: FAIL: curtin command extract
        Traceback (most recent call last):
          File "/usr/lib/python3/dist-packages/curtin/commands/main.py", line 201, in main
            ret = args.func(args)
          File "/usr/lib/python3/dist-packages/curtin/commands/extract.py", line 135, in extract
            extract_root_fsimage_url(source['uri'], target=target)
          File "/usr/lib/python3/dist-packages/curtin/commands/extract.py", line 62, in extract_root_fsimage_url
            return _extract_root_fsimage(path(url), target)
        TypeError: 'str' object is not callable
        'str' object is not callable

Stderr: ''

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: curtin 18.1-17-gae48e86f-0ubuntu1~18.04.1
ProcVersionSignature: User Name 4.15.0-22.24-generic 4.15.17
Uname: Linux 4.15.0-22-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.9-0ubuntu7.1
Architecture: amd64
Date: Thu Jun 7 14:19:57 2018
Ec2AMI: ami-0000059f
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
PackageArchitecture: all
ProcEnviron:
 TERM=screen-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: curtin
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Changed in curtin (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Changed in curtin:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Scott Moser (smoser) wrote :

An upstream commit landed for this bug.

To view that commit see the following URL:
https://git.launchpad.net/curtin/commit/?id=1bc868b4

Changed in curtin:
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package curtin - 18.1-25-g9d0e557e-0ubuntu1

---------------
curtin (18.1-25-g9d0e557e-0ubuntu1) cosmic; urgency=medium

  * New upstream snapshot.
    - Fix WorkingDir class to support already existing target directory.
      (LP: #1775622)
    - Fix extraction of local filesystem image. (LP: #1775630)
    - Fix tip-pyflakes imported but unused call to util.get_platform_arch
    - subp: update return value of subp with combine_capture=True.
    - tox: add a xenial environments, default envlist changes.
    - tests: Fix race on utcnow during timestamped curtin-log dir creation
      (LP: #1772481)
    - curtainer: patch source version from --source.
    - pyflakes: fix unused variable references identified by pyflakes 2.0.0.

 -- Scott Moser <email address hidden> Thu, 07 Jun 2018 14:59:20 -0400

Changed in curtin (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Ryan Harper (raharper) wrote : Fixed in curtin version 18.2.

This bug is believed to be fixed in curtin in version 18.2. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in curtin:
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.