Re: [systemd-devel] [systemd-commits] src/journal

2014-12-19 Thread Michal Schmidt
On 12/19/2014 04:49 PM, Filipe Brandenburger wrote: This seems to have fixed test-journal-stream but test-journal-interleaving is still broken for me, it fails with: NUMBER=1 NUMBER=2 Assertion 'r == 1' failed at src/journal/test-journal-interleaving.c:101, function

Re: [systemd-devel] [systemd-commits] 4 commits - src/core test/TEST-03-JOBS

2014-11-27 Thread Michal Schmidt
On 11/27/2014 03:42 AM, Zbigniew Jędrzejewski-Szmek wrote: On Wed, Nov 26, 2014 at 07:35:30AM -0800, Michal Schmidt wrote: src/core/job.c |7 +-- src/core/job.h | 14 ++ src/core/transaction.c |2 +- test/TEST-03-JOBS/test

Re: [systemd-devel] Cannot use systemctl after heavy swapping

2014-11-14 Thread Michal Schmidt
On 11/14/2014 03:20 PM, Jan Janssen wrote: I think there might be something wrong with how the rate limiting works in manager.c. Just recently, firefox went nuts and got the whole system swapping like crazy. After manual OOM killing, the system is back to normal, but I can't seem to do any

[systemd-devel] [PATCH 17/26] unit: place reservations before merging other's dependencies

2014-10-24 Thread Michal Schmidt
With the hashmap implementation that uses chaining the reservations merely ensure that the merging won't result in long bucket chains. With a future alternative implementation it will additionally reserve memory to make sure the merging won't fail. --- src/core/unit.c | 33

Re: [systemd-devel] [PATCH 21/26] hashmap: rewrite the implementation

