mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
config: Set volatile logging by default
This reduces the number of writes to the disk improving disk longevity and IO performance. Note that systemd-journald is already very reasonable with how often it writes to the disk. It's flush interval is 5 minutes. Most users of FreedomBox are not expected to see logs. Those that see the logs do so for debugging purposes. Debugging can still be done if reboot does not occur. Users can change the logging mode to 'persistent' before debugging issues that require reboot. This makes debugging harder for non-reproducible bugs, but is, at present, considered an acceptable compromise. Tests: - On a fresh container, with the patch applied, config page shows 'volatile' as the logging mode. - On an container with changes not applied, start freedombox service. Then apply the patch and restart service. config app setup will be run. Config page shows 'volatile' as the logging mode. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
80a203bd23
commit
8c4999eabd
@ -19,6 +19,8 @@ from plinth.modules.names.components import DomainType
|
||||
from plinth.package import Packages
|
||||
from plinth.signals import domain_added
|
||||
|
||||
from . import privileged
|
||||
|
||||
_description = [
|
||||
_('Here you can set some general configuration options '
|
||||
'like hostname, domain name, webserver home page etc.')
|
||||
@ -40,7 +42,7 @@ class ConfigApp(app_module.App):
|
||||
|
||||
app_id = 'config'
|
||||
|
||||
_version = 3
|
||||
_version = 4
|
||||
|
||||
can_be_disabled = False
|
||||
|
||||
@ -195,6 +197,9 @@ def setup(helper, old_version=None):
|
||||
app.setup(old_version)
|
||||
_migrate_home_page_config()
|
||||
|
||||
if old_version <= 3:
|
||||
privileged.set_logging_mode('volatile')
|
||||
|
||||
# systemd-journald is socket activated, it may not be running and it does
|
||||
# not support reload.
|
||||
actions.superuser_run('service', ['try-restart', 'systemd-journald'])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user