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 > test_check_

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 +-

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 26/26] shared: drop mempool, now unused

2014-10-24 Thread Michal Schmidt
On 10/20/2014 08:43 PM, Lennart Poettering wrote: > On Thu, 16.10.14 09:51, Michal Schmidt (mschm...@redhat.com) wrote: > > All other patches look great to me. Please go ahead and commit. I pushed the first 19 patches, with LinkedHashmap renamed to OrderedHashmap. In my tree I hav

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 a

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 >&

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 *_FORE

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

[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 future

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

2014-10-16 Thread Michal Schmidt
t.h \ diff --git a/src/shared/hashmap.c b/src/shared/hashmap.c index a5740df..a6d204f 100644 --- a/src/shared/hashmap.c +++ b/src/shared/hashmap.c @@ -4,6 +4,7 @@ This file is part of systemd. Copyright 2010 Lennart Poettering + Copyright 2014 Michal Schmidt systemd is free softwar

[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 v

[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 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 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 chains

[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 re

[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 --- a/con

[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 +++ b/src/

[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 b/src/journ

[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 test-hashmap-link

[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 a/src/shared/hashm

[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 --- a/src/shared/instal

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

2014-10-16 Thread Michal Schmidt
ea --- /dev/null +++ b/src/shared/mempool.c @@ -0,0 +1,94 @@ +/*-*- Mode: C; c-basic-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/

[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
--- /dev/null +++ b/tools/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 ter

[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 ar

[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 deletions

[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 @@ static

[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 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. --- sr

[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, c

[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 insertio

[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 a/src/resolve/res

[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 ch

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

2014-10-16 Thread Michal Schmidt
ed hashmaps to be tracked in a global linked list where they can be inspected from gdb with the provided sd_dump_hashmaps gdb command. Michal Schmidt (26): hashmap: add LinkedHashmap as a distinct type test: generate tests for LinkedHashmap from Hashmap tests test: add and i

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 b

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

2013-06-04 Thread Michal Schmidt
ot work 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 Date: Mon Oct 29 23:33:01 2012 +0100 agetty: fix au

Re: [systemd-devel] F18 systemd update broke varnish service?

2013-05-17 Thread Michal Schmidt
On 05/16/2013 11:23 PM, Michał Piotrowski wrote: I noticed that varnish service doesn't work after systemd update to version 201-2 Please file a bug. Michal ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.

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] 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 a

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 I

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 be

[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 @@ sta

[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). --- src/core/uni

[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 t

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

2013-03-12 Thread Michal Schmidt
ended to revert 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 sta

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() get

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] 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 j

[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. --- src/core/manager.

Re: [systemd-devel] [PATCH] core: reuse the same /tmp and /var/tmp

2013-02-01 Thread Michal Schmidt
On 02/01/2013 04:09 PM, Michal Sekletar wrote: All Execs within the service, will get mounted the same /tmp and /var/tmp directories, if service is configured with PrivateTmp=yes. Temporary directories are cleaned up by service itself, rather than relying on systemd-tmpfiles. Thank you taking o

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] [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(-) dif

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 int

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 +58,

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] 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 user

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 src/shared/unit-na

Re: [systemd-devel] [PATCH] systemd: added new dependency PartOf

2012-07-26 Thread Michal Schmidt
On 07/20/2012 03:55 PM, Michal Sekletar wrote: This should address TODO item "new dependency type to "group" services in a target". Semantic of new dependency is as follows. Once configured it creates dependency which will cause that all dependent units get stopped if unit they all depend on is s

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

2012-07-23 Thread Michal Schmidt
ich 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 expl

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 ha

[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 int

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 d

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 11:30 PM, Sven Anders wrote: What I find curious is, that it reads the correct command line and then opens the /proc file again, but this time it fails. What happened to the first read? The first read is from is_kernel_thread(). The second read is from show_pid_array() -> get_pro

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, MAP_PRIVATE|MAP_ANO

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 > Date: Fri Jan 13 23:55:28 2012 +0100 > > mount: fix quota > > quotacheck.service and quotaon.service were not pulled in for &g

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

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 to

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 v3

Re: [systemd-devel] Enabling template units

2012-01-19 Thread Michal Schmidt
Colin Guthrie wrote: > However, if I do: "systemctl enable memcached@default.service" I get > the > same error as above. > > > Do you agree that when calling this command it should work and enable > things as needed? It would obviously mean supporting %i/%I in the > [Install] section's Alias opti

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

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 tempror

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: >

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 |

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] 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 Cond

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 attemptin

Re: [systemd-devel] getty login prompt

2011-11-25 Thread Michal Schmidt
On 11/23/2011 07:26 AM, Devendra Talegaonkar wrote: <30>systemd-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 syst

Re: [systemd-devel] Creating unit file - conditional process arguments

2011-11-22 Thread Michal Schmidt
On 11/22/2011 01:27 PM, Honza Horak wrote: Do I have to create the same bash script and execute it like: ExecStartPre=/path/to/simple/script ExecStart=/path/to/daemon $MYARGS This won't work, because environment is not transferred from one execution to another. You could solve this using a wr

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 systemd-devel@lists.freedesktop.

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 No

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] 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] 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 Mi

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 m

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): 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 openvpn@.service the @ should

systemd-devel@lists.freedesktop.org

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 systemd-devel@lists.fr

Re: [systemd-devel] ExecStop required in service file?

2011-11-14 Thread Michal Schmidt
On Mon, 14 Nov 2011 10:51:55 -0500 Michael D. Berger wrote: > On my F16_64, mySrvDaemon is a tcp/ip server involving posix > threads, written in C++. mySrvDaemon.service: > > [Unit] > Description=Server Service > After=syslog.target network.target > > [Service] > PIDFile=/var/lock/subsys/my

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] systemd logging isl broken

2011-11-11 Thread Michal Schmidt
On 11/10/2011 05:47 PM, Michael D. Berger wrote: This may be related to the problem repotred in p4p1 changed to p2p1; works oddly reported on: us...@lists.fedoraproject.org I don't see how network device naming is related to this. /bin/systemctl enable myDaemon.service ln -s '/etc

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 ENDI

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

2011-11-04 Thread Michal Schmidt
On Thu, 3 Nov 2011 23:07:43 +0100 Lennart Poettering wrote: > b) Explicitly place your service in the root cgroup of the "cpu" > controller, by adding "ControlGroup=cpu:/" to the service file. Michael, have you tried option b) ? > c) By actually assigning an RT budget to the group, by adding > "C

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

2011-11-04 Thread Michal Schmidt
On Fri, 04 Nov 2011 14:36:05 -0400 Michael D. Berger wrote: > Your assumption is correct. In the code I have: > if (argc == 2) > { > string arg = argv[1]; > if (arg != "--daemon") > throw ... > ::daemon(0,0); > isDaemon = true; >

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 syst

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 s

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

2011-11-03 Thread Michal Schmidt
On Wed, Nov 2, 2011 at 1:59 PM, Michael D. Berger wrote: In F15_64, on starting SysV myDaemon in level 3, with S99myDaemon rtn = pthread_create() fails with: rtn=1=Operation not permitted Can you produce a minimal testcase for us to reproduce the problem? Does this look related?: https:

Re: [systemd-devel] [PATCH/resend] systemctl: make list-unit-files output more economical

2011-10-24 Thread Michal Schmidt
On Mon, 24 Oct 2011 11:49:59 +0200 Zbigniew Jędrzejewski-Szmek wrote: > The first column is given the width of the widest entry, > if possible, otherwise all entries are ellipsized to fit > in ($COLUMNS - (width of second column)). Thanks! I have modified it a bit to make it similar to output_unit

  1   2   >