[systemd-devel] Problem with shutdown and automount units

2014-12-08 Thread Harald Hoyer
Today I changed the dracut-shutdown.service [1] to do its job on ExecStop, This was done, to order the action before local-fs.target is stopped. Mainly to run before boot.automount / boot.mount is stopped. Works so far, but, if boot was _not_ yet automounted on shutdown, the boot.automount is

[systemd-devel] [PATCH] networkd: update manpage for optional Gateway=

2014-12-08 Thread Mantas Mikulėnas
Following commit 59580681f5f. --- man/systemd.network.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/systemd.network.xml b/man/systemd.network.xml index 11b4370..1edaa0b 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -429,7 +429,7 @@

[systemd-devel] [PATCH v5 1/4] bus: StartTransientUnit can have aux unit

2014-12-08 Thread WaLyong Cho
--- src/core/dbus-manager.c | 98 +++-- 1 file changed, 86 insertions(+), 12 deletions(-) diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 0994d7b..5fe06f9 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -615,6

[systemd-devel] [PATCH v5 2/4] util: introduce new sec_to_stringa()

2014-12-08 Thread WaLyong Cho
--- src/shared/time-util.c | 52 ++ src/shared/time-util.h | 1 + src/test/test-time.c | 20 +++ 3 files changed, 73 insertions(+) diff --git a/src/shared/time-util.c b/src/shared/time-util.c index d3404af..d94be7e 100644 ---

[systemd-devel] [PATCH v5 4/4] run: introduce timer support option

2014-12-08 Thread WaLyong Cho
Support timer options --on-active=, --on-boot=, --on-startup=, --on-unit-active=, --on-unit-inactive=, --on-calendar=. Each options corresponding with OnActiveSec=, OnBootSec=, OnStartupSec=, OnUnitActiveSec=, OnUnitInactiveSec=, OnCalendar= of timer respectively. And OnCalendar= and WakeSystem=

[systemd-devel] [PATCH v5 2/4] util: introduce new sec_to_stringa()

2014-12-08 Thread WaLyong Cho
--- src/shared/time-util.c | 63 ++ src/shared/time-util.h | 1 + src/test/test-time.c | 20 3 files changed, 84 insertions(+) diff --git a/src/shared/time-util.c b/src/shared/time-util.c index d3404af..a45341d 100644 ---

Re: [systemd-devel] Problem with shutdown and automount units

2014-12-08 Thread Harald Hoyer
On 08.12.2014 14:21, Harald Hoyer wrote: On 08.12.2014 13:28, Dave Reisner wrote: On Dec 8, 2014 5:54 AM, Harald Hoyer har...@redhat.com mailto:har...@redhat.com wrote: Today I changed the dracut-shutdown.service [1] to do its job on ExecStop, This was done, to order the action before

Re: [systemd-devel] systemd-nspawn old guests

2014-12-08 Thread Lennart Poettering
On Fri, 05.12.14 20:25, Thomas S Hatch (thatc...@gmail.com) wrote: I have been having trouble running nspawn containers that don't have systemd (centos 6, Ubuntu 14.04, debian wheezy etc), I imagine I am just not finding the solution online. The container seems to start without issue but

Re: [systemd-devel] Nspawn / getty restart loop

2014-12-08 Thread Lennart Poettering
On Sat, 06.12.14 09:49, Meech (meech...@gmail.com) wrote: Running Arch64 / Systemd 217. I have a barebones container initialized with pacstrap. The conatiner is stored in /var/lib and started via systemd (systemctl start systemd-nspawn@mycontainer) When nobody is logged in, the journal

Re: [systemd-devel] Nspawn / getty restart loop

2014-12-08 Thread Lennart Poettering
On Sun, 07.12.14 09:20, Meech (meech...@gmail.com) wrote: Disabling seems to have no effect, it's a static service: console-getty.service disabled container-getty@.service static getty@.service enabled serial-getty@.service

Re: [systemd-devel] Problem with shutdown and automount units

2014-12-08 Thread Lennart Poettering
On Mon, 08.12.14 11:54, Harald Hoyer (har...@redhat.com) wrote: Today I changed the dracut-shutdown.service [1] to do its job on ExecStop, This was done, to order the action before local-fs.target is stopped. Mainly to run before boot.automount / boot.mount is stopped. Works so far, but,

Re: [systemd-devel] Nspawn / getty restart loop

