src.nth.io/

summaryrefslogtreecommitdiff
path: root/pleroma
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2026-10-26 19:51:44 -0500
committerLuke Hoersten <[email protected]>2026-10-26 19:51:44 -0500
commit9fb1423d1659fcef72466abde0e0e1af016b923c (patch)
treec5732f1579af4a89b13de9456e9794d47a465066 /pleroma
parent2418d9d3eea87cd76b1ccccd5c24db585247fbcc (diff)
pleroma/otp: always migrate before starting; quiet the default logger
migrate db now always runs (gated only on the binary existing, not on whether this run freshly installed the shared release) and runs before the service starts, not after. installed_version only reflects whether THIS run upgraded the shared /opt/pleroma binary, not whether THIS instance's own database is migrated against it; gating migrate on that let every instance but whichever one's play ran first after an upgrade skip its own migration and crash-loop on "Unapplied Migrations detected" (hit this for real on nth_io and haskell_social after a 2.11.0 upgrade). pleroma_ctl migrate is a no-op when nothing's pending, so changed_when false keeps normal runs from reporting changed every time. Cap the default console logger handler (journald) at :warning: it had no level set, so info-level noise like telemetry attach notices and every SQL debug query were flooding the journal. ex_syslogger's own level was already set separately; this only affects the handler nothing else was touching.
Diffstat (limited to 'pleroma')
-rw-r--r--pleroma/otp/tasks/instance.yaml21
-rw-r--r--pleroma/otp/templates/config.exs.j28
2 files changed, 24 insertions, 5 deletions
diff --git a/pleroma/otp/tasks/instance.yaml b/pleroma/otp/tasks/instance.yaml
index a7bfdd4..fa7ca8a 100644
--- a/pleroma/otp/tasks/instance.yaml
+++ b/pleroma/otp/tasks/instance.yaml
@@ -63,10 +63,16 @@
mode: "0644"
when: pleroma_fe_theme is defined
-- name: ensure pleroma instance is enabled and started
- become: yes
- systemd: name="pleroma@{{pleroma_instance}}.service" enabled="yes" state="started"
-
+# Always, not just on a fresh install: /opt/pleroma's release binary is
+# shared across every pleroma instance on a host, but each instance has its
+# own database. installed_version (install.yaml) only reflects whether THIS
+# run installed a new shared release, not whether THIS instance's db has
+# been migrated against it, so gating migrate on that skipped it for every
+# instance but whichever one's play happened to run first after an upgrade,
+# leaving the others crash-looping on "Unapplied Migrations detected".
+# pleroma_ctl migrate is a no-op when nothing's pending, so there's no
+# reason to skip it. Runs before starting the service so an upgrade doesn't
+# briefly crash-loop before migrating.
- name: check if pleroma binary is present
stat:
path: "/opt/pleroma/bin/pleroma_ctl"
@@ -79,4 +85,9 @@
chdir: "/opt/pleroma/"
environment:
PLEROMA_CONFIG_PATH: "/etc/pleroma/{{pleroma_instance}}.config.exs"
- when: pleroma_binary.stat.exists and not installed_version.stat.exists
+ when: pleroma_binary.stat.exists
+ changed_when: false
+
+- name: ensure pleroma instance is enabled and started
+ become: yes
+ systemd: name="pleroma@{{pleroma_instance}}.service" enabled="yes" state="started"
diff --git a/pleroma/otp/templates/config.exs.j2 b/pleroma/otp/templates/config.exs.j2
index 6f09ec8..f726b2a 100644
--- a/pleroma/otp/templates/config.exs.j2
+++ b/pleroma/otp/templates/config.exs.j2
@@ -71,3 +71,11 @@ config :logger,
config :logger, :ex_syslogger,
level: :critical
+
+# The above only sets the ex_syslogger backend's level. Logger's separate
+# default console handler (stdout, captured by journald) has no level set
+# and prints everything: info-level telemetry attach notices, every SQL
+# debug query, etc. This caps it at warnings and errors without losing the
+# crash/error output journalctl is actually useful for.
+config :logger,
+ level: :warning

☐