[Labs-l] Accessing the databases from labs - A comparison with the toolserver
Platonides
platonides at gmail.com
Fri Jul 12 15:13:41 UTC 2013
This is a summary of my experience using the replicated databases in
labs for the first time,
as well as the (unneeded?) differences breaking the code prepared for
doing that on the toolserver.
There was no sql(1) [now fixed]
On the toolserver, there is the toolserver table with the full list of
databases. No such table
exists on labs. sql(1) has a reference to /usr/share/dblist, but it
doesn't exist.
On the toolserver, the server names were
projectname-p.rrdb.toolserver.org (or userdb instead of rrdb).
On labs it is simply projectname.labsdb
On the toolserver there were sql-sX-rr.toolserver.org (or
sql-sX-user.toolserver.org, X = cluster name).
On labs, there is only an undocumented name sX.labsdb
On the toolserver, the matchings of database → cluster were available in
toolserver table. There's no
such list on labs (no, scrapping /etc/hosts is not acceptable).
On the toolserver, user databases have the format u_$USER or
u_$USER_something (replace u_ with p_ for
MMP). On labs, the format is $CREDENTIALS__ (no, $CREDENTIALS is not
your username, but something like
`u1234' or `p50380g458341')
The approach taken in labs is mostly equivalent (sometimes inferior) to
the one of toolserver, but
incompatible. Which only complicates developers for transitions.
So, I would suggest/encourage:
- A toolserver table, available on all database servers.
- sql-sX-rr.labsdb and sql-sX-userdb.labsdb "dns" entries. I would need
to detect in my tools if it should
append .toolserver.org or .labsdb (is there a supported way of detecting
that you are running on tool labs?)
But that step seems reasonable. (BTW, What about adding labsdb to
resolv.conf(5) search?)
- Database names compatible with those of the toolserver. References to
the dbs are sometimes spread on
the codebase, and migrating shouldn't require a hunt for them if it's
avoidable.
- dns names like project-p.labsdb for compatibility with TS tools?
Perhaps *.(rr|user)db.toolserver.org
should be aliased to .labsdb
- Marking the global dbs in that toolserver table would also be nice.
Misc:
- How to detect if you are running in labs? (for dual tools)
1- https://wiki.toolserver.org/view/Toolserver_database
More information about the Labs-l
mailing list