** Description changed: + + [ Impact ] + + * When the C.UTF-8 locales is not installed, landscape-client's package + reporter service fails to start: + + Traceback (most recent call last): + File "/usr/bin/landscape-package-reporter", line 10, in <module> + main(sys.argv[1:]) + File "/usr/lib/python3/dist-packages/landscape/client/package/reporter.py", line 872, in main + locale.setlocale(locale.LC_CTYPE, ("C", "UTF-8")) + File "/usr/lib/python3.8/locale.py", line 608, in setlocale + return _setlocale(category, locale) + locale.Error: unsupported locale setting + + * This prevents landscape-client from reporting packages, preventing + all subsequent package activities. + + [ Test Plan ] + + * Edit /etc/default/locale to contain LANG=en_GB.UTF-8 + * Run `sudo dpkg-reconfigure locales` and select only en_GB.UTF-8 and select + en_GB.UTF-8 as default locale + * sudo apt install landscape-client + * Attempt to start package-reporter: + + sudo landscape-package-reporter + + Package Reporter should start without any exceptions. There will be no output + and the process will not exit unless killed. + + * Register landscape-client with landscape server and wait for the package + reporter log to appear at /var/log/landscape/package-reporter.log. The log + should not contain any errors. + + * Test again using a non-UTF-8 locale setting instead of en_GB.UTF-8 + + [ Where problems could occur ] + + * As this is a reversion of a previous fix for a bug regarding locales, that + issue might re-occur with non-UTF-8 locales. A comment in LP: #1827857 claims + this has been fixed in python-apt, though. + + * Packages with control file fields containing non-ASCII characters may be + reported incorrectly. The Debian Policy Manual says that package names cannot + contain these but other fields might, + + [ Other Info ] + + <ORIGINAL BUG REPORT FOLLOWS> + OS: Ubuntu 20.04.6 LTS Landscape client: 23.02-0ubuntu1 Due to missing locale, the landscape client couldn't report the list of installed packages to the landscape server (SAAS). 2023-05-10 17:23:10,675 WARNING [MainThread] Package reporter output: b'Traceback (most recent call last): - File "/usr/bin/landscape-package-reporter", line 10, in <module> - main(sys.argv[1:]) - File "/usr/lib/python3/dist-packages/landscape/client/package/reporter.py", line 872, in main - locale.setlocale(locale.LC_CTYPE, ("C", "UTF-8")) - File "/usr/lib/python3.8/locale.py", line 608, in setlocale - return _setlocale(category, locale) + File "/usr/bin/landscape-package-reporter", line 10, in <module> + main(sys.argv[1:]) + File "/usr/lib/python3/dist-packages/landscape/client/package/reporter.py", line 872, in main + locale.setlocale(locale.LC_CTYPE, ("C", "UTF-8")) + File "/usr/lib/python3.8/locale.py", line 608, in setlocale + return _setlocale(category, locale) locale.Error: unsupported locale setting ' As a result, the server kept reporting available updates for the machine and when the update was triggered it failed with the following error reported in the task activity. "Package data has changed. Please retry the operation." For example on the affected client machine the "apt list --installed | grep dnsmasq-base" gives the output - "dnsmasq-base/focal-updates,focal-security,now 2.80-1.1ubuntu1.7 amd64 + "dnsmasq-base/focal-updates,focal-security,now 2.80-1.1ubuntu1.7 amd64 However, landscape server keeps reporting that update (2.80-1.1ubuntu1.7) is available.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2020064 Title: locale.Error: unsupported locale setting To manage notifications about this bug go to: https://bugs.launchpad.net/landscape-client/+bug/2020064/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs