failure if target provided in config and directory already exists.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
Fix Released
|
Medium
|
Unassigned | ||
curtin (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Subiquity provides /target as in config like:
install: {target: /target}
if /target already exists, then WorkingDir will fail and stack trace.
stack trace looks something like this:
Running command ['tar', '-cvf', '/var/log/
Wrote: /var/log/
finish: cmd-install: FAIL: curtin command install
Traceback (most recent call last):
File "/usr/lib/
in cmd_install
raise e
File "/usr/lib/
in cmd_install
workingd = WorkingDir(cfg)
File "/usr/lib/
in __init__
os.mkdir(p)
FileExistsError: [Errno 17] File exists: '/target'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/
main
ret = args.func(args)
File "/usr/lib/
in cmd_install
copy_
UnboundLocalError: local variable 'workingd' referenced before assignment
local variable 'workingd' referenced before assignment
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: curtin 18.1-17-
ProcVersionSign
Uname: Linux 4.15.0-22-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu7.1
Architecture: amd64
Date: Thu Jun 7 13:45:03 2018
Ec2AMI: ami-0000059f
Ec2AMIManifest: FIXME
Ec2Availability
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
PackageArchitec
ProcEnviron:
TERM=screen-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: curtin
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Ryan Harper (community): Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 560 lines (+234/-38)15 files modifiedcurtin/commands/curthooks.py (+2/-2)
curtin/commands/extract.py (+1/-1)
curtin/commands/install.py (+16/-5)
curtin/url_helper.py (+1/-1)
curtin/util.py (+9/-4)
debian/changelog (+16/-0)
tests/unittests/test_commands_collect_logs.py (+26/-14)
tests/unittests/test_commands_extract.py (+72/-0)
tests/unittests/test_commands_install.py (+40/-0)
tests/unittests/test_util.py (+1/-1)
tests/vmtests/__init__.py (+1/-1)
tests/vmtests/image_sync.py (+1/-1)
tools/curtainer (+21/-6)
tools/vmtest-sync-images (+0/-1)
tox.ini (+27/-1)
- Server Team CI bot: Approve (continuous-integration)
- Ryan Harper (community): Approve
-
Diff: 101 lines (+56/-5)2 files modifiedcurtin/commands/install.py (+16/-5)
tests/unittests/test_commands_install.py (+40/-0)
Changed in curtin: | |
status: | New → Confirmed |
Changed in curtin (Ubuntu): | |
status: | New → Confirmed |
Changed in curtin: | |
importance: | Undecided → Medium |
Changed in curtin (Ubuntu): | |
importance: | Undecided → Medium |
An upstream commit landed for this bug.
To view that commit see the following URL: /git.launchpad. net/curtin/ commit/ ?id=9d0e557e
https:/