journal: add concept of "journal namespaces"#14178
journal: add concept of "journal namespaces"#14178poettering merged 49 commits intosystemd:masterfrom
Conversation
|
This pull request introduces 1 alert when merging 74bc8c5 into d2a5659 - view on LGTM.com new alerts:
|
74bc8c5 to
61f9cd5
Compare
|
This pull request introduces 1 alert when merging 61f9cd5 into d2a5659 - view on LGTM.com new alerts:
|
61f9cd5 to
16fa91d
Compare
|
This pull request introduces 1 alert when merging 16fa91d into 870a2d8 - view on LGTM.com new alerts:
|
16fa91d to
20fc0f8
Compare
|
This pull request introduces 1 alert when merging 20fc0f8 into 88eb051 - view on LGTM.com new alerts:
|
20fc0f8 to
70cec3e
Compare
|
This pull request introduces 1 alert when merging 70cec3e into 88eb051 - view on LGTM.com new alerts:
|
70cec3e to
62adc71
Compare
|
force pushed a new version with issues @boucman noticed fixed! thanks! |
|
This pull request introduces 1 alert when merging 62adc71 into cb51560 - view on LGTM.com new alerts:
|
62adc71 to
ea1d14d
Compare
|
This pull request introduces 1 alert when merging ea1d14d into 26601a2 - view on LGTM.com new alerts:
|
ea1d14d to
9d559b7
Compare
|
This pull request introduces 1 alert when merging 9d559b7 into 41ab3b7 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Really excited for this feature! Looks good, though I only skimmed the varlink stuff. Some minor comments.
(Also I would really appreciate if you would split the refactoring stuff into a different PR so it would be easier to focus on the feature changes vs the style/refactors...)
9d559b7 to
568ae03
Compare
|
force pushed new version with the typo @anitazha pointed out fixed. |
| </varlistentry> | ||
|
|
||
| <varlistentry> | ||
| <term><option>--namespace=<replaceable>NAMESPACE</replaceable></option></term> |
There was a problem hiding this comment.
Can I do something like: +webserver,db,msgbus and have those three namespaces added to the default shown?
There was a problem hiding this comment.
nope, currently you specify one namespace and then optionally get the default one added in, that's all. Extending this eventually to a list of namespaces is pretty easy though, but let's do that later.
| <refnamediv> | ||
| <refname>journald.conf</refname> | ||
| <refname>journald.conf.d</refname> | ||
| <refname>journald@.conf</refname> |
There was a problem hiding this comment.
What is journald@.conf vs journald@<NAMESPACE>.conf? Is that the base template file that you build into a namespace configuration?
There was a problem hiding this comment.
that means nothing. It's just that the man page name is generated from what is specified here, and including <NAMESPACE> in the man page name makes it hard to type in the shell... Hence I figured we just write in in the template syntax systemd uses for units, even though it's a bit sloppy, since we don't do templating here...
|
This pull request introduces 1 alert when merging 568ae03 into fb4b046 - view on LGTM.com new alerts:
|
If we have exit on idle, then operations such as "journalctl --namespace=foo --rotate" should work even if the journal daemon is currently not running. (Note that we don't do activation by varlink for the main instance of journald, I am not sure the deadlocks it might introduce are worth it)
We already apply them to the directory in /var. Let's do the same in /run too. That's because due to the log namespace logic we nowadays can gain additional subdirs there during regular operation.
It doesn't get us much, but makes the differences between the templated and non-templated versions a bit smaller.
75491f3 to
1bd91d4
Compare
|
Force pushed a new version now. Addressed everything pointed out, except for the stuff I commented on, see above. No other changes. |
1bd91d4 to
ad23785
Compare
|
This pull request introduces 1 alert when merging ad23785 into 9a1862b - view on LGTM.com new alerts:
|
|
Given that I only fixed minor stuff in the last round, and the positive reviews from multiple reviewers, and the points left to discuss can still be done after merge, and the CI is all green, taking liberty to merge this! Thanks everyone for the reviews! |
|
Trying to run TEST-44-* under ASan/UBsan I noticed that it's flaky. As it turns out, "hello world" doesn't always end up anywhere and judging by the logs I managed to get from the container sometimes logs are just lost: I suspect it has something to do with short-lived processes because something like systemctl start systemd-journald@foobar
systemd-run -p LogNamespace=foobar echo 'hello world'or systemd-run -p LogNamespace=foobar sh -c 'echo hello world; sleep 10'seems to always work. I'm also wondering why |
This allows multi-instantiation of journal daemons, for logical separation and performance improvement.
Mostly an implementaiton of #12123.