Bug 51332 - management/univention-management-console-module-diagnostic: migrate to python3
management/univention-management-console-module-diagnostic: migrate to python3
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Arvid Requate
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-05-19 14:32 CEST by Florian Best
Modified: 2021-05-25 15:57 CEST (History)
1 user (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 2020-05-19 14:32:38 CEST
The UMC module of management/univention-management-console-module-diagnostic has to be python3-compatible.
Comment 1 Arvid Requate univentionstaff 2020-10-29 12:54:42 CET
First steps done in branch arequate/bug49898-samba413
e729cecbc7 | Migrate to Python3
Comment 2 Florian Best univentionstaff 2021-01-13 14:44:01 CET
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/diagnostic/__init__.py", line 280, in execute
    result = execute(umc_module, **kwargs)
  File "/usr/lib/python3/dist-packages/univention/management/console/modules/diagnostic/plugins/55_user_migration.py", line 27, in run
    raise Critical(description + stdout, buttons=[{
TypeError: can only concatenate str (not "bytes") to str
Comment 3 Arvid Requate univentionstaff 2021-01-13 19:04:24 CET
That plugin can be removed, as it calls:

/usr/share/univention-directory-manager-tools/univention-migrate-users-to-ucs4.3: No such file or directory
Comment 4 Arvid Requate univentionstaff 2021-03-02 19:00:49 CET
No clue why that script was missing, it's present now:

univention-directory-manager-tools: /usr/share/univention-directory-manager-tools/univention-migrate-users-to-ucs4.3
Comment 5 Florian Best univentionstaff 2021-03-02 19:26:29 CET
The related commits are:

univention-management-console-module-diagnostic (6.0.0-5)
ab09d23ef258 | Bug #51332: adjust hashbangs to Python 3
d7c9731df4f8 | Bug #51332: Migrate diagnostic UMC module to Python3

ucs-test (10.0.1-24)
d7c9731df4f8 | Bug #51332: Migrate diagnostic UMC module to Python3
Comment 6 Florian Best univentionstaff 2021-03-02 20:00:02 CET
(In reply to Florian Best from comment #2)
> Traceback (most recent call last):
>   File
> "/usr/lib/python3/dist-packages/univention/management/console/modules/
> diagnostic/__init__.py", line 280, in execute
>     result = execute(umc_module, **kwargs)
>   File
> "/usr/lib/python3/dist-packages/univention/management/console/modules/
> diagnostic/plugins/55_user_migration.py", line 27, in run
>     raise Critical(description + stdout, buttons=[{
> TypeError: can only concatenate str (not "bytes") to str

This and some others were still unfixed. I did this in:

univention-management-console-module-diagnostic (6.0.0-7)
5d8008f9c53d | fixup! Bug #51332: Migrate diagnostic UMC module to Python3

I added a changelog entry:
changelog-5.0-0.xml
52751cdde87f | Changelog Bug #51332

OK: All tests are passing by default
~OK: we don't have tests for the correctness of the plugins
~OK: if a plugin is not correctly migrated if will at least fail with any exception/traceback.
Comment 7 Florian Best univentionstaff 2021-05-25 15:57:52 CEST
UCS 5.0 has been released:
 https://docs.software-univention.de/release-notes-5.0-0-en.html
 https://docs.software-univention.de/release-notes-5.0-0-de.html

If this error occurs again, please use "Clone This Bug".