plague 0.4

Dan Williams dcbw at redhat.com
Mon Oct 10 15:10:56 UTC 2005


On Mon, 2005-10-10 at 10:00 -0400, seth vidal wrote:
> On Mon, 2005-10-10 at 09:51 -0400, Dan Williams wrote:
> > Seth: Jeremy thought you'd be quite averse to using Postgres...  Not
> > sure what your feelings here really are.  I've noticed quite a big
> > improvement by switching to Postgres when rebuilding an entire distro,
> > namely in the buildsystem not falling over due to database contention.
> 
> I'm averse to all change. Everyone knows that. From where will the
> postgres database need to be accessed? There shouldn't be any reason I
> can think of why anything outside of the local machine would need access
> to the db. 

Correct, only the machine running the plague server needs access to the
database.  So of course that can be either user-level access (ie, only
'root' can access the job database since that's what the server runs as)
or host-level access (ie, only 127.0.0.1 can access the job database).

> Does plague make the databases/tables on the fly? I'm curious how much
> other infrastructure, backups and maintenance will be required for the
> postgres system, mostly.

Yes, same as before.  As long as you've at least created the database
(using something like postgres 'createdb' utility) then plague will take
care of setting up the tables automatically, as with SQLite.

Postgres install would go like this:

1) yum install postgresql postgresql-server postgresql-python
2) Modify your /var/lib/pgsql/data/pg_hba.conf file to allow local users
to connect from 127.0.0.1, mapping local username to database username.
Note that this lets any local user connect, so DB permissions have to
reject modification attempts from users other than 'root' and the
Postgres admin user.  Obviously permissions can be tightened, exercise
for the reader, blah blah blah.

# Allow IPv4 local connections:
host    all         all         127.0.0.1/32          trust sameuser

3) sudo -u postgres createdb fe-build-db
4) sudo -u postgres createuser --no-adduser --no-createdb root
5) /sbin/service postgresql start
6) Modify your /etc/plague/server/plague-server.cfg file:

[Database]
engine = pgdb

[pgdb Engine]
host = localhost
database = fe-build-db
user = root
password =

7) start plague.  It will yell if something is wrong.

I wouldn't think we'd need backups that much right now.  The DB is
pretty much just a history of what people built what where.  It's not
that bad if the buildsystem starts fresh when it comes back after its
machine melts down.  Maintenance is essentially making sure that the
postgresql service starts up before plague does.  If postgres goes down,
things need to be kicked all around like happens now when the sqlite db
locks.

Note that sqlite is still required for the User DB.  Since that's not
really modified all that often, its quite acceptable for it to still be
an sqlite database since we won't run into locking issues there.  At
least, we haven't yet.

Dan





More information about the Fedora-buildsys-list mailing list