Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 331323 - net-fs/openafs startup scripts always send daemon stdout/err to /dev/null
Summary: net-fs/openafs startup scripts always send daemon stdout/err to /dev/null
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Network Filesystems
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-05 14:58 UTC by Dale Pontius
Modified: 2015-05-03 14:37 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dale Pontius 2010-08-05 14:58:17 UTC
I had a problem setting my cache size, so attempts to start openafs-client failed silently, giving no information to debug the problem, even when setting -verbose and -debug options.  Looking at the initscript, I saw that stdout and stderror were always sent to /dev/null.  I tweaked this to send the output to a file in /var/log/, and saw an easy-to-interpret message that my cache size was to big for my cache partition, and suggested a correct size to use.  A minor tweak to /etc/openafs/cacheinfo and I was up and running.

Reproducible: Always

Steps to Reproduce:
1. Create a 2GB cache partition, format as ext2. (Mine came out slightly larger.)
2. Edit /etc/openafs/cacheinfo to designate a 2GB (2000000) cache size.
3. Run "/etc/init.d/openafs-client start"

Actual Results:  
Client refuses to start

Expected Results:  
Client should have started.

As mentioned, based on the error message, I updated my cache size to 1960990, which is 95% of my rounded-up 2GB cache partition.  Now it works.

Rather than my tweaked initscript, I adopted a slightly cleaner fix.  In "/etc/init.d/openafs-client" in the "choose_afsdoptions()" routine I added the lines :
if [[ -z "$VERBOSE" ]]; then
	LOGSTART="/dev/null"
	LOGSTOP="/dev/null"
else
	LOGSTART="/var/log/openafs/client.lastStart"
	LOGSTOP="/var/log/openafs/client.lastStop"
fi

Then in the "cleanstart()" and "stop()" procedures I replaced "/dev/null" with "${LOGSTART}" and "${LOGSTOP}" respectively.  This way for normal operation, everything works as it does today, sending the chatter to /dev/null.  But for debugging a problem you can define VERBOSE in "/etc/conf.d/openafs-client" and you'll get the needed and valuable output.  Incidentally, the VERBOSE environment variable was already used in "/etc/init.d/openafs-client" even though it was not defined in "/etc/conf.d/openafs-client".
Comment 1 Andrew Savchenko gentoo-dev 2015-05-03 14:37:24 UTC
Fixed in 1.6.11.1