** Description changed: [ Impact ] * The version of Landscape Client in the Ubuntu main repository for Focal and Jammy fails to report package information Landscape Server when the client machine has lsb modules installed (ex. lsb-core) as a `ValueError` is raised when attempting to parse the output. [ Test Plan ] * `sudo apt update && sudo apt install -y landscape-client` * `lsb_release -a # Check no lsb modules` * `sudo apt-get install -y lsb-core # install lsb module` * `sudo landscape-config --silent --url="$LANDSCAPE_ROOT_URL/message- system" --ping-url="$LANDSCAPE_ROOT_URL/ping" --account-name $ACCOUNT_NAME --registration-key $REGISTRATION_KEY --computer-title $HOSTNAME` * Accept the machine's registration if needed and wait for package reporting to (try and) check the logs: * tail /var/log/landscape/package-reporter.log * You should see `ValueError: too many values to unpack`. - * In a fresh instance, install an LSB module, and the proposed - Landscape Client: + * In a fresh instance, install an LSB module and the proposed Landscape + Client: - * sudo apt install -y lsb-core landscape-client # should pull new - version + * sudo apt install -y lsb-core - * Now register the container with Landscape Server, wait for package- + * Now register the client with Landscape Server, wait for package- reporter to run again and verify no errors are raised. * Additionally, make sure that package-reporter can report package information to the server properly. [ Where problems could occur ] * Because the fix also changed the approach to read the os-release file instead of the lsb_release command output, this could introduce unforeseen behavior with code that was written with the original implementation in mind. * However, without these fixes, Landscape Client cannot report package data with lsb modules installed so it is hard to imagine how this would be worse. [ Other Info ] * GH PR for the fix: https://github.com/canonical/landscape- client/pull/170 -------- Original bug report below: -------- Package reporter from landscape client is failing to report to server because seemingly of a lsb parse issue. /var/log/landscape/package-reporter.log 2023-08-10 13:42:00,414 ERROR [MainThread] None Traceback (most recent call last): File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 653, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/usr/lib/python3/dist-packages/landscape/client/package/taskhandler.py", line 217, in got_server_uuid lsb_release_info = parse_lsb_release(self.lsb_release_filename) File "/usr/lib/python3/dist-packages/landscape/lib/lsb_release.py", line 31, in parse_lsb_release dist, desc, release, code_name, _ = lsb_info.decode().split("\n") ValueError: too many values to unpack (expected 5) Multiple LSB Packages are installed /usr/bin/lsb_release LSB Version: core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch lsb_release -a LSB Version: core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch Distributor ID: Ubuntu Description: Ubuntu 18.04.3 LTS Release: 18.04 Codename: bionic
** Description changed: [ Impact ] * The version of Landscape Client in the Ubuntu main repository for Focal and Jammy fails to report package information Landscape Server when the client machine has lsb modules installed (ex. lsb-core) as a `ValueError` is raised when attempting to parse the output. [ Test Plan ] * `sudo apt update && sudo apt install -y landscape-client` * `lsb_release -a # Check no lsb modules` * `sudo apt-get install -y lsb-core # install lsb module` * `sudo landscape-config --silent --url="$LANDSCAPE_ROOT_URL/message- system" --ping-url="$LANDSCAPE_ROOT_URL/ping" --account-name $ACCOUNT_NAME --registration-key $REGISTRATION_KEY --computer-title $HOSTNAME` * Accept the machine's registration if needed and wait for package reporting to (try and) check the logs: * tail /var/log/landscape/package-reporter.log * You should see `ValueError: too many values to unpack`. - * In a fresh instance, install an LSB module and the proposed Landscape - Client: - - * sudo apt install -y lsb-core + * In a fresh instance, install an LSB module (ex. `lsb-core`) and the + proposed version of Landscape Client. * Now register the client with Landscape Server, wait for package- reporter to run again and verify no errors are raised. * Additionally, make sure that package-reporter can report package information to the server properly. [ Where problems could occur ] * Because the fix also changed the approach to read the os-release file instead of the lsb_release command output, this could introduce unforeseen behavior with code that was written with the original implementation in mind. * However, without these fixes, Landscape Client cannot report package data with lsb modules installed so it is hard to imagine how this would be worse. [ Other Info ] * GH PR for the fix: https://github.com/canonical/landscape- client/pull/170 -------- Original bug report below: -------- Package reporter from landscape client is failing to report to server because seemingly of a lsb parse issue. /var/log/landscape/package-reporter.log 2023-08-10 13:42:00,414 ERROR [MainThread] None Traceback (most recent call last): File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 653, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/usr/lib/python3/dist-packages/landscape/client/package/taskhandler.py", line 217, in got_server_uuid lsb_release_info = parse_lsb_release(self.lsb_release_filename) File "/usr/lib/python3/dist-packages/landscape/lib/lsb_release.py", line 31, in parse_lsb_release dist, desc, release, code_name, _ = lsb_info.decode().split("\n") ValueError: too many values to unpack (expected 5) Multiple LSB Packages are installed /usr/bin/lsb_release LSB Version: core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch lsb_release -a LSB Version: core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch Distributor ID: Ubuntu Description: Ubuntu 18.04.3 LTS Release: 18.04 Codename: bionic -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2031036 Title: Error when parsing lsb_release, landscape-package-reporter unable to report package list to server To manage notifications about this bug go to: https://bugs.launchpad.net/landscape-client/+bug/2031036/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs