Bug 46279 - [4.3] systemd-journald: Please introduce UCR variable for SplitMode
[4.3] systemd-journald: Please introduce UCR variable for SplitMode
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UCR
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.3-0-errata
Assigned To: Daniel Tröder
Arvid Requate
:
Depends on:
Blocks: 46750
  Show dependency treegraph
 
Reported: 2018-02-13 13:19 CET by Mathieu Simon
Modified: 2018-05-02 13:31 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Feature Request
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:
troeder: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Simon 2018-02-13 13:19:16 CET
Hi

We've had a customer whose UCS server with Samba and Proxy had log growth rate that required some 'taming' and we opted to modify SplitMode from 'uid' to 'login', since 'man systemd.conf':

SplitMode=
  Controls whether to split up journal files per user [...] If "login",          
  actually logged-in users will get each their own journal files, but users
  without login session and system users will log into the system journal.
  
However as of now, there is no such UCR variable available we could use for tuning when needed.

We'd (that is, the customer and I) appreciate if you'd introduce systemd/journald/SplitMode as UCR variable.

What do you think abou this since there are already other journald-Related options present in UCS 4.2

Best regards
Mathieu Simon, Adfinis SyGroup AG
Comment 1 Mathieu Simon 2018-03-26 18:24:40 CEST
Hi

The diff would be pretty easy and has been quickly validated against UCS 4.2-3
--- journald.conf.orig	2018-03-26 18:21:09.328186419 +0200
+++ journald.conf	2018-03-26 18:19:43.700183129 +0200
@@ -17,8 +17,13 @@
 	print "Storage=%s" % (value, )
 @!@#Compress=yes
 #Seal=yes
-#SplitMode=uid
-#SyncIntervalSec=5m
+@!@
+value = configRegistry.get('systemd/journald/SplitMode')
+if value is None:
+	print "SplitMode=uid"
+else:
+	print "SplitMode=%s" % (value, )
+@!@#SyncIntervalSec=5m
 #RateLimitInterval=30s
 #RateLimitBurst=1000
 @!@

Yes, the descriptions in (likely?) /etc/univention/templates/info/univention-base-files.info  ist still missing.

Looking forward to hearing from you.

If you prefer a pull request on github, please let me know.

-- Mathieu
Comment 2 Mathieu Simon 2018-03-26 19:23:03 CEST
Hmm, I saw you have moved the source to Github, nifty.

So let's try how this goes: 
https://github.com/univention/univention-corporate-server/pull/5/files
Comment 3 Daniel Tröder univentionstaff 2018-03-27 13:43:32 CEST
Thank you for the PR!

[4.3-0] d25168b4d5 Bug #46279: allow to set journald SplitMode by UCRV
[4.3-0] acf792c193 Bug #46279: changelog
[4.3-0] 4a6942a049 Bug #46279: advisory

univention-base-files (7.0.0-11)

Changes to UCS 4.2-3-errata will be tracked through Bug #46750.
Comment 4 Arvid Requate univentionstaff 2018-04-12 20:23:34 CEST
I've fixed a trivial typo in the variable description, but I don't think we need to rebuild the package for that (commit a22e7a0e17).

Verified:
* Code review: Ok
* Functional test: Ok
* Advisory: Ok
Comment 5 Arvid Requate univentionstaff 2018-04-12 20:26:03 CEST
c103fa8483 | Fix trivial typo
Comment 6 Arvid Requate univentionstaff 2018-05-02 13:31:20 CEST
<http://errata.software-univention.de/ucs/4.3/23.html>