Update landscape-client with upstream fixes

Bug #1721383 reported by Simon Poirier
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
landscape-client (Ubuntu)
Fix Released
Medium
Andreas Hasenack
Bionic
Fix Released
Medium
Andreas Hasenack

Bug Description

[Impact]

Reference:
https://wiki.ubuntu.com/StableReleaseUpdates#New_upstream_microreleases

This SRU contains minor updates for landscape-client as follow :

 - Fix regression in configuration hook under install-cd chroot (LP: #1699789)
 - Report autoremovable packages (LP: #1208393)
 - Don't re-register client by default. (LP: #1618483)
 - Add proxy handling to package reporter. (LP: #1531150)

[Test Case]

There is unfortunately no specific test cases since this is a bunch of bugfixes to improve landscape-client for Xenial and trusty users.

General dogfooding and all tests as outlined by the QA procedures here will have to be covered:
https://wiki.ubuntu.com/LandscapeUpdates

For xenial and trusty, tests ISOs have been rebuilt by the Landscape team with the updated packages to verify the installer regression is fixed.

[Regression Potential]

 - The debdiff has been provided by the Canonical Landscape team, which IMHO should bring even more confidence (CI verifications, ...)

Tags: patch sts
Simon Poirier (simpoir)
description: updated
Eric Desrochers (slashd)
tags: added: sts sts-sponsor sts-sru-needed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "xenial.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Eric Desrochers (slashd)
Changed in landscape-client (Ubuntu Trusty):
assignee: nobody → Simon Poirier (simpoir)
Changed in landscape-client (Ubuntu Xenial):
assignee: nobody → Simon Poirier (simpoir)
Changed in landscape-client (Ubuntu Trusty):
importance: Undecided → Medium
Changed in landscape-client (Ubuntu Xenial):
importance: Undecided → Medium
Changed in landscape-client (Ubuntu):
assignee: nobody → Simon Poirier (simpoir)
Eric Desrochers (slashd)
Changed in landscape-client (Ubuntu Trusty):
status: New → Confirmed
Changed in landscape-client (Ubuntu Xenial):
status: New → Confirmed
Changed in landscape-client (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Simon Poirier (simpoir) wrote :

Following discussion with slashd, I'm resubmitting the debdiffs to also include the fix to #1531150 and to include artful.

description: updated
Revision history for this message
Simon Poirier (simpoir) wrote :
Revision history for this message
Simon Poirier (simpoir) wrote :
Revision history for this message
Simon Poirier (simpoir) wrote :
Eric Desrochers (slashd)
Changed in landscape-client (Ubuntu Artful):
status: Confirmed → In Progress
Changed in landscape-client (Ubuntu Xenial):
status: Confirmed → In Progress
Changed in landscape-client (Ubuntu Trusty):
status: Confirmed → In Progress
Simon Poirier (simpoir)
description: updated
Revision history for this message
Alex Moldovan (alexmoldovan) wrote :

Summary of test cases for each bug:
For LP #1699789
The Ubuntu Xenial installer doesn't offer option to provide http/https proxy to be used by Landscape client when selecting "Manage system with Landscape" on upgrades management tasksel question. Therefore if system is placed behind proxy it will not be able to communicate with Landscape server. During system installation installer is asking user to provide proxy that is used by APT. It would be suitable that same proxy would be used for Landscape.

For LP #1208393
For a company that exclusively uses Landscape for software updates, 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.

For LP #1618483
When running landscape-config, this prompt always defaults to Yes:
"Request a new registration for this computer now? (Y/n):"
The landscape-config command can be used to change configuration options in /etc/landscape/client.conf and should default to No when running this command on a computer that is already registered to a Landscape server and that server doesn't change during that run of landscape-config.

To reproduce:

1) Install landscape-client package on computer.
2) Run landscape-config to register client for the first time.
3) Run landscape-config again to change an option:
sudo landscape-config --ping-interval=60

For LP #1531150
The package reporter is not getting the proxy settings set in /etc/landscape/client.conf:
http_proxy = <your-proxy>
https_proxy = <your-proxy>

It will respect the environment variables if they are somehow set when landscape-client is started, but not if the values are just defined in that configuration file.
Clients can ping and broker exchanges work. There are ways the environment values can leak into the process and invalidate the test.
For example, if you have the http_proxy and https_proxy variables in root's environment, and restart the client, it will inherit those, and invalidate the test.
Or let's say you have them in ubuntu's environment, and use sudo to restart the client. They won't be propagated to the daemon by default unless -E is used, and/or the proxy variables are whitelisted in /etc/sudoers.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I can't get #1208393 to work. I deployed lds trunk, created the upgrade profile with the autoremove flag enabled, registered a client that had one upgrade available and dozens of autoremove packages, watched exchanges:
2017-11-10 11:45:45,277 INFO [MainThread] Queuing message with changes in known packages: 118 installed, 9998 available, 0 available upgrades, 0 locked, 13 autoremovable, 0 not installed, 0 not available, 0 not available upgrades, 0 not locked, 0 not autoremovable.
2017-11-10 11:46:52,761 INFO [MainThread] Queuing message with changes in known packages: 100 installed, 8903 available, 0 available upgrades, 0 locked, 13 autoremovable, 0 not installed, 0 not available, 0 not available upgrades, 0 not locked, 0 not autoremovable.

But on the server the account.computer_packages.autoremovable table row remained empty:
landscape-resource-1=# select available_upgrades,autoremovable from computer_packages;
 available_upgrades | autoremovable
--------------------+---------------
 {316069} | {}
(1 row)

When the upgrade time came, only the one package was upgraded, and the autoremovable ones remained installed.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

The provided debdiff is missing a crucial hunk: https://github.com/CanonicalLtd/landscape-client/commit/4807ca51a92814acaa51156d7172a274309f2934#diff-840ca07f981d8a65e74ab543dc9f5157

Please also update UPSTREAM_VERSION in landscape/__init__.py to match the version set in this bug

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hm, disregard my comment about UPSTREAM_VERSION, it's a bit messy right now because a +bzr<revno> already leaked. This can only be properly fixed when something higher than 16.03 (like 16.04) is released.

Changed in landscape-client (Ubuntu Bionic):
assignee: nobody → Andreas Hasenack (ahasenack)
status: New → In Progress
importance: Undecided → Medium
Eric Desrochers (slashd)
description: updated
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

The other debdiffs are also missing the patch hunk I mentioned before. I have branches for all of these, I just want the bionic one to land first.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 16.03-0ubuntu4

---------------
landscape-client (16.03-0ubuntu4) bionic; urgency=medium

  [ Simon Poirier]
  * Update landscape-client with upstream fixes (LP: #1721383):
    - Add proxy handling to package reporter. (LP: #1531150)
    - Fix regression in configuration hook under install-cd chroot (LP: #1699789)
    - Report autoremovable packages (LP: #1208393)
    - Do not re-register client by default (LP: #1618483)
    - Remove diff "noise" from d/p/ignore-backports-1668583.diff

 -- Andreas Hasenack <email address hidden> Fri, 10 Nov 2017 12:26:23 -0200

Changed in landscape-client (Ubuntu Bionic):
status: In Progress → Fix Released
Eric Desrochers (slashd)
description: updated
no longer affects: landscape-client (Ubuntu Trusty)
no longer affects: landscape-client (Ubuntu Xenial)
no longer affects: landscape-client (Ubuntu Zesty)
no longer affects: landscape-client (Ubuntu Artful)
Dan Streetman (ddstreet)
tags: removed: sts-sponsor
tags: removed: sts-sru-needed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.