2014-10-22 Thread Michal Schmidt
On 10/20/2014 08:42 PM, Lennart Poettering wrote: On Thu, 16.10.14 09:50, Michal Schmidt (mschm...@redhat.com) wrote: +/* Fields that all hashmap/set types must have */ +struct HashmapBase { +const struct hash_ops *hash_ops; /* hash and compare ops to use */ + +union

Re: [systemd-devel] [PATCH 00/26] hashmap rewrite

2014-10-21 Thread Michal Schmidt
On 10/20/2014 08:23 PM, Lennart Poettering wrote: On Thu, 16.10.14 09:50, Michal Schmidt (mschm...@redhat.com) wrote: Key changes that affect other code: - Sets and Hashmaps do not remember the insertion order anymore. They can still be iterated with *_FOREACH* or *_first

Re: [systemd-devel] [PATCH 21/26] hashmap: rewrite the implementation

2014-10-21 Thread Michal Schmidt
On 10/20/2014 08:42 PM, Lennart Poettering wrote: On Thu, 16.10.14 09:50, Michal Schmidt (mschm...@redhat.com) wrote: +enum { +HASHMAP_TYPE_PLAIN, +HASHMAP_TYPE_LINKED, +HASHMAP_TYPE_SET, +__HASHMAP_TYPE_COUNT +}; Why is this enum anonymous? Wouldn't

[systemd-devel] [PATCH 05/26] hashmap: drop assert(h) from linked_hashmap_next

2014-10-16 Thread Michal Schmidt
It's handled just fine by returning NULL. --- src/shared/hashmap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/shared/hashmap.c b/src/shared/hashmap.c index c4fde89..8225b8e 100644 --- a/src/shared/hashmap.c +++ b/src/shared/hashmap.c @@ -945,7 +945,6 @@ void *hashmap_next(Hashmap *h,

[systemd-devel] [PATCH 09/26] journal: make sd_journal::files a LinkedHashmap

2014-10-16 Thread Michal Schmidt
Anything that uses hashmap_next() almost certainly cares about the order and needs to be a LinkedHashmap. --- src/journal/journal-internal.h | 2 +- src/journal/journalctl.c | 6 +++--- src/journal/sd-journal.c | 38 +++--- 3 files changed, 23

[systemd-devel] [PATCH 11/26] resolve: make DnsScope::conflict_queue a LinkedHashmap

2014-10-16 Thread Michal Schmidt
on_conflict_dispatch() uses hashmap_steal_first() and then does something non-trivial with it. It may care about the order. --- src/resolve/resolved-dns-scope.c | 10 +- src/resolve/resolved-dns-scope.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git

[systemd-devel] [PATCH 03/26] test: add and improve hashmap tests

2014-10-16 Thread Michal Schmidt
Test more corner cases and error states in several tests. Add new tests for: hashmap_move hashmap_remove hashmap_remove2 hashmap_remove_value hashmap_remove_and_replace hashmap_get2 hashmap_first In test_hashmap_many additionally test with an intentionally bad hash function. ---

[systemd-devel] [PATCH 07/26] journal: make JournalFile::chain_cache a LinkedHashmap

2014-10-16 Thread Michal Schmidt
The order of entries may matter here. Oldest entries are evicted first when the cache is full. (Though I don't see anything to rejuvenate entries on cache hits.) --- src/journal/journal-file.c | 16 src/journal/journal-file.h | 2 +- 2 files changed, 9 insertions(+), 9

[systemd-devel] [PATCH 25/26] test: test a corner case in hashmap_remove_and_replace

2014-10-16 Thread Michal Schmidt
--- src/test/test-hashmap-plain.c | 20 1 file changed, 20 insertions(+) diff --git a/src/test/test-hashmap-plain.c b/src/test/test-hashmap-plain.c index 8ea793d..f9553c9 100644 --- a/src/test/test-hashmap-plain.c +++ b/src/test/test-hashmap-plain.c @@ -380,6 +380,7 @@

[systemd-devel] [PATCH 26/26] shared: drop mempool, now unused

2014-10-16 Thread Michal Schmidt
-offset: 8; indent-tabs-mode: nil -*-*/ - -/*** - This file is part of systemd. - - Copyright 2010-2014 Lennart Poettering - Copyright 2014 Michal Schmidt - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published

[systemd-devel] [PATCH 10/26] sd-bus: make sd_bus::reply_callbacks a LinkedHashmap

2014-10-16 Thread Michal Schmidt
The way process_closing() picks the first entry from reply_callbacks and works with it makes it likely that it cares about the order. --- src/libsystemd/sd-bus/bus-internal.h | 2 +- src/libsystemd/sd-bus/bus-slot.c | 2 +- src/libsystemd/sd-bus/sd-bus.c | 14 +++--- 3 files

[systemd-devel] [PATCH 08/26] journal: make Server::user_journals a LinkedHashmap

2014-10-16 Thread Michal Schmidt
Order matters here. It replaces oldest entries first when USER_JOURNALS_MAX is reached. --- src/journal/journald-server.c | 24 src/journal/journald-server.h | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/journal/journald-server.c

[systemd-devel] [PATCH 02/26] test: generate tests for LinkedHashmap from Hashmap tests

2014-10-16 Thread Michal Schmidt
test-hashmap-linked.c is generated from test-hashmap-plain.c simply by substituting linked_hashmap for hashmap etc. In the cases where tests rely on the order of entries, a distinction between plain and linked hashmaps is made using the LINKED macro, which is defined only for

[systemd-devel] [PATCH 04/26] hashmap: hashmap_move_one should return -ENOENT when 'other' is NULL

2014-10-16 Thread Michal Schmidt
-ENOENT is the same return value as if 'other' were an allocated hashmap that does not contain the key. A NULL hashmap is a possible way of expressing a hashmap that contains no key. --- src/shared/hashmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[systemd-devel] [PATCH 13/26] hashmap: return more information from resize_buckets

2014-10-16 Thread Michal Schmidt
Return 0 if no resize was needed, 1 if successfully resized and negative on error. --- src/shared/hashmap.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/shared/hashmap.c b/src/shared/hashmap.c index 1ae3602..2a152ab 100644 --- a/src/shared/hashmap.c +++

[systemd-devel] [PATCH 06/26] install: make InstallContext::{will_install, have_installed} LinkedHashmaps

2014-10-16 Thread Michal Schmidt
It appears order may matter here. Use LinkedHashmaps to be safe. --- src/shared/install.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/shared/install.c b/src/shared/install.c index ff5dcba..4b9fb7a 100644 ---

[systemd-devel] [PATCH 12/26] shared: split mempool implementation from hashmaps

2014-10-16 Thread Michal Schmidt
Poettering + Copyright 2014 Michal Schmidt + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version

[systemd-devel] [PATCH 24/26] configure.ac: add --enable-hashmap-debug option

2014-10-16 Thread Michal Schmidt
The option simply enables hashmap debugging by defining ENABLE_HASHMAP_DEBUG. I suggest developing new code with it enabled, to have the iterator checks. --- configure.ac | 7 +++ 1 file changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index 945adfc..02a1923 100644 ---

[systemd-devel] [PATCH 18/26] hashmap: allow hashmap_move to fail

2014-10-16 Thread Michal Schmidt
It cannot fail in the current hashmap implementation, but it may fail in alternative implementations (unless a sufficiently large reservation has been placed beforehand). --- src/shared/hashmap.c | 8 +--- src/shared/hashmap.h | 6 +++--- src/shared/set.c | 2 +-

[systemd-devel] [PATCH 23/26] tools: add gdb command to dump hashmap information

2014-10-16 Thread Michal Schmidt
/gdb-sd_dump_hashmaps.py @@ -0,0 +1,94 @@ +# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ +# +# This file is part of systemd. +# +# Copyright 2014 Michal Schmidt +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser

[systemd-devel] [PATCH 01/26] hashmap: add LinkedHashmap as a distinct type

2014-10-16 Thread Michal Schmidt
Few Hashmaps/Sets need to remember the insertion order. Most don't care about the order when iterating. It would be possible to use more compact hashmap storage in the latter cases. Add LinkedHashmap as a distinct type from Hashmap, with functions prefixed with linked_. For now, the functions are

[systemd-devel] [PATCH 14/26] hashmap: introduce hashmap_reserve()

2014-10-16 Thread Michal Schmidt
With the current hashmap implementation that uses chaining, placing a reservation can serve two purposes: - To optimize putting of entries if the number of entries to put is known. The reservation allocates buckets, so later resizing can be avoided. - To avoid having very long bucket

[systemd-devel] [PATCH 16/26] install, cgtop: adjust hashmap_move_one callers for -ENOMEM possibility

2014-10-16 Thread Michal Schmidt
That hashmap_move_one() currently cannot fail with -ENOMEM is an implementation detail, which is not possible to guarantee in general. Hashmap implementations based on anything else than chaining of individual entries may have to allocate. hashmap_move_one will not fail with -ENOMEM if a proper

[systemd-devel] [PATCH 20/26] util: add log2u, log2u_round_up

2014-10-16 Thread Michal Schmidt
two's logarithms for unsigned. --- src/shared/util.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/shared/util.h b/src/shared/util.h index 21a90a4..dfb4341 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -829,6 +829,21 @@ static inline int log2i(int x) {

[systemd-devel] [PATCH 19/26] unit: adjust for the possibility of set_move failing

2014-10-16 Thread Michal Schmidt
--- src/core/unit.c | 32 +++- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/src/core/unit.c b/src/core/unit.c index 41b9ba4..e40e6f2 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -553,29 +553,38 @@ const char* unit_sub_state_to_string(Unit *u)

[systemd-devel] [PATCH 22/26] test: adjust max load factor in test_hashmap_many

2014-10-16 Thread Michal Schmidt
--- src/test/test-hashmap-plain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/test-hashmap-plain.c b/src/test/test-hashmap-plain.c index 17b72a7..8ea793d 100644 --- a/src/test/test-hashmap-plain.c +++ b/src/test/test-hashmap-plain.c @@ -699,9 +699,9 @@ static

[systemd-devel] [PATCH 15/26] test: add test for hashmap_reserve()

2014-10-16 Thread Michal Schmidt
--- src/test/test-hashmap-plain.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/test/test-hashmap-plain.c b/src/test/test-hashmap-plain.c index 6b93ed6..1c2c556 100644 --- a/src/test/test-hashmap-plain.c +++ b/src/test/test-hashmap-plain.c @@ -795,6 +795,23 @@ static

[systemd-devel] [PATCH] sysctl.d: default to fq_codel, fight bufferbloat

2014-10-16 Thread Michal Schmidt
Quoting from Jon Corbet's report of Stephen Hemminger's talk at Linux Plumbers Conference 2014 (https://lwn.net/Articles/616241/): [...] So Stephen encouraged everybody to run a command like: sysctl -w net.core.default_qdisc=fq_codel That will cause fq_codel to be used for all

Re: [systemd-devel] [PATCH 21/26] hashmap: rewrite the implementation

2014-10-16 Thread Michal Schmidt
On 10/16/2014 09:50 AM, Michal Schmidt wrote: --- a/src/shared/hashmap.h +++ b/src/shared/hashmap.h @@ -6,6 +6,7 @@ This file is part of systemd. Copyright 2010 Lennart Poettering + Copyright 2014 Lennart Poettering Oh, I'll fix this before pushing upstream. Michal

Re: [systemd-devel] [systemd-commits] 5 commits - configure.ac Makefile.am src/analyze src/bus-proxyd src/cgtop src/core src/delta src/journal src/journal-remote src/libsystemd src/libsystemd-network

2014-09-16 Thread Michal Schmidt
On 09/16/2014 12:07 PM, Zbigniew Jędrzejewski-Szmek wrote: Rather than forcing gcc to always produce colorized error messages whether on tty or not, enable automatic colorization by ensuring GCC_COLORS is set to a non-empty string. Hi, this idea was discussed and rejected before,

Re: [systemd-devel] [PATCH] units: cleanup agetty command line

2013-06-04 Thread Michal Schmidt
as expected. I will send Karel a fix. ... hmm, I don't remember any discussion. The comment referred to the bug fixed by this util-linux commit: commit c13d60b291cfe3e2c094225195d967c9f195ca54 Author: Michal Schmidt mschm...@redhat.com Date: Mon Oct 29 23:33:01 2012 +0100 agetty: fix

Re: [systemd-devel] [ANNOUNCE] systemd 203

2013-05-10 Thread Michal Schmidt
On 05/07/2013 10:53 AM, Colin Guthrie wrote: 'Twas brillig, and Lennart Poettering at 07/05/13 01:41 did gyre and gimble: This is probably a good release to synchronize a distribution on. For example, it is our goal that this is the version we will include in Fedora 19, more or less. You said

Re: [systemd-devel] systemd release agent

2013-04-17 Thread Michal Schmidt
On 04/16/2013 07:45 PM, Kevin Wilson wrote: No I moved /usr/lib/systemd/systemd-cgroups-agent to some backup. and made sure that: ls /usr/lib/systemd/systemd-cgroups-agent ls: cannot access /usr/lib/systemd/systemd-cgroups-agent: No such file or directory Now I tried killing two services that

Re: [systemd-devel] system shutdown: what unit is taking so long?

2013-04-17 Thread Michal Schmidt
On 04/17/2013 04:33 PM, Lennart Poettering wrote: It's so pretty in fact, that it almost makes me want to add sleep(30) or so to all my daemons' startup and shutdown code just to see it. It's like KITT, but in ASCII! No, no, you're not supposed to like it. You should tremble in fear! It's not

Re: [systemd-devel] [PATCH 2/3] unit: do not care if order isn't right when retroactively starting deps

2013-03-25 Thread Michal Schmidt
On 03/23/2013 03:14 AM, Lennart Poettering wrote: On Wed, 13.03.13 01:44, Michal Schmidt (mschm...@redhat.com) wrote: Attempt to satisfy requirement dependencies retroactively even if the unexpectedly activated unit would prefer to be started After them. This way remote-fs-pre.target can

[systemd-devel] [PATCH 0/3] alternative fix for manual mounts shutdown ordering

2013-03-12 Thread Michal Schmidt
that if we can make the manual mount units themselves pull remote-fs-pre.target in retroactively. Here's my proposal. Michal Schmidt (3): Revert remote-fs.target: want remote-fs-pre.target unit: do not care if order isn't right when retroactively starting deps unit: do not start Requisite

[systemd-devel] [PATCH 1/3] Revert remote-fs.target: want remote-fs-pre.target

2013-03-12 Thread Michal Schmidt
This reverts commit 6bde0b3220e95a08cefb70846f73b2cf24b7734a. remote-fs.target is usually enabled whether there are any remote mounts in fstab or not. remote-fs-pre.target pulls in NetworkManager-wait-online.service. = The commit caused NM-w-o to be pulled into boot. Let's fix the problem of

[systemd-devel] [PATCH 2/3] unit: do not care if order isn't right when retroactively starting deps

2013-03-12 Thread Michal Schmidt
Attempt to satisfy requirement dependencies retroactively even if the unexpectedly activated unit would prefer to be started After them. This way remote-fs-pre.target can be pulled in by performing a manual mount (the mount units have both Wants= and After= remote-fs-pre.target). ---

[systemd-devel] [PATCH 3/3] unit: do not start Requisite units retroactively

2013-03-12 Thread Michal Schmidt
Activating Requisite units goes against the reason of existence of this dependency type. --- src/core/unit.c | 4 1 file changed, 4 deletions(-) diff --git a/src/core/unit.c b/src/core/unit.c index d1f109d..25109ce 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -1237,10 +1237,6 @@

Re: [systemd-devel] About “systemd-cat --priority=0”

2013-03-08 Thread Michal Schmidt
Dne 8.3.2013 10:57, Yan Lei napsal(a): Sorry for troubling you, but I have got an issue to confirm with you. My issue is when I use the following command: systemd-cat --priority=0 echo hello Nothing logged into the journal, and the exit code is 141. I wonder whether it is a bug or it

Re: [systemd-devel] [PATCH] core: fix getting information about mount unit

2013-03-08 Thread Michal Schmidt
On 03/08/2013 03:13 PM, Michal Sekletar wrote: @@ -447,7 +447,11 @@ static int mount_add_default_dependencies(Mount *m) { if (UNIT(m)-manager-running_as != SYSTEMD_SYSTEM) return 0; -p = get_mount_parameters_fragment(m); +if (m-from_fragment) +

Re: [systemd-devel] [PATCH] core: fix getting information about mount unit

2013-03-08 Thread Michal Schmidt
On 03/08/2013 03:25 PM, Umut Tezduyar wrote: I thought mounts coming from mountinfo are not getting default dependencies anyways. mount_add_one() never sets load_extras to true for new mount units. But it does call unit_add_to_load_queue(u), which should eventually result in mount_load()

[systemd-devel] [PATCH] core: fix running jobs counters after reload/reexec

2013-03-01 Thread Michal Schmidt
All active units will call unit_notify() during coldplug, so we just make sure we're counting from zero again and get the correct result for n_on_console. For n_running_jobs we likewise reset it to zero and then count the running jobs as we encounter them in deserialization. ---

Re: [systemd-devel] [PATCH 5/6] coredumpctl: null check before dereferencing

2012-10-25 Thread Michal Schmidt
On 10/25/2012 04:16 PM, Michal Sekletar wrote: --- src/journal/coredumpctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c index d15a31e..1a4d78f 100644 --- a/src/journal/coredumpctl.c +++ b/src/journal/coredumpctl.c @@ -222,6 +222,7

Re: [systemd-devel] [PATCH 1/6] journal: fix memleak, call set_free before return

2012-10-25 Thread Michal Schmidt
Dne 25.10.2012 16:16, Michal Sekletar napsal(a): --- src/journal/coredumpctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c index 5c442ff..d15a31e 100644 --- a/src/journal/coredumpctl.c +++ b/src/journal/coredumpctl.c @@ -58,6

Re: [systemd-devel] [PATCH 2/6] localectl: fix memleak, call set_free before return

2012-10-25 Thread Michal Schmidt
Dne 25.10.2012 16:16, Michal Sekletar napsal(a): --- src/locale/localectl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/locale/localectl.c b/src/locale/localectl.c index c05eba0..16700fe 100644 --- a/src/locale/localectl.c +++ b/src/locale/localectl.c @@ -354,6 +354,7 @@ static

Re: [systemd-devel] [PATCH 3/6] localectl: fix memleak, use _cleanup_strv_free_

2012-10-25 Thread Michal Schmidt
Dne 25.10.2012 16:16, Michal Sekletar napsal(a): l might contain zero strings, however there is still memory allocated for NULL terminator, use _cleanup_strv_free_ instead to prevent tiny leak in such case. --- src/locale/localectl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [systemd-devel] [PATCH 6/6] sysctl: parse all keys in a config file

2012-10-25 Thread Michal Schmidt
Dne 25.10.2012 16:16, Michal Sekletar napsal(a): https://bugzilla.redhat.com/show_bug.cgi?id=869779 --- src/sysctl/sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index a68d67f..035e0ec 100644 --- a/src/sysctl/sysctl.c +++

Re: [systemd-devel] List all available units

2012-08-08 Thread Michal Schmidt
On 08/08/2012 10:21 AM, Václav Pavlín wrote: If we decide to change behaviour of systemctl, the approach, I described here, can be used. If you prefer to edit autocomplete script, it can be done with merge of sytemctl output of list-units and list-unit-files and then pipe to uniq. A lot of

Re: [systemd-devel] [PATCH] systemd: enable/disable instances of template

2012-07-26 Thread Michal Schmidt
On 07/13/2012 03:59 PM, Michal Sekletar wrote: https://bugzilla.redhat.com/show_bug.cgi?id=752774 --- man/systemctl.xml | 33 +++- src/shared/install.c | 78 +--- src/shared/unit-name.c | 12

Re: [systemd-devel] systemd: support for new timeouts in .service

2012-07-23 Thread Michal Schmidt
is either specified by TimeoutSec or default. However another variant which was proposed by Michal Schmidt, changes described behavior in a way that timeout which is specified last in unit file is applied and always overrides the previous settings. I don't think this description explains

Re: [systemd-devel] [PATCH] systemd: return error when asked to stop unknown unit

2012-06-19 Thread Michal Schmidt
On 06/19/2012 10:00 AM, Michal Sekletar wrote: +if (job_type == JOB_STOP u-load_state == UNIT_ERROR unit_active_state(u) == UNIT_INACTIVE) { In case anyone's wondering why there's the check for the unit's active state: It is possible to have units that are active and have a

[systemd-devel] git branches of stable Fedora releases

2012-06-12 Thread Michal Schmidt
Hello, a few people were interested in seeing the git tree from which I generate the patches for source RPMs in Fedora. The tree is now available at: git://fedorapeople.org/~michich/systemd.git Gitweb is here: http://fedorapeople.org/gitweb?p=michich/public_git/systemd.git The branches of

Re: [systemd-devel] Showing plymouth shutdown splash earlier during shutdown process

2012-06-01 Thread Michal Schmidt
On 05/31/2012 05:46 PM, Daniel Drake wrote: In the case of reboot (or poweroff), what does this mean? plymouth-reboot.service is queued to start, and prefdm.service is queued to stop. What does After= mean in this context, who comes first? 'man systemd.unit' says: If one unit with an ordering

Re: [systemd-devel] Have custom agetty behaviour even after upgadres

2012-05-16 Thread Michal Schmidt
On 05/16/2012 01:07 PM, Colin Guthrie wrote: This thread went a little tangential, so I'd like to bring it back to the problem stated here. Firstly, that was not my understanding of how things are supposed to work, but perhaps Lennart or Kay can clarify. I thought that the actual end point of

Re: [systemd-devel] systemd-cgls - Memory overflow

2012-05-10 Thread Michal Schmidt
On 05/10/2012 02:45 PM, Sven Anders wrote: If I execute the systemd-cgls command, I see the tree but without the command lines of the executables. I only see n/a. open(/proc/300/cmdline, O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 7 mmap2(NULL, 1075859456, PROT_READ|PROT_WRITE,

Re: [systemd-devel] Warning to Distros: NetworkManager + systemd + nscd + nmcli deadlock issue on boot.

2012-04-02 Thread Michal Schmidt
Colin Guthrie wrote: So in this situation, as systemd is aiming for network.target, but it's not actually reached it yet, systemctl condrestart nscd appears to hang, presumably waiting for network.target to be reached (as nscd.service is ordered After network.target). Does reverting commit

Re: [systemd-devel] automount regression

2012-01-26 Thread Michal Schmidt
Tom Gundersen wrote: It seems this was caused by: commit 9ddc4a26e56b06cd7774a03597980351855d8d54 Author: Michal Schmidt mschm...@redhat.com Date: Fri Jan 13 23:55:28 2012 +0100 mount: fix quota quotacheck.service and quotaon.service were not pulled in for fstab mounts

Re: [systemd-devel] [ANNOUNCE] systemd v39

2012-01-25 Thread Michal Schmidt
On 01/25/2012 03:57 PM, Lennart Poettering wrote: On Wed, 25.01.12 11:11, Jan Engelhardt (jeng...@medozas.de) wrote: I would actually prefer if it wrote that to the current tty that invoked the start action, rather than the console which is stowed away in a deep cellar... We explicitly want

Re: [systemd-devel] [ANNOUNCE] systemd v39

2012-01-25 Thread Michal Schmidt
On 01/25/2012 05:34 PM, Bill Nottingham wrote: Michal Schmidt (mschm...@redhat.com) said: We could make systemctl start ... dump a few of the service's lines from the journal before exiting. At that point you're then trying to define heuristics about what the proper value for 'a few

Re: [systemd-devel] socket failed to queue socket startup job: Transport endpoint is not connected

2012-01-22 Thread Michal Schmidt
Albert Strasheim wrote: Any chance this can be rolled into an update for Fedora 16? Yes. systemd-37-10.fc16 is in updates-testing: https://admin.fedoraproject.org/updates/FEDORA-2012-0409 It's probably a bit tricky since journald landed in v38. I guess you would either have to branch off

Re: [systemd-devel] systemd+dbus: system boot stops at terminal login screen sometimes

2011-12-19 Thread Michal Schmidt
- Original Message - Does the deadlock go away if you just modify rsyslog.service so that instead of stopping systemd-kmsg-syslogd in ExecStartPre it would do it in ExecStartPost? Yeah, it do the trick. Great. People who are hitting this deadlock can use this as a temprorary

Re: [systemd-devel] systemd+dbus: system boot stops at terminal login screen sometimes

2011-12-19 Thread Michal Schmidt
Michal Schmidt wrote: systemd at least partially defends itself from a hanging syslog by setting SO_SNDTIMEO to 5 seconds. Maybe even that is too much and we could just make the socket completely non-blocking and just fallback to kmsg when we get EAGAIN. I believe there is a way to connect

Re: [systemd-devel] systemd+dbus: system boot stops at terminal login screen sometimes

2011-12-16 Thread Michal Schmidt
Chen Jie wrote: Let me explain it further. First syslogv() in dbus may block, while rsyslog.service is starting and meanwhile the kernel socket buffer was full. Attachment syslog-test.c was a program simulates the situation. So while rsyslog.service is starting, on the systemd side: 1.

Re: [systemd-devel] ExecStartPost= behavior on failure

2011-12-05 Thread Michal Schmidt
On 11/15/2011 01:40 PM, Honza Horak wrote: I'm thinking of what is the desired behavior if the command ExecStartPost=somecommand fails. If I understand it correctly, all other ExecStartPost= commands execution is stopped, but the main process continues to work (and the service is still active).

Re: [systemd-devel] [PATCH] Allow 'list-unit-files' to run with --root.

2011-12-05 Thread Michal Schmidt
On Tue, 22 Nov 2011 15:45:34 -0500 Bill Nottingham wrote: To do so, move the check for the bus to the bus-using portion of list_unit_files(), and ensure that get_config_path doesn't abort when checking the runtime path with --root. --- src/install.c |5 ++--- src/systemctl.c |5

Re: [systemd-devel] [PATCH] Run rc-local after network.target, as it's often used for frobbing the network.

2011-12-01 Thread Michal Schmidt
On 11/22/2011 08:57 PM, Bill Nottingham wrote: diff --git a/units/fedora/rc-local.service b/units/fedora/rc-local.service index 106b12c..9a38e59 100644 --- a/units/fedora/rc-local.service +++ b/units/fedora/rc-local.service @@ -8,6 +8,7 @@ [Unit] Description=/etc/rc.local Compatibility

Re: [systemd-devel] systemd+dbus: system boot stops at terminal login screen sometimes

2011-11-30 Thread Michal Schmidt
On 11/30/2011 10:49 AM, Chen Jie wrote: (see the full syslog at http://lists.freedesktop.org/archives/dbus/attachments/2025/e9c204bb/attachment-0001.obj) The kernel modules failing to load indicate a problem with your kernel installation. Please sort this problem out first before

Re: [systemd-devel] getty login prompt

2011-11-25 Thread Michal Schmidt
On 11/23/2011 07:26 AM, Devendra Talegaonkar wrote: 30systemd-stdout-syslog-bridge[78]: Failed to accept new connection: Function not implemented Your kernel or libc does not support the accept4() syscall. Michal ___ systemd-devel mailing list

Re: [systemd-devel] systemd diagnostics

2011-11-22 Thread Michal Schmidt
On 11/22/2011 04:36 AM, Edward Z. Yang wrote: 3. Listing enabled services. We should not have to write horrible scripts like this: In F16 you can use systemctl list-unit-files. Michal ___ systemd-devel mailing list

Re: [systemd-devel] openvpn@.service

2011-11-18 Thread Michal Schmidt
On Fri, 18 Nov 2011 19:16:50 -0500 Michael D. Berger wrote: So now if I want to enable openvpn so it would start on boot, what do I do? ln -s /lib/systemd/system/openvpn@.service \ /etc/systemd/system/multi-user.target.wants/openvpn@foo.service Michal

Re: [systemd-devel] httpd fails to start on boot

2011-11-18 Thread Michal Schmidt
On Fri, 18 Nov 2011 19:21:46 -0500 Michael D. Berger wrote: Even though it is enabled, httpd fails to start on boot. After boot, I can start it with no problem. I do have a rather complex httpd.conf . What does systemctl status httpd.service say after boot? Michal

Re: [systemd-devel] httpd fails to start on boot

2011-11-18 Thread Michal Schmidt
On Fri, 18 Nov 2011 20:06:59 -0500 Michael D. Berger wrote: At level 3, seconds after boot: # systemctl status httpd.service httpd.service - The Apache HTTP Server (prefork MPM) Loaded: loaded (/lib/systemd/system/httpd.service; enabled) Active: failed since Fri, 18 Nov

Re: [systemd-devel] openvpn@.service

2011-11-16 Thread Michal Schmidt
On 11/15/2011 10:10 PM, Mirco Tischler wrote: 2011/11/15 Manuel Amador (Rudd-O)rud...@rudd-o.com: It's a multi-instance service. You can instance it several times based on a parameter, much like tty@.service can be instantiated to be tty@tty1.service. Correct. In the instances of

Re: [systemd-devel] [PATCH] random-seed: break ordering cycle with encrypted tmp partitions

2011-11-16 Thread Michal Schmidt
On 11/15/2011 09:20 AM, Tom Gundersen wrote: -After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target +After=systemd-readahead-collect.service systemd-readahead-replay.service rootfs-remount.service @localstatedir@.mount What if /var/lib itself is a separate

Re: [systemd-devel] openvpn@.service

2011-11-16 Thread Michal Schmidt
On 11/16/2011 04:14 PM, Michael D. Berger wrote: . On F16_64 can I now do: systemctl start openvpn.service , or perhaps: systemctl start openvpn@.service , or do I have to do something else? If your config file is /etc/openvpn/foo.conf, then: systemctl start openvpn@foo.service

Re: [systemd-devel] can not systemctl enable rc.local in final fc16

2011-11-14 Thread Michal Schmidt
On 11/14/2011 11:00 AM, floydsm...@aol.com wrote: I can not systemctl enable rc.local.service in final fc16 - error is: Failed to issue method call: No such file or directory The unit is called rc-local.service. $ systemctl list-unit-files|grep rc-local rc-local.service

Re: [systemd-devel] [PATCH] Fix same expression on both sides of ''

2011-11-14 Thread Michal Schmidt
On Wed, 09 Nov 2011 20:48:31 +0100 Thomas Jarosch wrote: The code should probably look like the statements above it. Please verify, I just detected it using cppcheck. Patch applied. Thanks! Michal ___ systemd-devel mailing list

Re: [systemd-devel] contingent After

2011-11-07 Thread Michal Schmidt
On 11/05/2011 06:09 PM, Michael D. Berger wrote: Thanks to the help provided by members of the list, myDaemon is now functioning correctly under systemd. Now for myUpperDaemon: IF myDaemon is enabled; then myUpperDaemon must start after myDaemon ELSE myUpperDaemon must start anyway

Re: [systemd-devel] FW: pthread_create() fails SysV in myDaemon on boot

2011-11-04 Thread Michal Schmidt
On Thu, 03 Nov 2011 12:41:05 -0400 Michael D. Berger wrote: However, in starting a TCP listener socket, from bind(...) I now get EADDRNOTAVAIL which is explained in man 2 bind, so I am still not operational. Do you use NetworkManager? The network interface may not be up yet when your service

Re: [systemd-devel] FW: pthread_create() fails SysV in myDaemon on boot

2011-11-04 Thread Michal Schmidt
On 11/04/2011 03:11 AM, Michael D. Berger wrote: [Service] ControlGroupAttribute=cpu.rt_runtime_us 50 ExecStart=/usr/sbin/myDaemon --daemon I'm guessing --daemon tells the program to daemonize itself. In that case you need to add Type=forking and PIDFile= See man

Re: [systemd-devel] [PATCH] systemctl-completion: always invoke with --no-legend

2011-10-19 Thread Michal Schmidt
On Tue, 11 Oct 2011 20:56:53 -0400 Dave Reisner wrote: In the case of completion for the 'restart' verb, passing the invalid unit name (the colums header) causes completion to cease functioning entirely, with the error: Failed to issue method call: Unit name UNIT is not valid. This adds

Re: [systemd-devel] Seeking Advice on debugging failure to reboot

2011-10-12 Thread Michal Schmidt
On 10/12/2011 03:46 PM, Barry Scott wrote: Thanks to Michal's observation that swapoff failed we have now found the root cause. swapoff is called while all our production processes are still running. We would have expected systemd to turn off swap after stopping most if not all processes and

Re: [systemd-devel] Seeking Advice on debugging failure to reboot

2011-10-12 Thread Michal Schmidt
On 10/12/2011 04:54 PM, Barry Scott wrote: What dependency is supposed to cause the swapoff to be after the production processes are stopped? The units' ordering should be something like this: *.swap Before swap.target Before sysinit.target Before basic.target Before production.service This

Re: [systemd-devel] Seeking Advice on debugging failure to reboot

2011-10-11 Thread Michal Schmidt
On 10/11/2011 12:44 PM, Barry Scott wrote: The full log is here: http://onelanftp.co.uk/bscott/ntb10117.netconsole.txt The first boot sequence from lines 1-182 works. The second from 188-1182 has the problem. If the kernel is at fault then I would expect to see the About to execute:

Re: [systemd-devel] Seeking Advice on debugging failure to reboot

2011-10-11 Thread Michal Schmidt
On 10/11/2011 05:09 PM, Barry Scott wrote: I have uploaded full netconsole logs with the options you suggested: http://onelanftp.co.uk/bscott/netconsole.noreboot.txt http://onelanftp.co.uk/bscott/netconsole.reboot.txt A suspicious moment occurring only in the failing case is: [ 751.743255]

Re: [systemd-devel] Seeking Advice on debugging failure to reboot

2011-10-07 Thread Michal Schmidt
On 10/06/2011 07:26 PM, Barry Scott wrote: On Thursday 06 October 2011 15:56:43 Barry Scott wrote: We can reproducably get an F15 system in a state that it fails to complete a reboot. Then can you suggest how to reproduce it? The obvious difference between a reboot that works and one

Re: [systemd-devel] F15: PathExistsGlob

2011-10-05 Thread Michal Schmidt
On 10/04/2011 02:22 PM, Reindl Harald wrote: would it be possible to backport PathExistsGlob for F15 https://bugzilla.redhat.com/show_bug.cgi?id=734435 Possible, yes. The bug is not relevant for F15 though, because cups is a SysV/LSB service there. this means we can not make a

Re: [systemd-devel] How view a systemd snapshot?

2011-09-29 Thread Michal Schmidt
On 09/29/2011 10:29 AM, Nick Urbanik wrote: Dear Folks, I have made a systemd snapshot with systemctl snapshot. How do I view (or record elsewhere) the contents of that snapshot? systemctl show foo.snapshot How is the snapshot stored on the disk? The snapshot unit is generated in memory

Re: [systemd-devel] systemd equivalent of chkconfig --list | grep '3:on'

2011-09-29 Thread Michal Schmidt
On 09/29/2011 09:30 AM, Nick Urbanik wrote: How do I do the equivalent of chkconfig --list | grep '3:on'? There's a convenient command systemctl list-unit-files, but it is not available in the version of systemd in Fedora 15. You can explore the /etc/systemd/system/*.target.wants/

Re: [systemd-devel] Restart=always and ExecStartPre

2011-09-28 Thread Michal Schmidt
On Wed, 28 Sep 2011 17:49:54 +0200 Reindl Harald wrote: why does systemd not restart a killed service if the ExecStartPre-process is still running, see below - at my opinion after killall afpd the service should be restarted and in a perfect case even if ExecStartPre-process dies

[systemd-devel] [PATCH] service: delayed main PID guessing

2011-09-24 Thread Michal Schmidt
There is a lot of services with incorrectly implemented double-forking. Their original process exits before the child writes the PID file. With SysVinit it was rarely a problem, because the PID file was usually read only when the initscript was called again. systemd wants to read the PID file

[systemd-devel] [PATCH] unit: fix complementing of requirement deps with After deps for targets

2011-09-23 Thread Michal Schmidt
'man systemd.target' says: Unless DefaultDependencies= is set to false, target units will implicitly complement all configured dependencies of type Wants=, Requires=, RequiresOverridable= with dependencies of type After= if the units in question also have DefaultDependencies=true. It did

Re: [systemd-devel] what does systemd do if the syslogd errs on start?

2011-07-07 Thread Michal Schmidt
On 07/07/2011 08:28 AM, Rainer Gerhards wrote: Let's make sure we are on the same line. Sequece of events: 1. systemd starts syslogd 2. syslogd parses config, detects errors 3. syslogd logs config errors via syslog() Thus it sends them to /dev/log. No process is reading it, but syslog.socket

Re: [systemd-devel] [RFC] Preset Files

2011-07-06 Thread Michal Schmidt
On Wed, 6 Jul 2011 00:42:25 +0200 Lennart Poettering wrote: Actually, I do want a way how people can reset all service enable states to what the vendor intended. And that should be systemctl preset without arguments I believe. That would be too easy to run accidentally. They can run: cd

Re: [systemd-devel] [PATCH] Return error code 3 with systemctl status after killall LSB server

2011-07-04 Thread Michal Schmidt
On Fri, 1 Jul 2011 23:17:57 +0200 Lennart Poettering wrote: The problem here is that apache is a SysV init script, and for those it is not really clear whether it is a problem that no process is running anymore or if that's just the normal case. This is true in general, but sometimes we do

  1   2   >