Skip to content

Commit

Permalink
Adding better docs for multi-master mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris AtLee committed Aug 11, 2010
1 parent 163f459 commit 2338c5c
Showing 1 changed file with 53 additions and 10 deletions.
63 changes: 53 additions & 10 deletions master/docs/cfg-global.texinfo
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ The keys in this section affect the operations of the buildmaster globally.

@menu
* Database Specification::
* Multi-master mode::
* Project Definitions::
* Log Handling::
* Data Lifetime::
Expand Down Expand Up @@ -32,16 +33,6 @@ c['db_url'] = "sqlite:///state.sqlite"
c['db_url'] = "mysql://user:pass@@somehost.com/database_name?max_idle=300"
@end example

When using a MySQL database, multiple buildbot masters can share the same
database. Keep in mind that there is a single namespace for schedulers and
builders for all masters using the same database. One suggested configuration
is to have one buildbot master configured with just the schedulers and change
sources, and then other masters configured with just the builders. To enable
this mode, you will need to set the @code{multiMaster} option so that buildbot
doesn't complain about missing schedulers or builders. You'll also need to set
@code{db_poll_interval} so the masters with builders check the database for new
builds at the configured interval.

The @code{max_idle} argument for MySQL connections should be set to something
less than the wait_timeout configured for your server. This ensures that
connections are closed and re-opened after the configured amount of idle time.
Expand All @@ -50,6 +41,58 @@ If you see errors such as @code{_mysql_exceptions.OperationalError: (2006,
probably too high. @code{show global variables like 'wait_timeout';} will show
what the currently configured wait_timeout is on your MySQL server.

@node Multi-master mode
@subsection Multi-master mode

Normally buildbot operates using a single master process that uses the
configured database to save state.

It is possible to configure buildbot to have multiple master processes that
share state in the same database. This has been well tested using a MySQL
database. There are several benefits of Multi-master mode:
@itemize @bullet
@item You can have large numbers of build slaves handling the same queue of
build requests. There is a finite limit to the number of slaves you

This comment has been minimized.

Copy link
@dabrahams

dabrahams Feb 24, 2011

Contributor

What is that limit? I should be able to get an idea from reading these docs whether the application of BB I'm considering might need multi-master mode.

This comment has been minimized.

Copy link
@djmitche

djmitche Feb 25, 2011

Member

I'm happy to work through some of your comments here and see if I can improve the docs, but it's an interesting approach you're taking - are you scanning through all of the commits to master/docs in series? This commit is over six months old, and quite possibly has been rewritten since then.

It might make more sense for you to go through the docs in a single, much more recent revision, perhaps https://github.com/buildbot/buildbot/tree/8f07867397eac2d9e98bbc7bb5c6fbdf51452398/master/docs

Any comments you make there will be easier to integrate, and also reflect your feedback on the most recent revision.

To answer your particular question - this was badly phrased. There is no numeric limit I can give you - it's based on number of slaves, system IO capabilities, the rate at which they are producing log data, and so on.

This comment has been minimized.

Copy link
@djmitche

djmitche Feb 25, 2011

Member

I just noticed that github does not display those files as editable. If you'd like to simply quote the relevant snippets and send a text file full of annotations, that would be a reasonable solution too.

This comment has been minimized.

Copy link
@dabrahams

dabrahams Feb 25, 2011

Contributor

I'll find another way. However, I am commenting on the latest material; I just have to do a "git blame" to reach it because GitHub hasn't figured out how to implement comments on files. :(

This comment has been minimized.

Copy link
@dabrahams

dabrahams Feb 25, 2011

Contributor

They just fixed editability, FWIW. However, of course, I can't edit your repo.

This comment has been minimized.

Copy link
@djmitche

djmitche Feb 27, 2011

Member

Yeah, sorry about that - I didn't realize that files weren't editable.

Maybe the best option is to simply download a copy of the source and annotate it with your comments, then send it to me? I can use a diff to find your comments and try to address them, and can simply accept any other edits you make.

This comment has been minimized.

Copy link
@djmitche

djmitche Feb 27, 2011

Member

Another option is for you to fork the repository and then edit your own copy via the web interface, and let me know when you're happy with the result. Then I can pull the changes and merge them into Buildbot proper.

can attach to a single master process. By adding another master
which shares the queue of build requests, you can attach more slaves
to this additional master, and increase your build throughput.
@item You can shut one master down to do maintenance, and other masters
will continue to do builds.
@end itemize

State that is shared in the database includes:
@itemize @bullet
@item List of changes
@item Scheduler names and internal state
@item Build requests, including the builder name
@end itemize

Because of this shared state, you are strongly encouraged to:
@itemize @bullet
@item Ensure that change branches correspond to exactly the schedulers you
have configured on those branches. All schedulers on all masters

This comment has been minimized.

Copy link
@dabrahams

dabrahams Feb 25, 2011

Contributor

I do not understand that sentence at all. What kind of correspondence do you have in mind? What would an inexact correspondence look like?

will see all new changes, regardless of which master initially
submitted the change.

@item Ensure scheduler names are unique, and only run one instance of a
scheduler for each set of masters connecting to one database.

This comment has been minimized.

Copy link
@dabrahams

dabrahams Feb 25, 2011

Contributor

Does "one instance of a scheduler" mean "one instance of a given scheduler subclass" or simply "one scheduler?"


@item Ensure builder names are unique for a given build factory implementation.
You can have the same builder name configured on many masters, but if the
build factories differ, you will get different results depending on which
master claims the build.
@end itemize

One suggested configuration is to have one buildbot master configured with
just the scheduler and change sources; and then other masters configured
with just the builders.

To enable multi-master mode in this configuration, you will need to set the
@code{multiMaster} option so that buildbot doesn't warn about missing
schedulers or builders. You will also need to set @code{db_poll_interval}
to the masters with only builders check the database for new build requests
at the configured interval.

@example
# Enable multiMaster mode; disables warnings about unknown builders and
# schedulers
Expand Down

0 comments on commit 2338c5c

Please sign in to comment.