[Buildbot-commits] [Buildbot] #2260: 'builddir' path is used on both master and slave

Buildbot trac trac at buildbot.net
Tue Jan 14 06:37:17 UTC 2014


#2260: 'builddir' path is used on both master and slave
-------------------+-------------------------
Reporter:  ayust   |       Owner:
    Type:  defect  |      Status:  closed
Priority:  minor   |   Milestone:  0.9.0
 Version:  master  |  Resolution:  worksforme
Keywords:          |
-------------------+-------------------------
Changes (by dustin):

 * status:  new => closed
 * resolution:   => worksforme


Old description:

> So as it turns out, a given builder's `builddir` property is actually
> used for two different things:
>
>  * On the slave, it's the path to the directory which contains the
> builder data (sourcestamp, etc) and workdir
>  * On the master, it's the path to the directory which contains the saved
> build results
>
> For relative paths, this works "ok" most of the time - on the master,
> it's relative to the master's root directory (which is unique-per-
> master), and on the slave, it's relative to the slave's root directory
> (which is fine, because it's unique-per-slave, and slaves are currently
> unique-per-master).
>
> Problems arise, however, if one of the following is true:
>
>  * two different buildbot (masters/slaves) are running on the same
> machine, and an '''absolute''' path is used
>  * two builders have the same builddir, even if they're on different
> slaves
>
> Because the builddir path is also used on the master for storing results
> files, this introduces a potential conflict between paths for multiple
> builders (potentially even across different masters, in the case of
> absolute paths) which can result in race conditions and/or combination of
> data from different builds.
>

> At a bare minimum, Builder should be changed to have ''separate'' path
> settings for the master-side data storage and the slave-side build
> directory.

New description:

 So as it turns out, a given builder's `builddir` property is actually used
 for two different things:

  * On the slave, it's the path to the directory which contains the builder
 data (sourcestamp, etc) and workdir
  * On the master, it's the path to the directory which contains the saved
 build results

 For relative paths, this works "ok" most of the time - on the master, it's
 relative to the master's root directory (which is unique-per-master), and
 on the slave, it's relative to the slave's root directory (which is fine,
 because it's unique-per-slave, and slaves are currently unique-per-
 master).

 Problems arise, however, if one of the following is true:

  * two different buildbot (masters/slaves) are running on the same
 machine, and an '''absolute''' path is used
  * two builders have the same builddir, even if they're on different
 slaves

 Because the builddir path is also used on the master for storing results
 files, this introduces a potential conflict between paths for multiple
 builders (potentially even across different masters, in the case of
 absolute paths) which can result in race conditions and/or combination of
 data from different builds.


 At a bare minimum, Builder should be changed to have ''separate'' path
 settings for the master-side data storage and the slave-side build
 directory.

--

Comment:

 There's nothing to do in nine -- the master won't store anything in its
 builddir.  It won't even have one.

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2260#comment:7>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list