wiki:dbDC3aSetup
Last modified 10 years ago Last modified on 01/06/2009 08:40:19 PM

Database Setup in DC3a

LSST Database

THIS IS A PROPOSAL, SUBJECT TO CHANGE

Summary:

  • Each run will have its own database (same as in DC2). Database name format: <userName>_DC3a_<run name or id> (different than in DC2).
  • Each user will have her/his own mysql account with password (in DC2 we used per-user accounts as well as shared accounts for tests and for production runs).
  • User runs will expire; expired runs will be purged to free up disk space. Default lifetime of user runs will be 2 weeks (production runs will never expire). To prevent a run from being purged, run owner will be able to extend run's lifetime (in 2 week intervals). 7 days and 3 days prior to run deletion a notification will be sent. There will be one "global" database (called GlobalDB) which will keep track of run expiration dates etc. (all this is new)

DC3a database setup

Global one-time initialization

  • Creates mysql accounts for each DC3a user.
  • Configures mysql permissions.
  • Creates the global database which is used to keep track of expiration date for each run.

This step requires mysql root access.

Per-run initialization

  • Loads database schema.
  • Loads stored functions/procedures.
  • Loads static SDQA definitions.
  • Initializes various pipeline-specific tables.
  • Registers the run in the global database.

This step require no special privileges - any user can run it.

Run maintenance

Deleting expired runs and sending out notifications will be handled by a script run once every 24 hours.

To extend run's lifetime, execute:

  mysql -u<userName> -p<pwd> GlobalDB -e "SELECT extendRun('<runName>', <dc version>, <userName>)"

It will set expiration dates = NOW + 2 weeks, so running it multiple times at the same time does not help.

To delete a run "by hand", use deleteRun.py script available from /DMS/cat/<...?>/scripts/.