Bug 58448 - Kelvin API fails to create OU if ucsschool/singlemaster=true
Summary: Kelvin API fails to create OU if ucsschool/singlemaster=true
Status: CLOSED FIXED
Alias: None
Product: UCS@school
Classification: Unclassified
Component: HTTP-API (Kelvin)
Version: UCS@school 5.2
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: Silas Wieberneit
QA Contact: Johannes Königer
URL:
Keywords:
: 55506 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-07-03 17:54 CEST by Sönke Schwardt-Krummrich
Modified: 2025-09-02 16:27 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.086
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2025-07-03 17:54:05 CEST
If ucsschool/singlemaster=true is set for the Kelvin API, the pytests fail to create a OU in create_ou_using_python() in test_route_user.py. In a single server env, create_ou_kwargs() sets "edu_name" to the hostname of the primary directory node.
For some reason, the library code tries to create a school server (replica directory node) with the hostname of the primary node, which obviously fails:

FAILED tests/test_route_user.py::test_create[staff] - udm_rest_client.exceptions.CreateError: 1 error(s) occurred:Request argument "dn" Object exists: (uid): The username is already in use as username or as groupname: master$.

This is not limited to staff users, but also failed for school_admin and teacher_and_staff.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2025-07-03 17:57:09 CEST
Wrong file: test_route_user.py → ucsschool/lib/tests/conftest.py
Comment 2 Jürn Brodersen univentionstaff 2025-07-23 13:25:01 CEST
*** Bug 55506 has been marked as a duplicate of this bug. ***
Comment 3 Jürn Brodersen univentionstaff 2025-09-02 16:27:59 CEST
UCS@school Kelvin REST API 3.0.0 has been released.

https://docs.software-univention.de/ucsschool-kelvin-rest-api/changelog.html#v3-0-0-2025-09-02

If this error occurs again, please clone this bug.