2014-12-08 Thread Meech
I created a fresh container by following the steps here https://wiki.archlinux.org/index.php/Arch_systemd_container using the command pacstrap -i -c -d ~/MyContainer base Not sure what is pulling it in. Nor how to find out. If I start it via systemd, the journal is quiet until I log in (via

Re: [systemd-devel] /usr vs /etc for default distro units enablement

2014-12-08 Thread Lennart Poettering
On Sun, 07.12.14 09:39, Martin Pitt (martin.p...@ubuntu.com) wrote: Hello all, sorry for the late response. Andrei Borzenkov [2014-12-05 10:58 +0300]: That's not how I actually understood it. enable/disable still applies only to units with [Install] section as it is now. Just that

Re: [systemd-devel] Problem with shutdown and automount units

2014-12-08 Thread Harald Hoyer
On 08.12.2014 15:24, Lennart Poettering wrote: On Mon, 08.12.14 11:54, Harald Hoyer (har...@redhat.com) wrote: Today I changed the dracut-shutdown.service [1] to do its job on ExecStop, This was done, to order the action before local-fs.target is stopped. Mainly to run before

Re: [systemd-devel] [PATCH 2/3] coredump: use lz4frame api to compress coredumps

2014-12-08 Thread Lennart Poettering
On Sun, 07.12.14 19:32, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: This converts the stream compression to use the new lz4frame api, compatible with lz4cat. Previous code used custom headers, so the compressed file was not compatible with lz4 command line tools. I considered this

Re: [systemd-devel] Problem with shutdown and automount units

2014-12-08 Thread Lennart Poettering
On Mon, 08.12.14 15:34, Harald Hoyer (harald.ho...@gmail.com) wrote: On 08.12.2014 15:24, Lennart Poettering wrote: On Mon, 08.12.14 11:54, Harald Hoyer (har...@redhat.com) wrote: Today I changed the dracut-shutdown.service [1] to do its job on ExecStop, This was done, to order the

Re: [systemd-devel] [PATCH v5 2/4] util: introduce new sec_to_stringa()

