View Issue Details

IDProjectCategoryView StatusLast Update
0004535GNUnetARM servicepublic2016-05-25 21:40
Reporternikita Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Platformamd64OSgentooOS Versionvanilla amd64
Product VersionGit master 
Target Version0.10.1Fixed in Version0.10.1 
Summary0004535: gnunet-arm ignores logging and polutes tty
Descriptiongnunet-arm init script should not default to sending output to the current tty or terminal.
When I have the following in gnunet.conf:
[arm]
GLOBAL_POSTFIX = -L INFO -l $GNUNET_CACHE_HOME/{}-%Y-%m-%d.log

same goes for [transport] and [transport-udp]
*replace {} with [] and the results are equal.

Solution / wish: Fix the default behaviour to not send any output to the tty which started gnunet-arm, default to disabled output.

TagsNo tags attached.
Attached Files
gnunet.initd (2,005 bytes)

Activities

nikita

2016-05-25 17:58

reporter   ~0010745

Maybe "polutes" was the wrong choice of words, but it shouldn't default to sending to tty.
You should explicitly ask for what you want (tty output) to get it.

nikita

2016-05-25 18:07

reporter   ~0010746

openrc script attached for completeness.
It is work in progress and will be extended for configuration later.

Christian Grothoff

2016-05-25 21:10

manager   ~0010750

GLOBAL_POSTFIX only applies to services, NOT to command-line tools.

For command-line tools, you can use "-l /dev/null" to throw away logs, but generally if I run a command-line tool, logging to stderr is fine (and it does log to stderr, not stdout).

Now, obviously some init-script may add the respective options for gnunet-arm explicitly to log to some log file or even /dev/null. But that's distro-specific. So I'm not sure what you propose we do here.

Christian Grothoff

2016-05-25 21:11

manager   ~0010751

The attached init script is for Gentoo. Maybe this bug should have been filed with Gentoo?

nikita

2016-05-25 21:27

reporter   ~0010755

I am aware that it is for gentoo as it is part of the work in progress of getting gnunet into gentoo portage ( https://bugs.gentoo.org/show_bug.cgi?id=579580 , http://c.n0.is/?p=p/g/testing.git;a=tree;f=net-misc;hb=HEAD ), but the end result openrc will hopefully be more generic so that it can be used by any distro running openrc.

If this can not be resolved with what I wrote in the opening post, what do you suggest I would add to "shut up" the terminal output?

ebegin "Starting ${SVCNAME}"
         # shouldn't be necessary... but
         start-stop-daemon --start --user gnunet --name gnunet --pidfile ${PIDFILE} \
                --exec /usr/lib/gnunet/libexec/gnunet-service-arm -- -d
                 # flags to be passed to the process appear after the double dash
eend $?


this is obviously not working, and adding the logging mechanisms in gnunet.conf failed too.
I will try to add what you suggested to gnunet.conf and see if there's already a solution I can use.

nikita

2016-05-25 21:31

reporter   ~0010756

Thanks, adding -l /dev/null to the init script worked.

I will make this configurable, so that at some point I can provide a generic openrc init + conf files to gnunet, if it seems well enough to be included.

Christian Grothoff

2016-05-25 21:36

manager   ~0010757

Ok, so all is fine now and we can close this bug?

nikita

2016-05-25 21:39

reporter   ~0010758

Yes, it can be closed.

Issue History

Date Modified Username Field Change
2016-05-25 17:51 nikita New Issue
2016-05-25 17:58 nikita Note Added: 0010745
2016-05-25 18:06 nikita File Added: gnunet.initd
2016-05-25 18:07 nikita Note Added: 0010746
2016-05-25 21:10 Christian Grothoff Note Added: 0010750
2016-05-25 21:11 Christian Grothoff Note Added: 0010751
2016-05-25 21:11 Christian Grothoff Assigned To => Christian Grothoff
2016-05-25 21:11 Christian Grothoff Status new => feedback
2016-05-25 21:27 nikita Note Added: 0010755
2016-05-25 21:27 nikita Status feedback => assigned
2016-05-25 21:31 nikita Note Added: 0010756
2016-05-25 21:36 Christian Grothoff Note Added: 0010757
2016-05-25 21:36 Christian Grothoff Status assigned => feedback
2016-05-25 21:39 nikita Note Added: 0010758
2016-05-25 21:39 nikita Status feedback => assigned
2016-05-25 21:40 Christian Grothoff Status assigned => closed
2016-05-25 21:40 Christian Grothoff Resolution open => no change required
2016-05-25 21:40 Christian Grothoff Fixed in Version => 0.10.1
2016-05-25 21:40 Christian Grothoff Target Version => 0.10.1