Ubuntu 21.04 (Hirsute) MOTD network section is broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Client |
New
|
Undecided
|
Unassigned | ||
landscape-client (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
```
Welcome to Ubuntu 21.04 (GNU/Linux 5.11.0-16-generic x86_64)
* Documentation: https:/
* Management: https:/
* Support: https:/
System information as of Fri Apr 23 14:15:44 EDT 2021
System load: 4.09 Swap usage: 0% Users logged in: 0
Usage of /: 7.9% of 438.62GB Temperature: 73.0 C
Memory usage: 2% Processes: 241
=> There were exceptions while processing one or more plugins. See
/var/
* Pure upstream Kubernetes 1.21, smallest, simplest cluster ops!
0 updates can be installed immediately.
0 of these updates are security updates.
Last login: Fri Apr 23 12:04:04 2021 from 192.168.39.125
```
In the `sysinfo.log` file:
```
2021-04-23 17:13:14,425 ERROR Network plugin raised an exception.
Traceback (most recent call last):
File "/usr/lib/
result = plugin.run()
File "/usr/lib/
device_info = self._get_
File "/usr/lib/
speed, duplex = get_network_
File "/usr/lib/
res = status_
AttributeError: 'array.array' object has no attribute 'tostring'
```
Upon investigation, `tostring()` method in Python array was deprecated in 3.9 (The default Python version in 21.04?)
On 20.10:
```
Python 3.8.6 (default, Jan 27 2021, 15:42:20)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from array import array
>>> array('
b''
```
On 21.04:
```
Python 3.9.4 (default, Apr 4 2021, 19:38:44)
[GCC 10.2.1 20210401] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from array import array
>>> array('
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'array.array' object has no attribute 'tostring'
```
The fix would simply be replacing `tostring()` with `tobytes()`
`tostring` was deprecated since Python 3.2, and was removed in 3.9
https:/
PS: I have upgraded my installation from 20.10 instead of brand new installation of the 21.04 release ISO. Not sure if that changes anything, the source I find here still uses `tostring()` https:/
From apt-cache policy:
```
landscape-client:
Installed: (none)
Candidate: 19.12-0ubuntu9
Version table:
19.12-0ubuntu9 500
500 http://
```
The attachment "network.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]