Failed to register device: landscape.client.broker.registr ation.RegistrationHandler

Bug #1799843 reported by Jamie Bennett
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
landscape-client (Ubuntu)
Fix Released
High
Dave Jones
Bionic
In Progress
Undecided
Simon Poirier

Bug Description

[ Impact ]

 * Landscape-client fails to start on some hardware where the DMI fields
   for chassis/bios/product are invalid utf-8.

 * This prevents some machines from being managed by landscape on bionic.
   The issue has already been patched on following series. Previous series
   were relying on python2 str and were comparing binary data, thus are
   also unaffected.

[ Test Plan ]

 * apt install cloud-image-utils qemu-system-x86

 * wget http://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img

 * printf '#cloud-config\npassword: ubuntu\nchpasswd:\n expire: False\npackages:\n- landscape-client' | cloud-localds seed.img -

 * kvm -smbios type=3,manufacturer=$'\xff' \
   -smbios type=1,manufacturer=$'\xff' -snapshot \
   -drive file=bionic-server-cloudimg-amd64.img,if=virtio \
   -drive file=seed.img,if=virtio -m 2G -nic user,hostfwd=tcp::2222-:22

 * ssh -p 22222 localhost with ubuntu:ubuntu

 * sudo landscape-config -a account -p registrationkey \
   -t my_bad_dmi_machine --silent

 * check /var/log/landscape/broker.log for decoding errors

[ Where problems could occur ]

 * The backported patch touches a few code paths related to file reading.
   In particular, the now lossy decoding (due to decode replace)
   could have the side effect of unblocking code paths which previously
   were failing early on the decoding. This could surface in new errors
   in code which now gets to execute on affected machines.

 * The lossy decoding now introduces some utf8 replacement characters.
   That replacement character being unicode might generate some
   inconsistency if different code paths decode the same file data
   differently.

 * Also, that replacement character is non-ascii unicode. Although the
   server and clients should handle that gracefully, there is a chance
   that they never got to exercise some fields having unicode. This might
   surface more encoding issues in other parts of the code.

Revision history for this message
Jamie Bennett (jamiebennett) wrote :

For reference:

jamie@rose:/var/log/landscape$ uname -a
Linux rose 4.15.0-38-generic #41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
jamie@rose:/var/log/landscape$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

Revision history for this message
Adam Collard (adam-collard) wrote :

Thanks for filing the bug, please can you attach files in /sys/class/dmi/id/ matching '*vendor' e.g. "sys_vendor", "chassis_vendor", "bios_vendor" - looks like there's something funny in one of those files which is tripping up the registration.

Changed in landscape-client (Ubuntu):
status: New → Incomplete
Revision history for this message
Jamie Bennett (jamiebennett) wrote :
Revision history for this message
Jamie Bennett (jamiebennett) wrote :

Looks like chassis* and sys* are a little wonky. This is an Intel NUC btw.

Changed in landscape-client (Ubuntu):
status: Incomplete → Confirmed
Dave Jones (waveform)
Changed in landscape-client (Ubuntu):
assignee: nobody → Dave Jones (waveform)
status: Confirmed → In Progress
Revision history for this message
Dave Jones (waveform) wrote :
Changed in landscape-client (Ubuntu):
importance: Undecided → High
Dave Jones (waveform)
Changed in landscape-client (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 19.12-0ubuntu1

---------------
landscape-client (19.12-0ubuntu1) focal; urgency=medium

  * New upstream release 19.12:
    - Modernized packaging.
    - Added support for python-apt 1.9
    - Converted init script to systemd service.
    - Set default value if data_path is missing. (LP: #1728681)
    - Sysinfo: add support for multiple IPv6 addresses per interface.
      (LP: #829379)
    - Clear hash id database on package resync. (LP: #1616116)
    - Permit environments containing unicode chars for script execution.
      (LP: #1765518)
    - Set LANG in sysinfo wrapper. (LP: #1780071)
    - Avoid leaking memory through unused twisted logs. (LP: #1685885)
    - Handle unicode apt-sources-replace (LP: #1771443)
    - Add simfs to the whitelist of watched file-systems (LP: #1499104)
    - Return non-blank message when tasks already performed. (LP: #928933)
    - Overrid apt progress pulse(). (LP: #1758529)
    - Improvements on vm_info detection (LP: #1754073) (LP: #1799843)
      (LP: #1828217)
    - Remove the landscape url from motd output by removing LandscapeLink
      from the list of default landscape-sysinfo plugins. (LP: #1753936)

 -- Simon Poirier <email address hidden> Wed, 04 Dec 2019 14:12:24 +0000

Changed in landscape-client (Ubuntu):
status: Fix Committed → Fix Released
Simon Poirier (simpoir)
Changed in landscape-client (Ubuntu Bionic):
assignee: nobody → Simon Poirier (simpoir)
status: New → In Progress
Simon Poirier (simpoir)
description: updated
description: updated
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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