curtin fails to configure archive in trusty MAAS deployment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
Fix Released
|
Medium
|
Unassigned | ||
curtin (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When deploying trusty, curtin fails to configure the archive mirror to the one it is being told to. When deploying xenial with the same configuration, this is not the case.
MAAS sends the config to curtin like:
apt:
preserve_
primary:
- arches: [default]
uri: http://
proxy: http://
security:
- arches: [default]
uri: http://
The result of this is that curtin starts the installation, but fallbacks to 'archive.
[...]
Setting up python-crypto (2.6.1-4ubuntu0.2) ...
Setting up python-oauthlib (0.6.1-1) ...
Setting up xfsprogs (3.1.9ubuntu2) ...
Processing triggers for libc-bin (2.19-0ubuntu6.13) ...
Processing triggers for initramfs-tools (0.103ubuntu4.10) ...
update-initramfs: Generating /boot/initrd.
cryptsetup: WARNING: failed to detect canonical device of /media/root-ro/
cryptsetup: WARNING: could not determine root device from /etc/fstab
W: mdadm: /etc/mdadm/
Processing triggers for ureadahead (0.100.0-16) ...
curtin: Installation started. (0.1.0~
third party drivers not installed or necessary.
Error: /dev/sda: unrecognised disk label
Creating new GPT entries.
The operation has completed successfully.
Get:1 http://
Ign http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 http://
Get:11 http://
Get:12 http://
Get:13 http://
Get:14 http://
Get:15 http://
Get:16 http://
Get:17 http://
Get:18 http://
Get:19 http://
Get:20 http://
Get:21 http://
Get:22 http://
Get:23 http://
Fetched 10.1 MB in 5s (1843 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
linux-
The following NEW packages will be installed:
linux-
linux-
0 upgraded, 4 newly installed, 0 to remove and 12 not upgraded.
Need to get 62.2 kB of archives.
After this operation, 468 kB of additional disk space will be used.
[...].
Now, If I change the curtin configuration to the old format, I experience the same issue:
apt_mirrors: {ubuntu_archive: 'http://
The result is the same as above.
Again, this does *NOT* happen when deploying xenial, only trusty (and hence precise).
Related branches
- curtin developers: Pending requested
-
Diff: 966 lines (+141/-213)33 files modifiedcurtin/commands/apt_config.py (+6/-1)
debian/changelog (+11/-0)
debian/new-upstream-snapshot (+4/-0)
tests/unittests/test_apt_custom_sources_list.py (+79/-22)
tests/vmtests/__init__.py (+11/-2)
tests/vmtests/releases.py (+0/-5)
tests/vmtests/test_apt_config_cmd.py (+0/-4)
tests/vmtests/test_basic.py (+0/-8)
tests/vmtests/test_bcache_basic.py (+0/-4)
tests/vmtests/test_bcache_bug1718699.py (+0/-4)
tests/vmtests/test_iscsi.py (+0/-4)
tests/vmtests/test_lvm.py (+0/-4)
tests/vmtests/test_lvm_iscsi.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 (+20/-24)
tests/vmtests/test_network_alias.py (+0/-4)
tests/vmtests/test_network_bonding.py (+1/-6)
tests/vmtests/test_network_bridging.py (+2/-7)
tests/vmtests/test_network_enisource.py (+4/-8)
tests/vmtests/test_network_ipv6.py (+0/-4)
tests/vmtests/test_network_ipv6_enisource.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/-4)
tests/vmtests/test_network_vlan.py (+3/-8)
tests/vmtests/test_nvme.py (+0/-8)
tests/vmtests/test_raid5_bcache.py (+0/-4)
tests/vmtests/test_simple.py (+0/-4)
tests/vmtests/test_uefi_basic.py (+0/-8)
- curtin developers: Pending requested
-
Diff: 966 lines (+141/-213)33 files modifiedcurtin/commands/apt_config.py (+6/-1)
debian/changelog (+11/-0)
debian/new-upstream-snapshot (+4/-0)
tests/unittests/test_apt_custom_sources_list.py (+79/-22)
tests/vmtests/__init__.py (+11/-2)
tests/vmtests/releases.py (+0/-5)
tests/vmtests/test_apt_config_cmd.py (+0/-4)
tests/vmtests/test_basic.py (+0/-8)
tests/vmtests/test_bcache_basic.py (+0/-4)
tests/vmtests/test_bcache_bug1718699.py (+0/-4)
tests/vmtests/test_iscsi.py (+0/-4)
tests/vmtests/test_lvm.py (+0/-4)
tests/vmtests/test_lvm_iscsi.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 (+20/-24)
tests/vmtests/test_network_alias.py (+0/-4)
tests/vmtests/test_network_bonding.py (+1/-6)
tests/vmtests/test_network_bridging.py (+2/-7)
tests/vmtests/test_network_enisource.py (+4/-8)
tests/vmtests/test_network_ipv6.py (+0/-4)
tests/vmtests/test_network_ipv6_enisource.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/-4)
tests/vmtests/test_network_vlan.py (+3/-8)
tests/vmtests/test_nvme.py (+0/-8)
tests/vmtests/test_raid5_bcache.py (+0/-4)
tests/vmtests/test_simple.py (+0/-4)
tests/vmtests/test_uefi_basic.py (+0/-8)
- Server Team CI bot: Approve (continuous-integration)
- Ryan Harper (community): Approve
-
Diff: 104 lines (+71/-3)2 files modifiedcurtin/commands/apt_config.py (+6/-1)
tests/unittests/test_apt_custom_sources_list.py (+65/-2)
summary: |
- curtin fails to configure archive in trusty + curtin fails to configure archive in trusty MAAS deployment |
description: | updated |
Changed in curtin: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in curtin (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in curtin: | |
status: | Confirmed → Fix Committed |
To document my understanding of what happened:
Specifying a mirror URI and no template directs curtin to load the on-disk /etc/apt/ sources. list file to be used as the template. The process of turning the apt/sources.list contents into a template uses curtin's default mirror values:
# Default archive mirrors ARCH_MIRRORS = {"PRIMARY": "http:// archive. ubuntu. com/ubuntu/",
"SECURITY" : "http:// security. ubuntu. com/ubuntu/"}
PRIMARY_
which include a trailing slash for the mirror value.
Curtin then attempts to match the primary mirror url in the apt/sources.list file and if found, will replace the url with the literal string: $MIRROR which will then later get replaced with the uri value specifed in the yaml.
Since curtin's default primary mirror url included the trailing slash, but the trusty apt/sources.list did not, curtin failed to create a template file which would inject the supplied value.
The fix in the proposed branch relaxes the trailing slash restriction to handle the specific case where the on-disk sources.list is missing a trailing slash.