Bug 49403 - Traceback unix.py: AttributeError select.error.errno
Traceback unix.py: AttributeError select.error.errno
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Virtualization - UVMM
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-0-errata
Assigned To: Philipp Hahn
Erik Damrose
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-02 09:13 CEST by Philipp Hahn
Modified: 2019-05-08 13:26 CEST (History)
0 users

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 7: Crash: Bug causes crash or data loss
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.040
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
hahn: Patch_Available+


Attachments
Untested patch (1.06 KB, patch)
2019-05-02 09:13 CEST, Philipp Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2019-05-02 09:13:26 CEST
Created attachment 9999 [details]
Untested patch

==> virtual-machine-manager-daemon-errors.log <==
Traceback (most recent call last):
  File "/usr/sbin/univention-virtual-machine-manager-daemon", line 310, in <module>
    unix(options)
  File "/usr/lib/pymodules/python2.7/univention/uvmm/unix.py", line 206, in unix
    if ex.errno == errno.EINTR:
AttributeError: 'error' object has no attribute 'errno'

src/univention/uvmm/unix.py:
205 »···»···except (select.error, socket.error) as ex:
206 »···»···»···if ex.errno == errno.EINTR:                                                                                          

$ python -c '__import__("socket").error().errno'
$ python -c '__import__("select").error().errno'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'error' object has no attribute 'errno'

<https://docs.python.org/2/library/select.html#select.error>:
> The exception raised when an error occurs. The accompanying value is a pair containing the numeric error code from errno and the corresponding string, as would be printed by the C function perror().

python -c 'import select, errno
try:
  select.select([255], [], [], 1.0)
except select.error as ex:
  errno_, errstr = ex.args
  print(errno_, errno.errorcode[errno_], errstr)'
Comment 1 Philipp Hahn univentionstaff 2019-05-02 09:54:12 CEST
Found while looking at Bug #48536
The bug is harmless as UVMMd is automatically restarted, but let's fix this simple issue now before it gets worse.
QA: I have no reproducer, so code-review is okay by me.

[4.4-0] 91e911fa63 Bug #49403 uvmm: Fix traceback in select.error handling
 .../univention-virtual-machine-manager-daemon/debian/changelog     | 6 ++++++
 .../src/univention/uvmm/unix.py                                    | 7 ++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

Package: univention-virtual-machine-manager-daemon
Version: 8.0.1-7A~4.4.0.201905020948
Branch: ucs_4.4-0
Scope: errata4.4-0

[4.4-0] c3ddb73c18 Bug #49403: univention-virtual-machine-manager-daemon 8.0.1-7A~4.4.0.201905020948
 .../staging/univention-virtual-machine-manager-daemon.yaml     | 10 ++++++++++
 1 file changed, 10 insertions(+)
Comment 2 Erik Damrose univentionstaff 2019-05-07 16:20:07 CEST
OK: code review
OK: yaml
Verified
Comment 3 Arvid Requate univentionstaff 2019-05-08 13:26:24 CEST
<http://errata.software-univention.de/ucs/4.4/87.html>