add autoremove to Landscape
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Client |
Fix Committed
|
Undecided
|
Simon Poirier | ||
Landscape Server |
Fix Released
|
Wishlist
|
Simon Poirier | ||
landscape-client (Ubuntu) |
Fix Released
|
Wishlist
|
Andreas Hasenack | ||
Trusty |
Fix Released
|
Wishlist
|
Andreas Hasenack | ||
Xenial |
Fix Released
|
Wishlist
|
Andreas Hasenack | ||
Zesty |
Fix Released
|
Wishlist
|
Andreas Hasenack | ||
Artful |
Fix Released
|
Wishlist
|
Andreas Hasenack |
Bug Description
[Impact]
It is good practice to remove unneeded packages/software from a machine. On the shell, this can be achieved by using "apt autoremove". There is no way to do it via landscape.
The lack of this option can lead to a full /boot partitions, for example, by accumulating kernel packages that are no longer used.
The fix in Landscape is a new checkbox option in the existing auto-upgrade profile feature. If checked, whenever an auto-upgrade profile is applied to a computer, meaning, upgrades will be done, the client will also do the equivalent of "apt autoremove", thus removing packages that are no longer used.
The caveat is that, at the time of this writing, the server portion of this feature is not yet available, so it can only be tested with a trunk deployment of the server component, or from staging.
[Test Case]
* get a test account on staging.
* Login to https:/
* create an ubuntu VM or LXD (easier) running the release you are testing. On it, make sure there are upgrades available. Do not upgrade the packages. If there are no available upgrades (i.e., the image you picked to deploy this VM or LXD was up-to-date), inspect packages you have installed with apt-cache policy and try to downgrade some. You need at least one upgrade available.
* install devscripts, and then remove it:
- sudo apt install devscripts
- sudo apt purge devscripts
That should trigger a lot of autoremovable possibilities. Confirm by running (but not proceeding with) "apt autoremove"
* install landscape-client from proposed and register it against staging. Something like:
sudo landscape-config --silent -a <your-account-name> -t test-sru-1208393 --script-users ALL --include-
* go to the staging.
* select the computer, go to the packages page and wait for this computer to report all packages and available upgrades. This could take about 15min or even more on artful because staging does not have a hash-id cache for artful.
* keep tailing -f /var/log/
2017-11-13 13:49:22,220 INFO [MainThread] Queuing message with changes in known packages: 421 installed, 62279 available, 44 available upgrades, 0 locked, 1 autoremovable, 0 not installed, 0 not available, 0 not available upgrades, 0 not locked, 0 not autoremovable.
* That confirms the client is reporting the autoremovable packages.
* Once all packages have been reported to the server (no more "changes in known packages on the client log), on the server, add the tag "autoupgraderemove" to this registered computer.
* Edit the autoupgrade profile you created before and make sure it is configured to kick in in the next 5 minutes. Change its configuration if needed.
* Wait 5-10min. You should eventually see an activity that will upgrade packages on this computer, as well as autoremove others.
* Once the activity is finished, confirm that "apt autoremove" on the computer no longer has packages to remove.
[Regression Potential]
This feature relies on "apt autoremove" working correctly and not doing silly things, like removing your running kernel, or bash, or something else that's essential.
It's an opt-in feature, so it won't affect people who do not enable it in the auto-upgrade profiles.
[Other Info]
This is technically a new feature, but it has been one of the most requested ones.
As of the time of this writing, there is no public landscape server (apart from staging) which has support for this feature. But it's good to have the client out there for when the server is upgraded.
A new client talking to an old server won't cause problems. The server will simply discard the extra autoremovable package list.
This PPA has packages built from these branches:
https:/
They are using a ~ppaN suffix.
--- Original Description below ---
Canonical IS have moved software updates almost entirely to Landscape.
Apart from updating software packages, it is also good practice to remove unneeded software.
On the shell, this can be achieved using "apt-get autoremove"
It would be desirable to have this functionality available in Landscape.
Changed in landscape: | |
milestone: | none → later |
Changed in landscape: | |
status: | New → Triaged |
tags: | added: is |
Changed in landscape: | |
assignee: | nobody → David Britton (davidpbritton) |
tags: | added: canonical-is |
Changed in landscape: | |
assignee: | David Britton (davidpbritton) → Данило Шеган (danilo) |
Changed in landscape: | |
assignee: | Данило Шеган (danilo) → nobody |
Changed in landscape: | |
status: | Triaged → Won't Fix |
Changed in landscape: | |
assignee: | nobody → Simon Poirier (simpoir) |
status: | Triaged → In Progress |
Changed in landscape: | |
status: | In Progress → Fix Committed |
Changed in landscape-client (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Andreas Hasenack (ahasenack) |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in landscape-client (Ubuntu Trusty): | |
status: | New → In Progress |
Changed in landscape-client (Ubuntu Xenial): | |
status: | New → In Progress |
Changed in landscape-client (Ubuntu Zesty): | |
status: | New → In Progress |
Changed in landscape-client (Ubuntu Artful): | |
status: | New → In Progress |
Changed in landscape-client (Ubuntu Trusty): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
Changed in landscape-client (Ubuntu Xenial): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
Changed in landscape-client (Ubuntu Zesty): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
Changed in landscape-client (Ubuntu Artful): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
Changed in landscape-client (Ubuntu): | |
importance: | Undecided → Wishlist |
Changed in landscape-client (Ubuntu Trusty): | |
importance: | Undecided → Wishlist |
Changed in landscape-client (Ubuntu Xenial): | |
importance: | Undecided → Wishlist |
Changed in landscape-client (Ubuntu Zesty): | |
importance: | Undecided → Wishlist |
Changed in landscape-client (Ubuntu Artful): | |
importance: | Undecided → Wishlist |
tags: |
added: verification-done-artful verification-done-trusty verification-done-xenial verification-done-zesty removed: verification-needed-artful verification-needed-trusty verification-needed-xenial verification-needed-zesty |
Changed in landscape: | |
milestone: | later → 18.03 |
Changed in landscape: | |
status: | Fix Committed → Fix Released |
After some IRC discussion:
The autoremove run needs to be approved *per computer* (and AFAIK the current state lets admins approve on an activity basis only). Otherwise the "run script" feature would suffice.