[systemd-devel] [PATCH RFC] swap: use aliases to group swap units for same device

2012-10-18 Thread Zbigniew Jędrzejewski-Szmek
A series of .swap units "following" one another are replaced with a single unit with multiple names. The idea is to simplify things for the user: only one swap unit per swap area. It shouldn't matter whether the swap area was activated by systemd or by direct swapon invocation. The kernel name (fr

Re: [systemd-devel] journald reliability

2012-10-18 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Oct 18, 2012 at 07:02:28PM +0200, Lennart Poettering wrote: > On Thu, 18.10.12 16:10, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: > > But systemd has/had this information and could be queried for it. So I > > propose to add a cache of recently dead PIDs in systemd, that could be

Re: [systemd-devel] Starting/stopping service on net connection

2012-10-18 Thread Dan Tihelka
Hello, thank you for such a long and detailed answer. I do agree with you in general. Of course, there is an intersection of two words. On one side there is an init daemon being responsible for starting/stopping services. On the second side there is an network management system/daemon handling t

Re: [systemd-devel] [systemd-commits] man/sd_journal_query_unique.xml

2012-10-18 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Oct 18, 2012 at 10:41:56PM +0200, Lennart Poettering wrote: > On Thu, 18.10.12 21:19, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: > > Compiling the example from the man pages: > > list.c:21:20: warning: passing argument 2 of ‘sd_journal_enumerate_unique’ > > from incompatible po

Re: [systemd-devel] [systemd-commits] man/sd_journal_query_unique.xml

2012-10-18 Thread Lennart Poettering
On Thu, 18.10.12 21:19, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: > Hi, > some small problems: > > /bin/ld: warning: using 'LIBSYSTEMD_JOURNAL_38' as version for > 'sd_journal_query_unique' which is also named in version > 'LIBSYSTEMD_JOURNAL_195' in script > /bin/ld: warning: usin

Re: [systemd-devel] Race condition for service dependent on mount

2012-10-18 Thread David Strauss
On Thu, Oct 18, 2012 at 12:03 PM, Mirco Tischler wrote: > Every deviation I would count as a bug. Or is my logic flawed? That's my logic, too. Unfortunately, it's not what happens right now. -- David Strauss | da...@davidstrauss.net ___ systemd-dev

Re: [systemd-devel] [systemd-commits] man/sd_journal_query_unique.xml

2012-10-18 Thread Zbigniew Jędrzejewski-Szmek
Hi, some small problems: /bin/ld: warning: using 'LIBSYSTEMD_JOURNAL_38' as version for 'sd_journal_query_unique' which is also named in version 'LIBSYSTEMD_JOURNAL_195' in script /bin/ld: warning: using 'LIBSYSTEMD_JOURNAL_38' as version for 'sd_journal_enumerate_unique' which is also named in

Re: [systemd-devel] Race condition for service dependent on mount

2012-10-18 Thread Mirco Tischler
2012/10/18 David Strauss : > If a service depends on a mount, systemd doesn't properly wait for the > mount to complete before starting the service. This creates bad race > conditions where the service may write to the mount directory before > the mount is active, which can stop the mount from even

[systemd-devel] Race condition for service dependent on mount

2012-10-18 Thread David Strauss
If a service depends on a mount, systemd doesn't properly wait for the mount to complete before starting the service. This creates bad race conditions where the service may write to the mount directory before the mount is active, which can stop the mount from even completing successfully because th

Re: [systemd-devel] [PATCH 2/3 RFC] systemd: use structured logging for unit changes

2012-10-18 Thread Lennart Poettering
On Thu, 18.10.12 16:12, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: > Information which unit a log entry pertains to enables systemctl > status to display more log messages. The first two patches really look good, please go ahead and commit. Lennart -- Lennart Poettering - Red Hat,

Re: [systemd-devel] journald reliability

2012-10-18 Thread Lennart Poettering
On Thu, 18.10.12 16:10, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: > Hi, > > I've been playing with journald and journalctl, and have a few > thoughts about making the logs more reliable. > > First problem: it would be nice to tie more messages from systemd to > units, i.e. use more

Re: [systemd-devel] build error

2012-10-18 Thread Lennart Poettering
On Thu, 18.10.12 13:54, Michael Olbrich (m.olbr...@pengutronix.de) wrote: > Hi, > > The current systemd from git (v194-102-gd671da8) fails to build with: > > make[2]: *** No rule to make target `man/sd_journal_query_unique.3', needed > by `all-am'. Stop. > make[2]: *** Waiting for unfinished j

Re: [systemd-devel] [PATCH 2/3 RFC] systemd: use structured logging for unit changes

