Re: [systemd-devel] rsync output is not captured in the journal

2015-01-05 Thread Zbigniew Jędrzejewski-Szmek
On Mon, Jan 05, 2015 at 03:25:33PM +0100, Igor Bukanov wrote: > On 5 January 2015 at 15:08, Daniel J Walsh wrote: > > chcon -t bin_t /usr/bin/rsync, should stop SELinux from interfering, or > > set the rsync_client boolean. > > > > http://danwalsh.livejournal.com/61646.html > > Yes, that solved t

Re: [systemd-devel] rsync output is not captured in the journal

2015-01-05 Thread Igor Bukanov
On 5 January 2015 at 15:08, Daniel J Walsh wrote: > chcon -t bin_t /usr/bin/rsync, should stop SELinux from interfering, or > set the rsync_client boolean. > > http://danwalsh.livejournal.com/61646.html Yes, that solved the problem. Now, why there were no any error messages about discarded rsync

Re: [systemd-devel] rsync output is not captured in the journal

2015-01-05 Thread Igor Bukanov
I attach strace log for systemd. I have in my test unit: # cat test.service [Service] ExecStart=/usr/bin/bash -c 'echo rsync copy' ExecStart=/var/rsync -vv /etc/hostname /tmp/h6 ExecStart=/usr/bin/bash -c 'echo system rsync' ExecStart=/usr/bin/rsync -vv /etc/hostname /tmp/h2 ExecStart=/usr/bin/bas

Re: [systemd-devel] rsync output is not captured in the journal

2015-01-05 Thread Mantas Mikulėnas
On Mon, Jan 5, 2015 at 2:56 PM, Lennart Poettering wrote: > Hmm, quite possibly rsync has some logic built-in that checks whether > it is run with PID 1 as parent process, and then changes its logging > behaviour. On sysvinit that made some sense, but it certainly doesn't > on any other init syste

Re: [systemd-devel] rsync output is not captured in the journal

2015-01-05 Thread Lennart Poettering
On Sun, 04.01.15 21:06, Igor Bukanov (i...@mir2.org) wrote: > Hello, > > I have a strange case when there is no output in the journal from > rsync when the command is run from a service. This is on Fedora 21 > with systemd 217. > > Consider the following trivial test unit: > > # cat /etc/system

Re: [systemd-devel] rsync output is not captured in the journal

2015-01-05 Thread Mantas Mikulėnas
On Mon, Jan 5, 2015 at 1:44 PM, Igor Bukanov wrote: > On 5 January 2015 at 12:21, Mantas Mikulėnas wrote: >> Run it under `strace -D` – the problem may be related to rsync's >> parent being pid1. > > Under strace -D the problem disappeared as well. The problem also > disappears if I run rsync lik

Re: [systemd-devel] rsync output is not captured in the journal

2015-01-05 Thread Igor Bukanov
On 5 January 2015 at 12:21, Mantas Mikulėnas wrote: > Run it under `strace -D` – the problem may be related to rsync's > parent being pid1. Under strace -D the problem disappeared as well. The problem also disappears if I run rsync like in: ExecStart=/usr/bin/bash -c 'exec /usr/bin/rsync -vv /et

Re: [systemd-devel] rsync output is not captured in the journal

2015-01-05 Thread Mantas Mikulėnas
On Mon, Jan 5, 2015 at 12:58 PM, Igor Bukanov wrote: > It could be that this is SELinux-related. If I copy the rsync binary > to a new location and change the test service unit to use it, then the > log appeared as it should. However, I have no indications of any > rsync-related issues in any SELi

Re: [systemd-devel] rsync output is not captured in the journal

2015-01-05 Thread Igor Bukanov
It could be that this is SELinux-related. If I copy the rsync binary to a new location and change the test service unit to use it, then the log appeared as it should. However, I have no indications of any rsync-related issues in any SELinux logs. Another thing is that if I run under strace the orig

[systemd-devel] rsync output is not captured in the journal

2015-01-04 Thread Igor Bukanov
Hello, I have a strange case when there is no output in the journal from rsync when the command is run from a service. This is on Fedora 21 with systemd 217. Consider the following trivial test unit: # cat /etc/systemd/system/test.service [Service] ExecStart=/usr/bin/rsync -vv /etc/hostname /tmp