Differences between revisions 45 and 67 (spanning 22 versions)
Revision 45 as of 2007-03-17 14:38:39
Size: 3403
Editor: c-71-235-106-2
Comment:
Revision 67 as of 2018-05-05 00:04:24
Size: 5990
Comment: point to the build master config on github for PRs
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
||<tablestyle="border:0;background-color:#eeeeee;text-align:center;width:100%"> [http://www.python.org/dev/buildbot/all/ Here are the current BuildBot results.] ||
Line 4: Line 3:
There are several unstable tests and other issues. These are not problems with BuildBot, but rather are problems with Python and/or the environment it is built/run in.
hgui
||<tablestyle="border:1"> '''Platform''' || '''Version''' || '''Issue''' ||
|| Mac OS X 10.3 || 2.[45] || getaddrinfo configure check fails sometimes ||
|| cygwin || 2.5 || test_bsddb3 crashes interpreter (old version of BSD DB?), test_curses is skipped, test_logging, test_socketserver fail ||
|| OpenBSD (x86) || 2.4 || test_compare fails sometimes probably due to missing backport of fixes to test for negative address handling ||
|| Ubuntu (hppa) || 2.5 || test_fork1, test_wait[34] fail (crash) sometimes on hppa ||
|| Tru64 (alpha) || 2.[45] || test_signal fails (hangs) sometimes. The minimal set I was able to use to reproduce: test_thread test_audioop test_tcl test_ctypes test_runpy test_zipfile test_decimal test_fork1 test_signal ||
|| S/390 || 2.[45] || test_socket_ssl fails due to not being able to connect to gmail.org:995 (I don't think this is true any longer) ||
|| All || 2.[45] || Berkeley DB 3.2 is killed when running test_bsddb3, test_bsddb fails ||
|| All || 2.[45] || test_socket{,ssl,_server} fail if another test instance is running ||
'''[[http://buildbot.python.org/all/#/console/|Here are the current BuildBot results]]'''.
Line 16: Line 5:
Here's a list of currently unexplained test failures: We need to add more platforms (and compilers!) to the BuildBot farm. If you have one of these machines you are willing to run BuildBot on, please contact python-buildbots@python.org:
Line 18: Line 7:
   * None?

We need to add more platforms (and compilers!) to the BuildBot farm. If you have one of these machines you are willing to run BuildBot on, please contact python-dev@python.org:

   * Windows (and see BuildbotOnWindows)
   * Windows
Line 25: Line 10:
   * FreeBSD, NetBSD    * FreeBSD, NetBSD, OpenBSD
   * OS X
   * Solaris / !OpenSolaris / !OpenIndiana / Illumos
Line 29: Line 16:
== Installing a buildslave == To add a new buildbot or change the configuration of your existing one, send a pull request to the build master config found at https://github.com/python/buildmaster-config/blob/master/master/master.cfg.
Line 31: Line 18:
You need to fetch the latest [http://buildbot.sf.net buildbot source]. It requires Python and Twisted. == Installing a buildbot worker ==
Line 33: Line 20:
A buildslave also needs subversion, and it needs to be able to build Python. You need to install a recent version of [[http://buildbot.net/|Buildbot]]. If your OS has a packaging system (e.g. under Linux), it is probably available from the standard repositories. Otherwise, you'll have to build it from source (in which case you'll have to install Python and Twisted first).
Line 35: Line 22:
Unpack and install it. A buildbot worker also needs the git client and it needs to be able to build Python and some of its extension modules. It means you should have the standard development tools installed (compiler, linker), and the development headers for a couple of third-party libraries (such as zlib and OpenSSL).
Line 37: Line 24:
Create a new user "buildbot" (highly recommended) Once all this is done, create a new user "buildbot" if it doesn't exist (your package manager might have done it for you). Then:
Line 42: Line 29:
 % buildbot slave `pwd`/buildarea dinsdale.python.org:9020 slavename slavepasswd  % buildbot-worker create-worker buildarea buildbot.python.org:9020 workername workerpasswd
Line 45: Line 32:
You'll need to get someone to create the slavename/slavepasswd on dinsdale.python.org before doing this. Talk to someone like Martin, Anthony or Neal to do this.
Line 47: Line 33:
Then edit buildarea/info/admin and buildarea/info/host to set them appropriately. You'll need to get someone to create the workername/workerpasswd on buildbot.python.org before doing this. Ask on python-buildbots@python.org once you're ready.
Line 49: Line 35:
Finally, start buildbot with: Then edit buildarea/info/admin and buildarea/info/host to set them appropriately.

Use "crontab -e" (still under the 'buildbot' user) to ensure that the buildbot automatically starts on reboot (we must use restart instead of start, as start will fail if the server was shutdown abruptly, leaving the twistd.pid file on disk):
Line 52: Line 40:
 % buildbot start ~/buildarea  @reboot buildbot-worker restart /home/buildbot/buildarea
}}}

Finally, start buildbot (still under the 'buildbot' user) with:

{{{
 % buildbot-worker start ~/buildarea
Line 54: Line 48:

Once the buildbot is running, don't forget to monitor the [[http://www.python.org/dev/buildbot/|build results]] and solve any setup issues causing test failures.
Line 57: Line 53:
In order for the buildbot to operate properly, it needs access to various TCP ports on the internet. Below is a list of known ports and hosts. In order for the buildbot to operate properly, it needs access to various TCP ports on the internet. Below is a list of known ports and hosts; this list is not exhaustive and may evolve as new tests get written.
Line 60: Line 56:
|| 80 || python.org || test_urllibnet ||
|| 995 || gmail.org || test_socket_ssl ||
|| 50007 || localhost || test_socket ||
|| 50008 || (listen) || test_socket ||
|| 20, 21 || ftp.kernel.org, ftp.mirror.nl || test_urllib2net ||
|| 53 || your DNS server || test_socket (and others implicitly) ||
|| 80 || python.org || (several tests) ||
|| 119 || news.gmane.org || test_nntplib ||
|| 443 || (various) || test_ssl ||
|| 465 || smtp.gmail.com || test_smtpnet ||
Line 65: Line 63:
|| 9020 || localhost || test_logging will try up to 9120 ||
|| 54322 || localhost || test_asynchat ||

Many tests will also create local TCP sockets and connect to them (usually through "localhost" or "127.0.0.1"), so make sure this capability hasn't been disabled.


== Required Resources ==

Based on [2]_, the recommended resource allocations for a Python buildbot are at least:

  * 2 CPUs
  * 512 MB RAM
  * 30 GB free disk space

Note: the bigmem tests won't run in this configuration, since they require substantially more memory. However, these resources should be sufficient to ensure Python compiles correctly on the platform and can run the rest of test suite.

.. [2]: http://mail.python.org/pipermail/python-dev/2012-March/117978.html

== Buildbot Workers and Security ==

Here are some important points of which you should be aware when
running a buildbot worker [1]_:

1. Anyone setting up a buildbot worker should take care to invoke the build
   in an environment where an out-of-control buildbot worker, potentially
   executing arbitrarily horrible and/or malicious code, should not
   damage anything. Builders should always be isolated from valuable
   resources, although the specific mechanism of isolation may differ.
   A virtual machine is a good default, but may not be sufficient;
   other tools for cutting of the builder from the outside world would
   be chroot jails, solaris zones, etc.
2. Code runs differently as privileged vs. unprivileged users.
   Therefore builders should be set up in both configurations, running
   the full test suite, to ensure that all code runs as expected in
   both configurations. Some tests, as the start of `this thread
   <http://mail.python.org/pipermail/python-dev/2011-October/113935.html>`_
   indicates, must have some special logic to make sure they do or do
   not run, or run differently, in privileged vs. unprivileged
   configurations, but generally speaking most things should work in
   both places.
3. Access to root may provide access to slightly surprising resources,
   even within a VM (such as the ability to send spoofed IP packets,
   change the MAC address of even virtual ethernet cards, etc), and
   administrators should be aware that this is the case when
   configuring the host environment for a run-as-root builder. You
   don't want to end up with a compromised test VM that can snoop on
   your network.

The information above is a summary of a discussion that happened on python-dev regarding Buildbot security. No consensus came about, but the information is still helpful as a point of reference.

.. [1] See the related `python-dev thread <http://mail.python.org/pipermail/python-dev/2011-October/113935.html>`_.

This page contains general information about the Python BuildBot setup and issues.

Here are the current BuildBot results.

We need to add more platforms (and compilers!) to the BuildBot farm. If you have one of these machines you are willing to run BuildBot on, please contact python-buildbots@python.org:

  • Windows
  • AIX
  • HP-UX
  • FreeBSD, NetBSD, OpenBSD
  • OS X
  • Solaris / OpenSolaris / OpenIndiana / Illumos

It might also be beneficial to run on older versions of operating systems or others not mentioned above. Feel free to contact us if you would like to offer another type of system.

To add a new buildbot or change the configuration of your existing one, send a pull request to the build master config found at https://github.com/python/buildmaster-config/blob/master/master/master.cfg.

Installing a buildbot worker

You need to install a recent version of Buildbot. If your OS has a packaging system (e.g. under Linux), it is probably available from the standard repositories. Otherwise, you'll have to build it from source (in which case you'll have to install Python and Twisted first).

A buildbot worker also needs the git client and it needs to be able to build Python and some of its extension modules. It means you should have the standard development tools installed (compiler, linker), and the development headers for a couple of third-party libraries (such as zlib and OpenSSL).

Once all this is done, create a new user "buildbot" if it doesn't exist (your package manager might have done it for you). Then:

 % su - buildbot
 % mkdir buildarea
 % buildbot-worker create-worker buildarea buildbot.python.org:9020 workername workerpasswd

You'll need to get someone to create the workername/workerpasswd on buildbot.python.org before doing this. Ask on python-buildbots@python.org once you're ready.

Then edit buildarea/info/admin and buildarea/info/host to set them appropriately.

Use "crontab -e" (still under the 'buildbot' user) to ensure that the buildbot automatically starts on reboot (we must use restart instead of start, as start will fail if the server was shutdown abruptly, leaving the twistd.pid file on disk):

 @reboot buildbot-worker restart /home/buildbot/buildarea

Finally, start buildbot (still under the 'buildbot' user) with:

 % buildbot-worker start ~/buildarea

Once the buildbot is running, don't forget to monitor the build results and solve any setup issues causing test failures.

Required ports

In order for the buildbot to operate properly, it needs access to various TCP ports on the internet. Below is a list of known ports and hosts; this list is not exhaustive and may evolve as new tests get written.

Port

Host

Description

20, 21

ftp.kernel.org, ftp.mirror.nl

test_urllib2net

53

your DNS server

test_socket (and others implicitly)

80

python.org

(several tests)

119

news.gmane.org

test_nntplib

443

(various)

test_ssl

465

smtp.gmail.com

test_smtpnet

9020

python.org

Buildbot connection

Many tests will also create local TCP sockets and connect to them (usually through "localhost" or "127.0.0.1"), so make sure this capability hasn't been disabled.

Required Resources

Based on [2]_, the recommended resource allocations for a Python buildbot are at least:

  • 2 CPUs
  • 512 MB RAM
  • 30 GB free disk space

Note: the bigmem tests won't run in this configuration, since they require substantially more memory. However, these resources should be sufficient to ensure Python compiles correctly on the platform and can run the rest of test suite.

.. [2]: http://mail.python.org/pipermail/python-dev/2012-March/117978.html

Buildbot Workers and Security

Here are some important points of which you should be aware when running a buildbot worker [1]_:

1. Anyone setting up a buildbot worker should take care to invoke the build

  • in an environment where an out-of-control buildbot worker, potentially executing arbitrarily horrible and/or malicious code, should not damage anything. Builders should always be isolated from valuable resources, although the specific mechanism of isolation may differ. A virtual machine is a good default, but may not be sufficient; other tools for cutting of the builder from the outside world would be chroot jails, solaris zones, etc.

2. Code runs differently as privileged vs. unprivileged users.

  • Therefore builders should be set up in both configurations, running the full test suite, to ensure that all code runs as expected in both configurations. Some tests, as the start of `this thread

    <http://mail.python.org/pipermail/python-dev/2011-October/113935.html>`_ indicates, must have some special logic to make sure they do or do not run, or run differently, in privileged vs. unprivileged configurations, but generally speaking most things should work in both places.

3. Access to root may provide access to slightly surprising resources,

  • even within a VM (such as the ability to send spoofed IP packets, change the MAC address of even virtual ethernet cards, etc), and administrators should be aware that this is the case when configuring the host environment for a run-as-root builder. You don't want to end up with a compromised test VM that can snoop on your network.

The information above is a summary of a discussion that happened on python-dev regarding Buildbot security. No consensus came about, but the information is still helpful as a point of reference.

.. [1] See the related python-dev thread <http://mail.python.org/pipermail/python-dev/2011-October/113935.html>_.

BuildBot (last edited 2018-05-05 00:04:24 by GregoryPSmith)

Unable to edit the page? See the FrontPage for instructions.