[Buildbot-commits] [Buildbot] #2711: Clean needs to be run as root

Buildbot trac trac at buildbot.net
Mon Mar 3 17:24:43 UTC 2014


#2711: Clean needs to be run as root
----------------------+-----------------------
Reporter:  dank       |      Owner:
    Type:  undecided  |     Status:  new
Priority:  minor      |  Milestone:  undecided
 Version:  0.8.8      |   Keywords:
----------------------+-----------------------
 I have a poorly-behaved build step that leaves files behind as root
 if a build is interrupted. (This is clearly user error; the build step
 should clean up after itself better when killed, or the insane use of root
 during build should be removed.)

 The consequence of this is that the next build fails because
 the build directory cannot be deleted; the error is
 rm: cannot remove `/home/buildbot/slave-
 state/ubu1204/foo/bar/build/src/xdir/bletch': Permission denied

 xdir and bletch are both owned by root.

 I'm configuring the source step like this:

         factory.addStep(Git(repourl=repourl, mode='full', submodules=True,
 method='copy', branch=sbranch, getDescription={'tags':True}))

 and what's failing is the very first thing in copy:
   def copy(self):
      cmd = buildstep.RemoteCommand('rmdir',...)

 I see that, at least on the slave side, there are some workarounds
 for bad permissions (in buildslave/commands/base.py, doClobber()
 will do a chmod first), but I don't think that is invoked here, and in any
 case, can't handle ownership problems.

 It might be nice if there were a "chownOnRemoveFailure" option
 on the git step that would pass a "withExtremePrejudice=true" parammeter
 to the remote rmdir.

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2711>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list