伙计们,美好的一天,我在 lxd 容器中运行景观。容器处于桥接模式。我将 lxdhost 添加到景观中,效果很好,据我所知,它连接正常。但是它没有报告它的包,这使得它对于补丁管理毫无用处,正如你可以想象的那样。所有系统都运行 ubuntu 18.04。如果我手动运行landscape-package-reporter,我会收到以下错误:
sudo landscape-package-reporter
[sudo] password for lxcuser:
2020-01-17 14:38:53,220 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/reporter.py", line 92, in <lambda>
result.addCallback(lambda x: self.request_unknown_hashes())
File "/usr/lib/python3/dist-packages/landscape/client/package/reporter.py", line 498, in request_unknown_hashes
self._facade.ensure_channels_reloaded()
File "/usr/lib/python3/dist-packages/landscape/lib/apt/package/facade.py", line 265, in ensure_channels_reloaded
self.reload_channels()
File "/usr/lib/python3/dist-packages/landscape/lib/apt/package/facade.py", line 253, in reload_channels
version, with_info=False).get_hash()
File "/usr/lib/python3/dist-packages/landscape/lib/apt/package/facade.py", line 402, in get_package_skeleton
return build_skeleton_apt(pkg, with_info=with_info, with_unicode=True)
File "/usr/lib/python3/dist-packages/landscape/lib/apt/package/skeleton.py", line 131, in build_skeleton_apt
version.record, "Provides", DEB_PROVIDES))
File "/usr/lib/python3/dist-packages/apt/package.py", line 690, in record
return Record(self._records.record)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 724: invalid start byte
有趣的是,所有其他容器都正常报告他们的包裹,没有任何问题。
我查看了脚本,但由于我的编程知识非常低,我找不到问题可能是什么。
也许你们中的一个人有一个想法。
问题(特别是位置 的问题
724
)与 Veeam 包列表中的一个杂散 unicode 字符有关,/var/lib/apt/lists/repository.veeam.com_backup_linux_agent_dpkg_debian_public_dists_stable_veeam_binary-amd64_Packages
. 我发现了这个我们已将此问题报告给 Veeam,因此它可能会很快得到修复,也可能不会很快得到修复(我将更新这篇文章)。
简单(但非永久性的方法)是删除
/var/lib/apt/lists/repository.veeam.com_backup_linux_agent_dpkg_debian_public_dists_stable_veeam_binary-amd64_Packages
.apt
但是,当更新veeam
包列表时,此更改将被覆盖。永久解决方案(只会被更新覆盖)是在相关代码周围
launchpad-client
添加try
/块except UnicodeError
skeleton.py
有关如何执行此操作的更多详细信息,请参阅我的博文。