| Summary: | www-servers/tomcat-6.0.13-r1: init script doesn't report failure on missing temp directory | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Sandro Bonazzola (RETIRED) <sanchan> |
| Component: | [OLD] Server | Assignee: | William L. Thomson Jr. (RETIRED) <wltjr> |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | CC: | sandro.bonazzola |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Bug Depends on: | 180023 | ||
| Bug Blocks: | |||
|
Description
Sandro Bonazzola (RETIRED)
2007-05-27 08:10:01 UTC
(In reply to comment #0) > > Having /var/tmp mounted in tmpfs (mainly for /var/tmp/portage...) causes > /var/tmp/tomcat-6 disappear on reboot, causing a dangling symlink. Might want to consider just putting /var/tmp/portage on tmpfs, that way only the contents in that dir get blown away on reboot. http://www.pathname.com/fhs/pub/fhs-2.3.html#VARTMPTEMPORARYFILESPRESERVEDBETWEE > Launching /etc/init.d/tomcat-6 start display OK on the console but the server > fails to start. > > The init script need some loving, if tomcat fail to start, it's not OK. That seems like more of a problem with start-stop-daemon. I am passing --chdir "${CATALINA_TMPDIR}" to start-stop-daemon, and it's spitting out /sbin/start-stop-daemon: Unable to chdir() to /var/tmp/tomcat-6/ (No such file or directory) in catalina.out. That might be due to how we are capturing stderr/stdout but s-s-d should fail either way and no spit out OK. So why start-stop-daemon continues on trying to start Tomcat instead of just failing and bailing. I am not sure of ATM. > While working on the init script would be wonderful having /var/tmp/tomcat-6 > created if it doesn't exists. I will take that under consideration. But not only will I have to create them, but will have to change ownership and make sure permissions are correct. FYI this is partly a result of another user requesting Tomcat's pwd be set during start, and not default. Thus the error is coming from that, since it's pwd is it's temp dir. That does not exist on your system. > Actual Results: > init script fails to report missing directory > > Expected Results: > either init script report the error or really start tomcat (creating required > missing directory) Well it's being logged in catalina.out about the failure. Granted s-s-d should fail to start and not spit out OK. I will see about opening a bug for s-s-d. The error would show up on terminal IF we weren't capturing stdout/stderr as we are. Which at the present time is the only way to capture that information which many have requested and required. Upstream also captures and re-directions Tomcat's stdout/err. Based on my gut feelings about not liking the idea of creating dirs in an init script and etc that were created by an ebuild. Not to mention that according to FHS /var/tmp is supposed to remain after boot. Going to close this bug as invalid, primarily due to FHS compliance. (In reply to comment #1) > (In reply to comment #0) > > Having /var/tmp mounted in tmpfs (mainly for /var/tmp/portage...) causes > > /var/tmp/tomcat-6 disappear on reboot, causing a dangling symlink. > > Might want to consider just putting /var/tmp/portage on tmpfs, that way only > the contents in that dir get blown away on reboot. [cut] > Based on my gut feelings about not liking the idea of creating dirs in an init > script and etc that were created by an ebuild. Not to mention that according to > FHS /var/tmp is supposed to remain after boot. > > Going to close this bug as invalid, primarily due to FHS compliance. I will not reopen the bug because I accept your point of view. I'll move portage temp dir to /tmp since I don't need/want preserve it's content between reboots. However note that FHS compliance saya also that "Although data stored in /var/tmp is typically deleted in a site-specific manner, it is recommended that deletions occur at a less frequent interval than /tmp." so /var/tmp can be cleaned anyway an /var/tmp/tomcat-6 can disappear. The service should be robust and recreate a temporary directory if it need one. I'll add a test in local.start but I hope you consider to add at least a test on the existence of the temp dir with a warning if it's missing. |