2012-10-18 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Oct 18, 2012 at 04:44:39PM +0200, Marius Tolzmann wrote: > > Hi.. > > On 10/18/12 16:12, Zbigniew Jędrzejewski-Szmek wrote: > > Information which unit a log entry pertains to enables systemctl > > status to display more log messages. > > --- > > @@ -1022,7 +1024,11 @@ int exec_spawn(ExecC

Re: [systemd-devel] [PATCH 2/3 RFC] systemd: use structured logging for unit changes

2012-10-18 Thread Marius Tolzmann
Hi.. On 10/18/12 16:12, Zbigniew Jędrzejewski-Szmek wrote: > Information which unit a log entry pertains to enables systemctl > status to display more log messages. > --- > @@ -1022,7 +1024,11 @@ int exec_spawn(ExecCommand *command, > > r = exec_context_load_environment(context, &files

[systemd-devel] [PATCH 3/3 RFC] log: try to repeat sendmsg a few times

2012-10-18 Thread Zbigniew Jędrzejewski-Szmek
Queue size for unix datagrams is set globally and can be quite small (e.g. 10). This means that if journald is not keeping up, it is very easy to fill up the queue and loose messages. To alleviate this problem, messages are queued on the sender side, and pushed out repeatedly with sendmmsg. A repea

[systemd-devel] [PATCH 2/3 RFC] systemd: use structured logging for unit changes

2012-10-18 Thread Zbigniew Jędrzejewski-Szmek
Information which unit a log entry pertains to enables systemctl status to display more log messages. --- src/core/execute.c| 32 +--- src/core/selinux-access.c | 2 +- src/core/service.c| 19 --- src/core/unit.c | 5 - sr

[systemd-devel] [PATCH 1/3] core/execute: use cleanup_strv_free

2012-10-18 Thread Zbigniew Jędrzejewski-Szmek
--- In preparation for the following patches... src/core/execute.c | 42 -- 1 file changed, 12 insertions(+), 30 deletions(-) diff --git a/src/core/execute.c b/src/core/execute.c index cb703cb..5faeee8 100644 --- a/src/core/execute.c +++ b/src/core/execute

[systemd-devel] journald reliability

2012-10-18 Thread Zbigniew Jędrzejewski-Szmek
Hi, I've been playing with journald and journalctl, and have a few thoughts about making the logs more reliable. First problem: it would be nice to tie more messages from systemd to units, i.e. use more structured logging. I'll follow up with a patch which does that, and I'm wondering if this is

Re: [systemd-devel] stdout logging to journal doesn't survive journal restart

2012-10-18 Thread Colin Guthrie
'Twas brillig, and Dave Reisner at 18/10/12 08:32 did gyre and gimble: > Hey, > > I'm noticing that if you ever have to restart the journal, services > which log to /run/systemd/journal/stdout lose their connection. You can > reproduce this systemd-cat pretty easily: > > ( { > echo "this is

Re: [systemd-devel] PrivateTmp and systemd-tmpfiles

2012-10-18 Thread Lukáš Nykrýn
Kay Sievers píše v St 17. 10. 2012 v 18:28 +0200: > On Wed, Oct 17, 2012 at 6:10 PM, Lennart Poettering > wrote: > > On Wed, 17.10.12 14:16, Lukáš Nykrýn (lnyk...@redhat.com) wrote: > > > >> Hello, > >> Today I have read this bug > >> https://bugzilla.redhat.com/show_bug.cgi?id=866693 and describe

[systemd-devel] [PATCH] make sure __NR_name_to_handle_at is correctly defined

2012-10-18 Thread Michael Olbrich
341 is only valid for x86, so don't use it for other architectures. Add the correct numbers for ARM and PowerPC while at it. --- src/shared/missing.h | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/shared/missing.h b/src/shared/missing.h index 1a31066..1965

[systemd-devel] build error

2012-10-18 Thread Michael Olbrich
Hi, The current systemd from git (v194-102-gd671da8) fails to build with: make[2]: *** No rule to make target `man/sd_journal_query_unique.3', needed by `all-am'. Stop. make[2]: *** Waiting for unfinished jobs I think man/sd_journal_query_unique.xml should have been added in 3c1668d journa

Re: [systemd-devel] [PATCH] core: allow Type=oneshot services to have ExecReload

2012-10-18 Thread David Strauss
On Mon, Oct 15, 2012 at 4:39 PM, Lennart Poettering wrote: > Did you check whether we documented the old behaviour somewhere in the > man pages? Might be something to remove now, too. (From a quick glance I > couldn't find anything mentioned, did you look too?) I've read most of the man pages, es

[systemd-devel] stdout logging to journal doesn't survive journal restart

2012-10-18 Thread Dave Reisner
Hey, I'm noticing that if you ever have to restart the journal, services which log to /run/systemd/journal/stdout lose their connection. You can reproduce this systemd-cat pretty easily: ( { echo "this is logged" echo "sleep 5 seconds..." >&2 sleep 5 echo "done sleeping" >&2