Ticket #647 (closed defect: fixed)
buildbot.tac specifies a relative path for twistd.log
| Reported by: | dwlocks | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 0.8.0 |
| Version: | 0.7.11 | Keywords: | |
| Cc: |
Description
Buildbot's log file will be created in the current working directory of the parent process. This is probably the behavior people expect. It is what I expected. It is a problem for init scripts, which have wacky hard to configure environments.
Twisted bug 2572 http://twistedmatrix.com/trac/ticket/2572 means that the current working directory for any code in buildbot.tac is not configurable with "--rundir= ". The executing environment must have the correct working directory. Various flavors of Linux have different init tools with inconsistent options. Maybe it's easy to specify the working directory for a daemon (Debian). Maybe it's close to impossible (gentoo).
Is it reasonable to specify "%(basedir)/twistd.log" in buildbot.tac?
Or only specify %(basedir) if os.getcwd()="/"
Attachments
Change History
comment:2 Changed 2 years ago by dwlocks
This is how I'm handling the problem at zmanda, but if anyone is actually running buildbot chrooted I have no idea what the effect would be.
comment:3 Changed 2 years ago by dustin
- Milestone changed from undecided to 0.7.12
Good solution locally, but I don't think it's quite right to go into the distro..
comment:4 Changed 2 years ago by dustin
so it sounds like we determined that this is not buildbot's problem?
comment:5 Changed 2 years ago by ddunbar
It sounded like the old buildbot.tac used to work, and the new one doesn't, so something has been broken on the buildbot side. My conclusion from the IRC discussion was that we should make the new buildbot.tac act like the old one (but I'm not sure what needs to be done).
comment:6 Changed 2 years ago by dustin
- Milestone changed from 0.7.12 to 0.8.+
Bumping out to the next release until we can figure out what the problem is.
comment:7 Changed 2 years ago by dustin
- Milestone changed from 0.8.+ to 0.8.0
OK, Dan actually specified the right fix in the bug description:
Is it reasonable to specify "%(basedir)/twistd.log" in buildbot.tac?
Yes. Do that. Only use os.path.join instead of string concatenation.
comment:8 Changed 2 years ago by Kovarththanan Rajaratnam
- Status changed from new to closed
- Resolution set to fixed
(fixes #647) Use basedir to form the path to the twistd.log file
Thanks to Dustin and Dan for the solution
Changeset: efbb9b05fcac613f44c4d35fc8f5cded0d38cf7d
comment:9 Changed 20 months ago by Kovarththanan Rajaratnam
(fixes #647) Use basedir to form the path to the twistd.log file
Thanks to Dustin and Dan for the solution
Changeset: efbb9b05fcac613f44c4d35fc8f5cded0d38cf7d
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)

Hmm, #253 says the exact opposite. We could certainly support both, though. If create-master gets '.' as its basedir, then it will create a "relocatable" master; otherwise, it should include the absolute path to its basedir in the tac file. Do you want to put together a patch for this?