Upgrade packages does not run due to 'Additional required changes' approval request on Debian

Bug #2003358 reported by Chris Hill
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Client
New
Undecided
Unassigned

Bug Description

Since you described me as a 'motivated user' in your blog https://ubuntu.com/blog/manage-debian-ubuntu-and-derivative-linux-distributions-with-landscape-scripts :D

Although Debian isn't officially supported, it was very helpful to have #1990268 accepted. I thought you should know about the other glitch which prevents using some of Landscape with Debian that I've discovered:

When you attempt to upgrade packages on a Debian client (whether manually or using an Upgrade Profile), the request is accepted, but the activity hangs forever, prompting the user to approve 'Additional required changes' (see attached screenshot).

Even if the computer is selected and the end-user clicks 'Approve', the packages never upgrade.

Looking in /var/log/landscape/package/reporter.log it's possible to see the client failing to download a database (due to there being no Debian database, of course)

2023-01-19 23:31:34,793 WARNING [MainThread] Couldn't download hash=>id database: Server returned HTTP code 404
2023-01-20 00:01:34,870 WARNING [MainThread] Couldn't download hash=>id database: Server returned HTTP code 404
2023-01-20 00:31:34,834 WARNING [MainThread] Couldn't download hash=>id database: Server returned HTTP code 404
2023-01-20 01:01:34,794 WARNING [MainThread] Couldn't download hash=>id database: Server returned HTTP code 404
2023-01-20 01:31:35,273 WARNING [MainThread] Couldn't download hash=>id database: Server returned HTTP code 404
2023-01-20 02:00:19,564 WARNING [MainThread] Couldn't download hash=>id database: Server returned HTTP code 404

Looking in the repo for landscape-client/landscape/client/package/changer.py under change_packages the client attempts to resolve dependencies by running get_package_hash and get_hash_id for the relevant package. If this fails, an UnknownPackageData is returned. I *think* this is where the error is kicking in. Tantalizingly, there is a 'policy' setting passed to this function which seems to be possible to set to POLICY_ALLOW_ALL_CHANGES and POLICY_ALLOW_INSTALLS, which at first glance looked like it *might* be useful to force this to happen anyway (maybe if the exception was ignored or removed?). However it's hardcoded to POLICY_STRICT in the only place that change_packages is called (line 296), and it therefore doesn't seem to be selectable via the UI at this point in landscape-client project development.

I'm afraid this is far, far beyond my skills in terms of landscape client development so won't be able to offer a pull request on this one - but some sort of option to allow updates outside of the hash=>id database could make this tool even more valuable to Debian, and Debian-like distro users :)

Revision history for this message
Chris Hill (chrisatmaf) wrote :
description: updated
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.