2014-12-08 Thread Lennart Poettering
On Mon, 08.12.14 21:18, WaLyong Cho (walyong@samsung.com) wrote: +int sec_to_stringa(const char *t, usec_t usec, const char **time) { +static const struct { +const char *suffix; +usec_t usec; +} table[] = { +{ seconds,

Re: [systemd-devel] [PATCH v5 2/4] util: introduce new sec_to_stringa()

2014-12-08 Thread WaLyong Cho
On 12/08/2014 11:41 PM, Lennart Poettering wrote: On Mon, 08.12.14 21:18, WaLyong Cho (walyong@samsung.com) wrote: +int sec_to_stringa(const char *t, usec_t usec, const char **time) { +static const struct { +const char *suffix; +usec_t usec; +

Re: [systemd-devel] networkd link state

2014-12-08 Thread Lennart Poettering
On Sun, 07.12.14 14:37, Tom Gundersen (t...@jklm.no) wrote: Hi David, We may want to introduce a mechanism for installed, but not enabled configuration snippets, but we haven't quite figured it out yet. In the meantime, you can give your files a custom suffix or keep them in a sub

[systemd-devel] [PATCH v6 2/3] timer: timer can be a transient unit

2014-12-08 Thread WaLyong Cho
--- src/core/dbus-timer.c | 143 ++ src/core/dbus-timer.h | 3 ++ src/core/timer.c | 4 ++ 3 files changed, 150 insertions(+) diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c index f1f8c54..43e7852 100644 ---

[systemd-devel] [PATCH v6 1/3] bus: StartTransientUnit can have aux unit

2014-12-08 Thread WaLyong Cho
--- src/core/dbus-manager.c | 98 +++-- 1 file changed, 86 insertions(+), 12 deletions(-) diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 0994d7b..5fe06f9 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -615,6

Re: [systemd-devel] [RFC] [PATCH] core: avoid duplicate unit property set

2014-12-08 Thread Lennart Poettering
On Mon, 08.12.14 15:12, WaLyong Cho (walyong@samsung.com) wrote: Currently, unit property set apis set unit property and also make a dropin files in each dbus-xyz.c. And the dropin will set its properties again in unit_load(). So don't need to set property immediatly. That will be set

Re: [systemd-devel] [RFC] [PATCH] core: avoid duplicate unit property set

2014-12-08 Thread Lennart Poettering
On Mon, 08.12.14 15:32, WaLyong Cho (walyong@samsung.com) wrote: Hi, First, I'd like to ask unit property should be applied immediately when systemctl set-property is called? If yes, after systemctl set-property, why we can see the message for daemon-reload. I think that should be

Re: [systemd-devel] [PATCH 2/3] coredump: use lz4frame api to compress coredumps

2014-12-08 Thread Zbigniew Jędrzejewski-Szmek
On Mon, Dec 08, 2014 at 03:36:15PM +0100, Lennart Poettering wrote: On Sun, 07.12.14 19:32, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: This converts the stream compression to use the new lz4frame api, compatible with lz4cat. Previous code used custom headers, so the compressed

Re: [systemd-devel] [RFC] [PATCH] core: avoid duplicate unit property set

2014-12-08 Thread WaLyong Cho
On 12/09/2014 12:10 AM, Lennart Poettering wrote: On Mon, 08.12.14 15:32, WaLyong Cho (walyong@samsung.com) wrote: Hi, First, I'd like to ask unit property should be applied immediately when systemctl set-property is called? If yes, after systemctl set-property, why we can see the

Re: [systemd-devel] [PATCH v6 2/3] timer: timer can be a transient unit

2014-12-08 Thread Lennart Poettering
On Tue, 09.12.14 00:03, WaLyong Cho (walyong@samsung.com) wrote: Applied 1/3 and 2/3! Thanks! --- src/core/dbus-timer.c | 143 ++ src/core/dbus-timer.h | 3 ++ src/core/timer.c | 4 ++ 3 files changed, 150 insertions(+)

Re: [systemd-devel] [PATCH v6 3/3] run: introduce timer support option

2014-12-08 Thread Lennart Poettering
On Tue, 09.12.14 00:03, WaLyong Cho (walyong@samsung.com) wrote: } else { log_error(Unknown assignment %s., assignment); return -EINVAL; diff --git a/src/run/run.c b/src/run/run.c index 85eb052..e145784 100644 --- a/src/run/run.c +++

Re: [systemd-devel] systemd-nspawn old guests

2014-12-08 Thread Thomas S Hatch
Thanks Lennart! That makes perfect sense, been a long time since I needed to mess around with this stuff. Keep up the fantastic work! I am a big fan! Thomas S. Hatch | Founder, CTO 3400 N. Ashton Blvd, Suite 110 | Lehi, UT 84043 tha...@saltstack.com | www.saltstack.com http://saltstack.com/

Re: [systemd-devel] libabc, sub-objects, and reference counting

2014-12-08 Thread David Herrmann
Hi On Sun, Dec 7, 2014 at 2:39 AM, Josh Triplett j...@joshtriplett.org wrote: The sample libabc includes functions to get a thing, as a sample sub-object of the overall library context. Each thing has a reference to the parent library context, and a function to return that reference. Given

Re: [systemd-devel] [PATCH v6 3/3] run: introduce timer support option

2014-12-08 Thread WaLyong Cho
On 12/09/2014 12:38 AM, Lennart Poettering wrote: On Tue, 09.12.14 00:03, WaLyong Cho (walyong@samsung.com) wrote: } else { log_error(Unknown assignment %s., assignment); return -EINVAL; diff --git a/src/run/run.c b/src/run/run.c index

Re: [systemd-devel] networkd link state

2014-12-08 Thread Mantas Mikulėnas
On Mon, Dec 8, 2014 at 5:02 PM, Lennart Poettering lenn...@poettering.net wrote: Yeah, I think we should just suggest people to rename files they want to disable. We should probably recommend a convention though, for example .disabled as suffix. We should recommend the convention simply

Re: [systemd-devel] [PATCH] networkd: update manpage for optional Gateway=

2014-12-08 Thread Zbigniew Jędrzejewski-Szmek
On Mon, Dec 08, 2014 at 01:53:30PM +0200, Mantas Mikulėnas wrote: Following commit 59580681f5f. --- man/systemd.network.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied. Zbyszek ___ systemd-devel mailing list

Re: [systemd-devel] /usr vs /etc for default distro units enablement

2014-12-08 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Dec 05, 2014 at 05:55:39PM +0200, Uoti Urpala wrote: Just leaving the symlinks would not give good behavior even in the case where the admin wants to keep the old target: temporary disable + then re-enable would now change the target. Perhaps the recommended way to change targets in

Re: [systemd-devel] [PATCH v6 3/3] run: introduce timer support option

2014-12-08 Thread Lennart Poettering
On Tue, 09.12.14 01:13, WaLyong Cho (walyong@samsung.com) wrote: What's the rationale for checking the unit state here? I mean, PID 1 should fail anyway in this case, do we realy need to check this name in advance? I mean, such a check is necessarily racy, since the unit might appear

Re: [systemd-devel] [PATCH] journal: Fix navigating backwards missing entries

2014-12-08 Thread Lennart Poettering
On Fri, 05.12.14 16:06, Olivier Brunel (j...@jjacky.com) wrote: With DIRECTION_UP (i.e. navigating backwards) in generic_array_bisect() when the needle was found as the last item in the array, it wasn't actually processed as match, resulting in entries being missed.

[systemd-devel] Installing user unit files.

2014-12-08 Thread Rüdiger Sonderfeld
Hello, I'm currently in the process of adding a service file to GNU Emacs: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16507#26 The major point of discussion is how and where to install that file. Systemd has guidelines for system service files in daemon(7). One could follow them for user

Re: [systemd-devel] Installing user unit files.

2014-12-08 Thread Zbigniew Jędrzejewski-Szmek
On Mon, Dec 08, 2014 at 07:31:07PM +0100, Rüdiger Sonderfeld wrote: Hello, I'm currently in the process of adding a service file to GNU Emacs: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16507#26 The major point of discussion is how and where to install that file. Systemd has

Re: [systemd-devel] [PATCH] fstab-generator: Allow mount.usr without mount.usrflags, honor rw/ro

2014-12-08 Thread Michael Marineau
On Sun, Dec 7, 2014 at 4:51 PM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote: On Sat, Dec 06, 2014 at 02:47:51PM -0800, Michael Marineau wrote: There is no need to require mount.usrflags. The original implementation assumed that a btrfs subvolume would always be needed but that is not

Re: [systemd-devel] Installing user unit files.

2014-12-08 Thread Zbigniew Jędrzejewski-Szmek
On Mon, Dec 08, 2014 at 07:31:07PM +0100, Rüdiger Sonderfeld wrote: Hello, I'm currently in the process of adding a service file to GNU Emacs: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16507#26 To comment on the unit file itself: Description=Emacs: the extensible, customizable text

[systemd-devel] [PATCH v2] fstab-generator: Allow mount.usr without mount.usrflags, honor rw/ro

2014-12-08 Thread Michael Marineau
There is no need to require mount.usrflags. The original implementation assumed that a btrfs subvolume would always be needed but that is not applicable to systems that do not use btrfs for /usr. Similar to using rootflags= for the default of mount.usrflags=, append the classic 'ro' and 'rw'

Re: [systemd-devel] forever loop during garbage collection

2014-12-08 Thread Lennart Poettering
On Sun, 30.11.14 14:38, Umut Tezduyar Lindskog (u...@tezduyar.com) wrote: Hi, We are experiencing an unbreakable loop in manager_dispatch_gc_queue. Problem happens when systemd runs in sysV compatibility mode (Porky enables this). Seems like manager_dispatch_gc_queue's while loop gets

Re: [systemd-devel] [PATCH v2 5/5] mount: auto-detect iSCSI and FCoE as requiring network

2014-12-08 Thread Lennart Poettering
On Fri, 05.12.14 15:54, Karel Zak (k...@redhat.com) wrote: On Fri, Dec 05, 2014 at 01:46:06AM +0100, Lennart Poettering wrote: With such an API you have the liberty to change later on what precisely you expose there. The fact that you watch a file would be entirely opaque, it could one day

Re: [systemd-devel] Installing user unit files.

2014-12-08 Thread Rüdiger Sonderfeld
On Monday 08 December 2014 19:46:18 Zbigniew Jędrzejewski-Szmek wrote: I think something which hints that this provides a shared instance of emacs would be better than this generic blurb. Maybe say something like 'Emacs in shared mode' or something. Also keep in mind that this string is used

Re: [systemd-devel] Installing user unit files.

2014-12-08 Thread Rüdiger Sonderfeld
On Monday 08 December 2014 19:40:14 Zbigniew Jędrzejewski-Szmek wrote: This destination must be know to systemd. So anything generic like ~/usr is unlikely to work, unless systemd is modified to check that directory too. When installed as a user, it should go to

Re: [systemd-devel] Installing user unit files.

2014-12-08 Thread Zbigniew Jędrzejewski-Szmek
On Mon, Dec 08, 2014 at 08:51:43PM +0100, Rüdiger Sonderfeld wrote: On Monday 08 December 2014 19:40:14 Zbigniew Jędrzejewski-Szmek wrote: This destination must be know to systemd. So anything generic like ~/usr is unlikely to work, unless systemd is modified to check that directory too.

Re: [systemd-devel] libabc, sub-objects, and reference counting

2014-12-08 Thread Josh Triplett
On Mon, Dec 08, 2014 at 05:09:17PM +0100, David Herrmann wrote: On Sun, Dec 7, 2014 at 2:39 AM, Josh Triplett j...@joshtriplett.org wrote: The sample libabc includes functions to get a thing, as a sample sub-object of the overall library context. Each thing has a reference to the parent

[systemd-devel] [PATCH] libabc: Make things hold a reference to their context

2014-12-08 Thread Josh Triplett
The sample libabc includes functions to get a thing, as a sample sub-object of the overall library context. Each thing has a reference to the parent library context, and a function to return that reference. Given that, abc_thing_new_from_string should call abc_ref, and abc_thing_unref should call

Re: [systemd-devel] Nspawn / getty restart loop

2014-12-08 Thread Lennart Poettering
On Mon, 08.12.14 09:29, Meech (meech...@gmail.com) wrote: I created a fresh container by following the steps here https://wiki.archlinux.org/index.php/Arch_systemd_container using the command pacstrap -i -c -d ~/MyContainer base Not sure what is pulling it in. Nor how to find out. If

Re: [systemd-devel] networkd link state

2014-12-08 Thread Lennart Poettering
On Mon, 08.12.14 18:55, Mantas Mikulėnas (graw...@gmail.com) wrote: On Mon, Dec 8, 2014 at 5:02 PM, Lennart Poettering lenn...@poettering.net wrote: Yeah, I think we should just suggest people to rename files they want to disable. We should probably recommend a convention though, for

Re: [systemd-devel] [PATCH v2] fstab-generator: Allow mount.usr without mount.usrflags, honor rw/ro

2014-12-08 Thread Lennart Poettering
On Mon, 08.12.14 11:05, Michael Marineau (michael.marin...@coreos.com) wrote: There is no need to require mount.usrflags. The original implementation assumed that a btrfs subvolume would always be needed but that is not applicable to systems that do not use btrfs for /usr. Similar to using

Re: [systemd-devel] [PATCH] cgroup: Handle error when destroying cgroup

2014-12-08 Thread Lennart Poettering
On Sat, 29.11.14 15:27, Ross Lagerwall (rosslagerw...@gmail.com) wrote: If a cgroup fails to be destroyed (most likely because there are still processes running as part of a service after the main pid exits), don't free and remove the cgroup unit from the manager. This fixes a regression

Re: [systemd-devel] [WIP PATCH] Do not realize and migrate cgroups multiple times

2014-12-08 Thread Lennart Poettering
On Mon, 01.12.14 12:06, Martin Pitt (martin.p...@ubuntu.com) wrote: Hello all, In my efforts to make user LXC containers work I noticed that under a real desktop (not just nspawn with VT login or ssh logins) my carefully set up cgroups in the non-systemd controllers get reverted. I. e. I

Re: [systemd-devel] [PATCH] journalctl: respect --after-cursor semantics with --follow in all cases

2014-12-08 Thread Lennart Poettering
On Sun, 30.11.14 23:27, Wesley Dawson (w...@mozilla.com) wrote: In the case where no entries have been added to the journal after the specified cursor, set need_seek before the main loop to prevent display of the entry at said cursor. Looks good! Applied! --- src/journal/journalctl.c |

[systemd-devel] [PATCH v7] run: introduce timer support option

2014-12-08 Thread WaLyong Cho
Support timer options --on-active=, --on-boot=, --on-startup=, --on-unit-active=, --on-unit-inactive=, --on-calendar=. Each options corresponding with OnActiveSec=, OnBootSec=, OnStartupSec=, OnUnitActiveSec=, OnUnitInactiveSec=, OnCalendar= of timer respectively. And OnCalendar= and WakeSystem=