Bug 55983 - ucsschool-id-connector should log to STDERR, let host do logrotation
ucsschool-id-connector should log to STDERR, let host do logrotation
Product: UCS@school
Classification: Unclassified
Component: ucsschool-id-connector
UCS@school 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Johannes Königer
Carlos García-Mauriño
Depends on: 52504 52501 52503
  Show dependency treegraph
Reported: 2023-04-18 15:50 CEST by Daniel Tröder
Modified: 2023-11-30 11:38 CET (History)
6 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?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Design
Max CVSS v3 score:


Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2023-04-18 15:50:18 CEST
Currently, the ID Connector from time to time stops logging or the output is sent to a non-existent file.
The loss of log entries is a critical problem in certain scenarios.

Change the ID Connector to send its log output to STDERR.
Then configure the host system to retrieve the logs from Docker and send it to a file (via rsyslog?).
Configure the host systems logrotate.
Comment 2 Daniel Tröder univentionstaff 2023-05-16 15:26:35 CEST
The problem seems to also apply to the Kelvin REST API.
Comment 3 Daniel Tröder univentionstaff 2023-05-16 15:28:23 CEST
The file handler does not seem to be closed correctly. The last rotated file and the current log file get corrupted:

-rw-rw-rw- 1 root root  11376 Mai 16 15:11 /var/log/univention/ucsschool-id-connector/queues.log
-rw-rw-rw- 1 root root  46656 Mai 16 15:11 /var/log/univention/ucsschool-id-connector/queues.log.2023-05-16_14

after a few minutes:

-rw-rw-rw- 1 root root  18960 Mai 16 15:17 /var/log/univention/ucsschool-id-connector/queues.log
-rw-rw-rw- 1 root root  77760 Mai 16 15:17 /var/log/univention/ucsschool-id-connector/queues.log.2023-05-16_14

after a few minutes:

-rw-rw-rw- 1 root root  22752 Mai 16 15:20 /var/log/univention/ucsschool-id-connector/queues.log
-rw-rw-rw- 1 root root  93312 Mai 16 15:20 /var/log/univention/ucsschool-id-connector/queues.log.2023-05-16_14
Comment 4 Daniel Tröder univentionstaff 2023-05-16 15:29:14 CEST
The above was created by patching the code to rotate every hour.
Comment 5 Jan-Luca Kiok univentionstaff 2023-05-16 17:50:11 CEST
As Logs get lost I have changed the assessment to a bug instead of a feature (while the latter is true from a implementation point of view it's not from the users perspective).
Comment 8 Johannes Königer univentionstaff 2023-11-30 11:38:48 CET
Fix was released with ucsschool-id-connector version 2.3.0.