group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #19719
[Bug 1208393] Re: add autoremove to Landscape
This bug was fixed in the package landscape-client -
16.03-0ubuntu3.17.10.1
---------------
landscape-client (16.03-0ubuntu3.17.10.1) artful; urgency=medium
[ Simon Poirier ]
* Add proxy handling to package reporter. (LP: #1531150)
* Fix regression in configuration hook under install-cd chroot (LP: #1699789)
* Report autoremovable packages (LP: #1208393)
* No not re-register client by default (LP: #1618483)
-- Andreas Hasenack <andreas@xxxxxxxxxxxxx> Fri, 10 Nov 2017 15:44:17
-0200
** Changed in: landscape-client (Ubuntu Artful)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1208393
Title:
add autoremove to Landscape
Status in Landscape Server:
Fix Committed
Status in Landscape Client:
Fix Committed
Status in landscape-client package in Ubuntu:
Fix Released
Status in landscape-client source package in Trusty:
Fix Released
Status in landscape-client source package in Xenial:
Fix Released
Status in landscape-client source package in Zesty:
Fix Released
Status in landscape-client source package in Artful:
Fix Released
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.landscape.canonical.com as soon as it also gets this client
update (yes, the client update is needed on the server as well for
this feature to work).
[Test Case]
* get a test account on staging.landscape.canonical.com. That
deployment has autoremove support. You may email the address in the
#landscape topic in the internal canonical irc channel to request such
an account.
* Login to https://staging.landscape.canonical.com and create an
autoupgrade profile, configure it to apply to computers with the tag
"autoupgraderemove", and make sure to tick the "autoremove packages"
option. Also configure it to apply to all days of the week (or at
least "today") and at every hour at XX minutes. You will change XX
later.
* 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-manager-plugins ScriptExecution -u https://staging.landscape.canonical.com/message-system --ping-url http://staging.landscape.canonical.com/ping
* go to the staging.landscape.canonical.com pending computers page and
accept this computer
* 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/landscape/package-reporter.log on the client and look for multiple messages where it says it's reporting autoremovable packages. Here is one example:
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://launchpad.net/~ahasenack/+archive/ubuntu/lsclient-sru-1721383
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/landscape/+bug/1208393/+subscriptions