Bug 53342 - Migrate univention-ssh to Python 3
Migrate univention-ssh to Python 3
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: SSH
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-0-errata
Assigned To: Eduardo Ruiz Moreno
Florian Best
: python3-migration
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-05-27 16:11 CEST by Florian Best
Modified: 2021-10-13 16:18 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2021-05-27 16:11:30 CEST
univention-ssh should be migrated to be Python 3 compatible.

base/univention-ssh/univention-ssh.in
Comment 2 Philipp Hahn univentionstaff 2021-10-08 08:51:59 CEST
test/ucs-test/tests/01_base/40univention-ssh_timeout is failing for UCS-5.0-0 for all roles <https://jenkins.knut.univention.de:8181/job/UCS-5.0/job/UCS-5.0-0/job/AutotestJoin/591/>
Comment 3 Philipp Hahn univentionstaff 2021-10-08 08:52:39 CEST
Also the upgrade tests: <https://jenkins.knut.univention.de:8181/job/UCS-5.0/job/UCS-5.0-0/job/AutotestUpgrade/272/>
Comment 4 Florian Best univentionstaff 2021-10-08 13:30:42 CEST
https://docs.python.org/3/library/os.html#os.waitpid says:
Changed in version 3.5: If the system call is interrupted and the signal handler does not raise an exception, the function now retries the system call instead of raising an InterruptedError exception (see PEP 475 for the rationale).

So, for equal behavior we need to `raise TimeoutError` and catch this as well (for all the signals).
Comment 5 Eduardo Ruiz Moreno univentionstaff 2021-10-12 12:36:05 CEST
File univention-ssh migrated to Python 3
Fixed Timeout parameter
Comment 6 Eduardo Ruiz Moreno univentionstaff 2021-10-13 11:01:45 CEST
Timeout paramenter should be changed due Python 3.5: If the system call is interrupted and the signal handler does not raise an exception,
the function now retries the system call instead of raising an InterruptedError exception
Comment 7 Florian Best univentionstaff 2021-10-13 14:39:09 CEST
OK: python3 migration
OK: timeout
OK: Jenkins-Tests
OK: YAML Advisory

univention-ssh.yaml
8b11f6a5be05 | Bug #53342: update YAML for univention-ssh
943568d45247 | Bug #53342: update YAML for univention-ssh
4e9de063b114 | Bug #53342: update YAML for univention-ssh
cda6f8211ef8 | Bug #53342: migrated univention-ssh.in to Python 3

univention-ssh (11.0.0-3)
054f97c470fc | Bug #53342: migrated univention-ssh.in to Python 3

univention-ssh (11.0.0-2)
cda6f8211ef8 | Bug #53342: migrated univention-ssh.in to Python 3