Re: [systemd-devel] [PATCH v3 2/2] nspawn: make nspawn robust to container failure

2014-05-24 Thread Lennart Poettering
On Sat, 24.05.14 14:58, Djalal Harouni (tix...@opendz.org) wrote: Applied both. Thanks! However, I am not too convinced about the clone() thing in shared/eventfd-util.[ch]. That sounds too specific to be shared betwen more than one tool. I have the suspicion that we really should move that code b

Re: [systemd-devel] [PATCH 2/2] test-path-util: add tests for path_make_relative()

2014-05-24 Thread Lennart Poettering
On Sat, 24.05.14 12:01, Tanu Kaskinen (tanu.kaski...@linux.intel.com) wrote: Thanks a lot for putting this together! Much appreciated! Applied! > --- > src/test/test-path-util.c | 22 ++ > 1 file changed, 22 insertions(+) > > diff --git a/src/test/test-path-util.c b/src/test

Re: [systemd-devel] [PATCH] Use %m instead of strerror(errno) where appropiate

2014-05-24 Thread Lennart Poettering
On Sat, 24.05.14 00:10, Cristian Rodríguez (crrodrig...@opensuse.org) wrote: Thanks! Applied! > --- > src/journal/sd-journal.c| 6 ++ > src/libsystemd-network/sd-dhcp-client.c | 4 ++-- > src/nspawn/nspawn.c | 2 +- > src/shared/label.c

Re: [systemd-devel] [PATCH] test-unit-file: skip if unit_file_get_list returns permission denied

2014-05-24 Thread Lennart Poettering
On Sat, 24.05.14 12:16, Cristian Rodríguez (crrodrig...@opensuse.org) wrote: Applied. Thanks! > --- > src/test/test-unit-file.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c > index 63a8a7d..4813342 100644 > --- a/src/test/t

Re: [systemd-devel] Device units and LXC

2014-05-24 Thread Lennart Poettering
On Sat, 24.05.14 15:19, Richard Weinberger (rich...@nod.at) wrote: > Hi! > > As of my understanding of systemd, device units depend hard udev. > Units like network@.service contain lines like > "BindsTo=sys-subsystem-net-devices-%i.device" > Within a Linux container this is a problem because the

Re: [systemd-devel] [PATCH] Fix several small typos

2014-05-24 Thread Zbigniew Jędrzejewski-Szmek
On Fri, May 23, 2014 at 11:56:42AM -0700, Jonathan Boulle wrote: > Fix some small comment/log typos Applied. Zbyszek ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] [PATCH] test-unit-file: skip if unit_file_get_list returns permission denied

2014-05-24 Thread Cristian Rodríguez
--- src/test/test-unit-file.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c index 63a8a7d..4813342 100644 --- a/src/test/test-unit-file.c +++ b/src/test/test-unit-file.c @@ -48,6 +48,12 @@ static int test_unit_file_get_set(void) {

Re: [systemd-devel] [RFC] nspawn: make nspawn robust to container failure

2014-05-24 Thread Djalal Harouni
On Thu, May 22, 2014 at 02:52:08AM +0200, Lennart Poettering wrote: > On Fri, 02.05.14 16:45, Djalal Harouni (tix...@opendz.org) wrote: > > > nspawn and the container child use eventfd to wait and notify each other > > that they are ready so the container setup can be completed. > > Looks good, b

[systemd-devel] [PATCH v3 2/2] nspawn: make nspawn robust to container failure

2014-05-24 Thread Djalal Harouni
nspawn and the container child use eventfd to wait and notify each other that they are ready so the container setup can be completed. However in its current form the wait/notify event ignore errors that may especially affect the child (container). On errors the child will jump to the "child_fail"

[systemd-devel] [PATCH v3 1/2] nspawn: move container wait logic into wait_for_container()

2014-05-24 Thread Djalal Harouni
Move the container wait logic into its own wait_for_container() function and add two status codes: CONTAINER_TERMINATED or CONTAINER_REBOOTED. The status will be stored in its argument, this way we handle: a) Return negative on failures. b) Return zero on success and set the status to either CON

[systemd-devel] Device units and LXC

2014-05-24 Thread Richard Weinberger
Hi! As of my understanding of systemd, device units depend hard udev. Units like network@.service contain lines like "BindsTo=sys-subsystem-net-devices-%i.device" Within a Linux container this is a problem because there is no udev. There systemd never receives an event for this device and the dev

Re: [systemd-devel] [PATCH 3/3] nspawn: allow to bind mount journal on top of a non empty container journal dentry

2014-05-24 Thread Djalal Harouni
On Thu, May 22, 2014 at 08:23:41AM +0200, Lennart Poettering wrote: > On Tue, 29.04.14 00:15, Djalal Harouni (tix...@opendz.org) wrote: > > > > > On Fri, Apr 25, 2014 at 08:30:36PM +0200, Tom Gundersen wrote: > > > On Fri, Apr 11, 2014 at 2:45 AM, Djalal Harouni wrote: > > > > Currently if nspaw

Re: [systemd-devel] [RFC][PATCH] sd-dhcp-client: return NULL from _unref() like the other sd-* libraries

2014-05-24 Thread Tom Gundersen
On Sat, May 24, 2014 at 2:58 AM, Lennart Poettering wrote: > On Thu, 22.05.14 15:29, Tom Gundersen (t...@jklm.no) wrote: > >> Let's keep this behavior consistent across our libraries. >> >> In order to keep the refcounting working, a DONT_DESTROY macro similar >> to the one in sd-bus was introduce

[systemd-devel] [PATCH 1/2] path-util: fix missing terminating zero

2014-05-24 Thread Tanu Kaskinen
There was this code: if (to_path_len > 0) memcpy(p, to_path, to_path_len); That didn't add the terminating zero, so the resulting string was corrupt if this code path was taken. Using strcpy() instead of memcpy() solves this issue, and also simplifies the code. Previousl

[systemd-devel] [PATCH 2/2] test-path-util: add tests for path_make_relative()

2014-05-24 Thread Tanu Kaskinen
--- src/test/test-path-util.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c index 0aa0bf1..9f8ae4d 100644 --- a/src/test/test-path-util.c +++ b/src/test/test-path-util.c @@ -170,10 +170,32 @@ static void test_fsck_

[systemd-devel] [PATCH 0/2] path_make_relative() fix and tests

2014-05-24 Thread Tanu Kaskinen
I recently added path_make_relative() to path-util, and Lennart asked me to write a test case for it. It's good that he did, because that revealed a serious bug that I had somehow missed in my initial testing. Tanu Kaskinen (2): path-util: fix missing terminating zero test-path-util: add tests

[systemd-devel] failed to bring up bonding interface (dracut+system)

2014-05-24 Thread Vasiliy Tolstov
Hello. I'm using dracut to create initramfs and systemd. Dracut configures bond and all works fine, but then it shutdowns and switch rooti, mac address of slave interfaces (eth0 and eth1) changed, but bonding mac saves the same. After that bond interface not works. How to prevent this fail? If i rm