apt setting overrides on custom image deploy not working
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Conrad Hoffmann | ||
2.6 |
Fix Released
|
High
|
Blake Rouse |
Bug Description
We are using MAAS to deploy custom Debian images. This worked fine with 2.4, but stopped working when we upgraded to 2.6.
We use the following /etc/maas/
-------
#cloud-config
kernel:
fallback-package: linux-image-amd64
package: linux-image-
apt:
preserve_
debconf_selections:
maas: |
{{for line in str(curtin_
{{line}}
{{endfor}}
late_commands:
maas: [wget, '--no-proxy', '{{node_
-------
Deploying a node with 2.4, the install log shows that the apt repos pre-configured on the image are used. The deploy finishes successfully.
Using the same curtin_
-------
Running curtin builtin curthooks
Configuring target system for distro: debian osfamily: debian
start: cmd-install/
Transferred {'grub2': 'grub2 grub2/update_nvram boolean false', 'maas': "..."} into new format: {'preserve_
curthooks handling apt to target /tmp/tmp1affjmi
-------
Then, later on, there is a lot of failed attempts to get "stretch" repos from archive.ubuntu.com:
> Ign:1 http://
Adn eventually the installation will fail installing the kernel, since there are no valid apt repos:
> finish: cmd-install/
Output of 'dpkg -l '*maas*'|cat':
-------
root@ip-
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii maas 2.6.0-7802-
ii maas-cli 2.6.0-7802-
un maas-cluster-
ii maas-common 2.6.0-7802-
ii maas-dhcp 2.6.0-7802-
un maas-dns <none> <none> (no description available)
ii maas-proxy 2.6.0-7802-
ii maas-rack-
ii maas-region-api 2.6.0-7802-
ii maas-region-
un maas-region-
un python-django-maas <none> <none> (no description available)
un python-maas-client <none> <none> (no description available)
un python-
ii python3-django-maas 2.6.0-7802-
ii python3-maas-client 2.6.0-7802-
ii python3-
-------
Steps to reproduce:
- Use MAAS 2.6.0 (7802-g59416a86
- Deploy a custom OS image that requires apt/preserve_
Related branches
- Blake Rouse (community): Approve
-
Diff: 17 lines (+3/-3)1 file modifiedsrc/maasserver/preseed.py (+3/-3)
Changed in maas: | |
status: | New → In Progress |
milestone: | none → 2.7.0alpha1 |
importance: | Undecided → Medium |
importance: | Medium → High |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
assignee: | nobody → Conrad Hoffmann (bitfehler) |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Please note that I created this bug in response to https:/ /code.launchpad .net/~bitfehler /maas/+ git/maas/ +merge/ 370182
The patch there did fix the issue for me, but having read the 2.4 source code as well now that code path has not really changed the way I thought it did, so I am uncertain about the root cause.
Also, this is my first bug report in launchpad, and if you have any pointers on how to properly format output or code snippets, I would appreciate it. Should they all be attachments? I was confused because the initial form only allows for a single attachment (or I didn't see the button to add more).
Thanks, Conrad