osism / issues

This repository is used for bug reports that are cross-project or not bound to a specific repository (or to an unknown repository).
https://www.osism.tech
1 stars 1 forks source link

Add support for sd-journald logging #1159

Open killermoehre opened 3 weeks ago

killermoehre commented 3 weeks ago

oslo.log has support to log into systemd-journald, which adds more metadata and a unified log interface.

For this to work,

  1. systemd-python has to be available inside the container,
  2. /run/systemd/journal/socket needs to be bind-mounted inside the container and
  3. the application using oslo.log needs a
    [DEFAULT]
    use_journal = true

By logging into the journal we gain structured, easy-to-ship logs and don't have to hassle with custom log rotation.

The same is true for ceph, which logs already to sd-journald if possible.

berendt commented 3 weeks ago

@killermoehre We need run/systemd/journal/socket in all OpenStack service containers?

killermoehre commented 3 weeks ago

@killermoehre We need run/systemd/journal/socket in all OpenStack service containers?

Yes, because that's where the messages are logged to.

Alternative would be to run full systemd in the container instead oft the simple init process.