1.20.x local provider not running apt-get update
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
High
|
Katherine Cox-Buday |
Bug Description
Our recent charm testing on Power has showed failures due to the install hook not running "apt-get update" by default in Juju 1.20.x
This is a regression and breaks backwards compatibility in charms. As discussed on the Juju list[0] we should keep the defaults we have had in past Juju releases (ie apt-get update and apt-get upgrade on for all providers), but provide an environment.yaml option to turn it off (default being on).
For the apt-get update scenario I think it is essential to have the default case be apt-get update on so we can ensure users are getting critical security updates. Now if the user wants to turn that off they have to make a conscious decision.
Aside from getting recent security updates charms that were working on 1.18 are now failing on 1.20. This bug is being filled to change the default behavior in all providers to apt-get update being on, and hopefully landing soon an option in environments.yaml to turn apt-get update off.
[0] https:/
-thanks,
Antonio
summary: |
- 1.20.x local provider not running ap-get update + 1.20.x local provider not running apt-get update |
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → Critical |
milestone: | none → 1.21-alpha1 |
tags: | added: ci regression |
tags: | added: charms |
tags: | removed: ci |
Changed in juju-core: | |
assignee: | nobody → Katherine Cox-Buday (cox-katherine-e) |
status: | Triaged → In Progress |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
I have investigated the code and confirmed that apt commands are disabled if lxc-clone = true.
It appears this change was done back in January before 1.18 shipped.
Juju 1.20 ships with lxc-clone true by default, whereas earlier versions had it turned off. The way to restore previous behaviour is to simply to configure locally deployed environments with lxc-clone=false in environments.yaml.
The reason lxc-clone is now true is because of requests from the MAAS guys and customers to make local provider faster.
There's work in progress to allow apt-get upgrade to be optional. As part of that work, I think we should revisit the decision to turn off apt commands when cloning.
I'm taking this bug off 1.20 since there's an easy way to restore the older behaviour, and we have a broader fix coming for 1.21. If there are concerns with that, let me know.