[2.4-beta3] juju relies on deprecated cloud-init apt_mirror cloud-config key: "Old and New apt format defined with unequal values True vs False"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Medium
|
Joseph Phillips |
Bug Description
cloud-init has supported apt v3 configuration for a while now but Juju still uses the old format.
https:/
cfg.SetAttr(
While cloud-init converts the old format entries for compatibility reasons there are still some issues that occur.
https:/
https:/
def find_apt_
"""
find an apt_mirror given the cfg provided.
It can check for separate config of primary and security mirrors
If only primary is given security is assumed to be equal to primary
If the generic apt_mirror is given that is defining for both
"""
The new format looks like this:
http://
apt:
primary:
- arches: [default]
search:
- http://
- http://
Now to the problem that I encountered.
MAAS has "xenial-proposed" added for "main" and "universe":
https:/
maas maas package-
#...
"name": "proposed",
],
"main",
],
At the same time, a mirror is configured at the model level:
juju model-config apt-mirror
http://
This results in the following 2 config files on the target machine:
What came from MAAS in v3 format:
https:/
/etc/cloud/
apt:
preserve_
primary:
- arches: [default]
uri: http://
proxy: http://
security:
- arches: [default]
uri: http://
sources:
proposed_8: {source: 'deb http://
universe'} # <---- proposed
Added by juju in the old format:
cat /var/lib/
#cloud-config
# ...
apt_mirror: http://
# ...
MAAS configs take priority in the end but cloud-init errors out:
018-05-28 19:15:45,392 - util.py[DEBUG]: Writing to /var/lib/
2018-05-28 19:15:45,392 - helpers.py[DEBUG]: Running config-
2018-05-28 19:15:45,392 - cc_apt_
2018-05-28 19:15:45,393 - cc_apt_
2018-05-28 19:15:45,393 - handlers.py[DEBUG]: finish: modules-
2018-05-28 19:15:45,393 - url_helper.
2018-05-28 19:15:45,398 - url_helper.
2018-05-28 19:15:45,398 - util.py[WARNING]: Running module apt-configure (<module 'cloudinit.
2018-05-28 19:15:45,398 - util.py[DEBUG]: Running module apt-configure (<module 'cloudinit.
Traceback (most recent call last):
File "/usr/lib/
freq=freq)
File "/usr/lib/
return self._runners.
File "/usr/lib/
results = functor(*args)
File "/usr/lib/
ocfg = convert_
File "/usr/lib/
cfg = convert_
File "/usr/lib/
oldkey))
ValueError: Old and New apt format defined with unequal values True vs False @ apt_preserve_
I think something should take priority (Juju seems to have higher priority to me) and Juju needs to use the new format as by this time cloud images contain cloud-init that supports apt v3 config.
summary: |
[2.4-beta3] juju relies on deprecated cloud-init apt_mirror cloud-config - key + key: "Old and New apt format defined with unequal values True vs False" |
Changed in juju: | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in juju: | |
importance: | Low → Medium |
status: | New → Triaged |
assignee: | nobody → Joseph Phillips (manadart) |
This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.