[systemd-devel] [ANNOUNCE] Journal File Format Documentation
Ciprian Dorin Craciun
ciprian.craciun at gmail.com
Tue Oct 23 12:27:17 PDT 2012
On Tue, Oct 23, 2012 at 10:18 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Tue, 23.10.12 22:02, Ciprian Dorin Craciun (ciprian.craciun at gmail.com) wrote:
>> And the way I see benefiting from systemd would be creating
>> containers (like LXC) for each such "process".
>
> Our story regarding containers (i.e. where a new PID 1 in the container
> is running on a host system) is that we suggest that each container runs
> its own journald instance, and generates is own files, but registers
> that in the host via symlinks in /var/log/journal. See
>
> http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface
>
> for more info about that. That way "journalctl -m" on the host will show
> you all logs from all containers, nicely interleaved.
Aha. Thanks for that pointer. (The only issue with this is that I
must "trust" the service running inside the container to do the right
thing, which could be a problem if I run untrusted code that I want to
isolate.)
But I'll give this one a look.
>> In one word: a way to partition entries into multiple log files,
>> by setting this special field.
>
> As mentioned we have SplitMode= for this, but it is strictly for UIDs
> only, since we only need this for access control management, nothing
> else.
This could be another solution to my problem. Allocate a different
UID to each service.
> Why precisely do you want to split up your log files per-service? That's
> the bit I don't get.
Because in the envisaged PaaS, you have components (services)
starting and stopping. Thus I want to be able to easily just remove
logs for dead services, or maybe just move them to a different
"archival" service where they get deleted after a period of time.
It's purely for administrative purposes. Maybe even to allow the
user to download these log files independently.
But I understand now how to best solve this requirement without
touching the core journald.
Thanks,
Ciprian.
More information about the systemd-devel
mailing list