Curtin fails to deploy when /etc/resolv.conf is missing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
Fix Released
|
Medium
|
Ryan Harper |
Bug Description
I'm trying to deploy an image[1] which does not contain /etc/resolv.conf. Curtin fails when it tries to make a copy of /etc/resolv.conf since the file is missing. Adding a blank /etc/resolv.conf fixes the issue although the image still fails to deploy due to other reasons.
inish: cmd-install/
finish: cmd-install/
Traceback (most recent call last):
File "/curtin/
ret = args.func(args)
File "/curtin/
builtin_
File "/curtin/
install_
File "/curtin/
installed_
File "/curtin/
with ChrootableTarge
File "/curtin/
os.
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmple0wlo
[Errno 2] No such file or directory: '/tmp/tmple0wlo
curtin: Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'curthooks']
Exit code: 3
Reason: -
Stdout: start: cmd-install/
Running curtin builtin curthooks
Configuring target system for distro: opensuse osfamily: suse
start: cmd-install/
Running command ['mount', '--bind', '/dev', '/tmp/tmple0wlo
Running command ['mount', '--bind', '/proc', '/tmp/tmple0wlo
Running command ['mount', '--bind', '/sys', '/tmp/tmple0wlo
finish: cmd-install/
finish: cmd-install/
Traceback (most recent call last):
File "/curtin/
ret = args.func(args)
File "/curtin/
File "/curtin/
File "/curtin/
File "/curtin/
with ChrootableTarge
File "/curtin/
[Errno 2] No such file or directory: '/tmp/tmple0wlo
Related branches
- Server Team CI bot: Needs Fixing (continuous-integration)
- Ryan Harper (community): Approve
-
Diff: 940 lines (+116/-213)43 files modifiedcurtin/block/deps.py (+1/-1)
curtin/deps/__init__.py (+1/-1)
curtin/util.py (+11/-3)
debian/changelog (+13/-0)
debian/control (+1/-1)
tests/unittests/test_curthooks.py (+3/-3)
tests/unittests/test_util.py (+79/-0)
tests/vmtests/__init__.py (+3/-3)
tests/vmtests/test_apt_config_cmd.py (+0/-4)
tests/vmtests/test_basic.py (+0/-8)
tests/vmtests/test_basic_dasd.py (+0/-7)
tests/vmtests/test_bcache_basic.py (+0/-4)
tests/vmtests/test_bcache_bug1718699.py (+0/-4)
tests/vmtests/test_bcache_ceph.py (+0/-4)
tests/vmtests/test_bcache_partitions.py (+0/-4)
tests/vmtests/test_fs_battery.py (+0/-4)
tests/vmtests/test_iscsi.py (+0/-4)
tests/vmtests/test_journald_reporter.py (+0/-4)
tests/vmtests/test_lvm.py (+0/-4)
tests/vmtests/test_lvm_iscsi.py (+0/-4)
tests/vmtests/test_lvm_raid.py (+0/-4)
tests/vmtests/test_mdadm_bcache.py (+0/-34)
tests/vmtests/test_mdadm_iscsi.py (+0/-4)
tests/vmtests/test_multipath.py (+0/-4)
tests/vmtests/test_network.py (+0/-4)
tests/vmtests/test_network_alias.py (+0/-4)
tests/vmtests/test_network_bonding.py (+0/-4)
tests/vmtests/test_network_bridging.py (+0/-4)
tests/vmtests/test_network_ipv6.py (+0/-4)
tests/vmtests/test_network_ipv6_static.py (+0/-4)
tests/vmtests/test_network_ipv6_vlan.py (+0/-4)
tests/vmtests/test_network_mtu.py (+0/-4)
tests/vmtests/test_network_static.py (+0/-4)
tests/vmtests/test_network_static_routes.py (+0/-5)
tests/vmtests/test_network_vlan.py (+0/-4)
tests/vmtests/test_nvme.py (+0/-8)
tests/vmtests/test_pollinate_useragent.py (+0/-4)
tests/vmtests/test_preserve.py (+0/-4)
tests/vmtests/test_preserve_raid.py (+0/-4)
tests/vmtests/test_raid5_bcache.py (+0/-4)
tests/vmtests/test_simple.py (+0/-14)
tests/vmtests/test_uefi_basic.py (+0/-9)
tests/vmtests/test_zfsroot.py (+4/-8)
- Chad Smith: Approve
- Server Team CI bot: Approve (continuous-integration)
- Dan Watkins (community): Approve
- Lee Trager (community): Approve
-
Diff: 133 lines (+89/-3)2 files modifiedcurtin/util.py (+11/-3)
tests/unittests/test_util.py (+78/-0)
Changed in curtin: | |
status: | New → In Progress |
assignee: | nobody → Ryan Harper (raharper) |
Yes, curtin ChrootableTarget and skip the rename if the target resolv.conf isn;'t present.
Are you going to file a separate bug for the failure after providing a resolv.conf in the image?