Re: [systemd-devel] [PATCH 2/3] [fd leak] Stop leaking an fd in sd_journal_sendv

2014-09-12 Thread Philippe De Swert
Hi David, On 11/09/14 18:43, David Herrmann wrote: > Hi >> _public_ int sd_journal_sendv(const struct iovec *iov, int n) { >> PROTECT_ERRNO; >> -int fd; >> +_cleanup_close_ int fd = -1; > > This does not work. "fd" is used to hold the journal fd, but this is a > global f

[systemd-devel] transforming Iptables bash script to systemd service file -help

2014-09-12 Thread lux-integ
Greetings, I am attempting to learn to use systemd. I have an IPtbales script I intend to transform from a bash script to a systemd service file. It has lines such as iptables -A INPUt -p tcp ..-j ACCEPT which I intend to transform to ExecStart=iptables -A INPUT -p tcp ..-j ACCEPT

[systemd-devel] [PATCH] sysctl: don't replace dots with slashes in prefix

2014-09-12 Thread Jan Synacek
The prefix is always tested against normalized property names. --- src/sysctl/sysctl.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index 8ce9870..0cb0875 100644 --- a/src/sysctl/sysctl.c +++ b/src/sysctl/sysctl.c @@ -256,12 +256,6 @@ static in

[systemd-devel] Regression in v209: SIGKILL sent immediately after SIGTERM

2014-09-12 Thread Stef Walter
This commit breaks cockpit orderly shutdown: > commit 743970d2ea6d08aa7c7bff8220f6b7702f2b1db7 > Author: Lennart Poettering > Date: Fri Feb 7 16:12:09 2014 +0100 > > core: one step back again, for nspawn we actually can't wait for > cgroups running empty since systemd will get exactly zero

Re: [systemd-devel] transforming Iptables bash script to systemd service file -help

2014-09-12 Thread Zbigniew Jędrzejewski-Szmek
Hi, this approach doesn't make much sense, for a few reasons. First, having systemd execute each line as a separate command is not very efficient: systemd is doing other things at the same time, and will interleave other jobs with the commands, log lots of things, etc. Second, embedding such cond

Re: [systemd-devel] [PATCH RFC] udev: allow removing tags via TAG-="foobar"

2014-09-12 Thread Tanu Kaskinen
On Thu, 2014-09-11 at 15:25 +0200, David Herrmann wrote: > Hi > > On Thu, Sep 11, 2014 at 1:28 PM, David Herrmann wrote: > > This extends the udev parser to support OP_REMOVE (-=) and adds support > > for TAG-= to remove previously set tags. We don't fail if the tag didn't > > exist. > > > > This

Re: [systemd-devel] transforming Iptables bash script to systemd service file -help

2014-09-12 Thread Simon McVittie
On 12/09/14 09:57, lux-integ wrote: > The question is; is there a way of conditionally procesing lines in systemd > service files such as the following > > ExecStart=/path/to/executible1 > ExecStart=/path/to/executible2 > some condition satisfied ( for example ConditionFileNotEmpty=SomeFile

Re: [systemd-devel] transforming Iptables bash script to systemd service file -help

2014-09-12 Thread lux-integ
On Friday 12 September 2014 11:53:23 Simon McVittie wrote: > The way to do this is to write a script in the programming language of > your choice (bash is one possibility), and have the systemd service file > run that. There would be little point in systemd reinventing a generic > script interprete

Re: [systemd-devel] transforming Iptables bash script to systemd service file -help

2014-09-12 Thread Reindl Harald
Am 12.09.2014 um 14:04 schrieb lux-integ: > On Friday 12 September 2014 11:53:23 Simon McVittie wrote: >> The way to do this is to write a script in the programming language of >> your choice (bash is one possibility), and have the systemd service file >> run that. There would be little point in s

Re: [systemd-devel] transforming Iptables bash script to systemd service file -help

2014-09-12 Thread Jóhann B. Guðmundsson
On 09/12/2014 08:57 AM, lux-integ wrote: Greetings, I am attempting to learn to use systemd. I have an IPtbales script I intend to transform from a bash script to a systemd service file. If it had been technically possible to migrate the legacy sysv initscript to native systemd we ( as in

Re: [systemd-devel] [PATCH] Add the CPU hotplug rule

2014-09-12 Thread John Haxby
On 02/09/14 16:42, Kay Sievers wrote: >> > Either the kernel has to provide a mechanism for the userspace to >> > control onlining, or do it itself and provide a mechanism to prevent >> > automatic onlining. I think that the first option is actually >> > cleaner. So yeah, let's add the original rul

[systemd-devel] [PATCH] core: smack-setup: Actually allow for succesfully loading CIPSO policy

2014-09-12 Thread philippedeswert
From: Philippe De Swert The line under the last switch statement *loaded_policy = true; would never be executed. As all switch cases return 0. Thus the policy would never be marked as loaded. Found with Coverity. Fixes: CID#1237785 --- src/core/smack-setup.c | 2 +- 1 file changed, 1 insertion

Re: [systemd-devel] [PATCH] Add the CPU hotplug rule

2014-09-12 Thread Kay Sievers
On Fri, Sep 12, 2014 at 3:04 PM, John Haxby wrote: > On 02/09/14 16:42, Kay Sievers wrote: >>> > Either the kernel has to provide a mechanism for the userspace to >>> > control onlining, or do it itself and provide a mechanism to prevent >>> > automatic onlining. I think that the first option is a

Re: [systemd-devel] [PATCH] Add the CPU hotplug rule

2014-09-12 Thread Todd Vierling
On Fri, Sep 12, 2014 at 11:03 AM, Kay Sievers wrote: >> Here, the default >> action is almost a trivial configuration... but not the only possible >> desired configuration. >> >> Can I ask your reasoning for CPU hotplug behaviour not being the role of >> udev to fulfill? If that's not the right pl

[systemd-devel] help with systemd socket file for programs in the quagga suite

2014-09-12 Thread lux-integ
Greetings, I am attempting to learn how to use systemd. I decided to try synthesising a 'socket file' I have programs in the quagga suite installed in /usr and doing /usr/sbin/program --help has this line -z, --socket Set path of zebra socket I read the manpage on systemd sockets

Re: [systemd-devel] help with systemd socket file for programs in the quagga suite

2014-09-12 Thread Dave Reisner
On Fri, Sep 12, 2014 at 06:15:32PM +0100, lux-integ wrote: > Greetings, > > I am attempting to learn how to use systemd. I decided to try synthesising a > 'socket file' I'll stop you here. You can't simply "synthesize" a socket unit for any arbitrary program that uses a socket (regardless of th

Re: [systemd-devel] help with systemd socket file for programs in the quagga suite

2014-09-12 Thread lux-integ
On Friday 12 September 2014 18:28:30 Dave Reisner wrote: > I'll stop you here. You can't simply "synthesize" a socket unit for any > arbitrary program that uses a socket (regardless of the address family). > Socket units are specific to socket-activated services (which requires > code changes in th

Re: [systemd-devel] Suppressing automounting

2014-09-12 Thread Dale R. Worley
> From: Tobias Geerinckx-Rice > Step back, and define exactly what it is you actually need^Wwant to do. For a certain entry in /etc/fstab (which will in practice always have the option "nofail"), if the device is not available "until booting is over" (which I'm willing to denote with a specified

Re: [systemd-devel] [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-12 Thread Luis R. Rodriguez
On Thu, Sep 11, 2014 at 10:48 PM, Tom Gundersen wrote: > On Fri, Sep 12, 2014 at 12:26 AM, Luis R. Rodriguez > wrote: >> On Thu, Sep 11, 2014 at 2:43 PM, Tom Gundersen wrote: >>> How about simply introducing a new flag to finit_module() to indicate >>> that the caller does not care about asynchr

[systemd-devel] watchdog feature highly ineffecient / using too much CPU

2014-09-12 Thread Michael Biebl
Hi, we are currently trying to debug an upgrade failure from 208 to 215 [1] in Debian related to the sd_notify/watchdog feature. This bug is not reliably reproducibly, we suspect a race somewhere when systemd is re-exec'ed and a daemon currently tries to talk to systemd via sd_notify. In my atte