18.2. Migrating From Pegasus <4.5 to Pegasus 4.5.X

Since Pegasus 4.5 all databases are managed by a single tool: pegasus-db-admin. Databases will be automatically updated when pegasus-plan is invoked, but it may require manually invocation of the pegasus-db-admin for other Pegasus tools.

The check command verifies if the database is compatible with the Pegasus' latest version. If the database is not compatible, it will print the following message:

$ pegasus-db-admin check
Your database is NOT compatible with version 4.5.0
    

If you are running the check command for the first time, the tool will prompt the following message:

Missing database tables or tables are not updated:
    dbversion
Run 'pegasus-db-admin update <path_to_database>' to create/update your database.
    

To update the database, run the following command:

$ pegasus-db-admin update
Your database has been updated.
Your database is compatible with Pegasus version: 4.5.0
    

The pegasus-db-admin tool can operate directly over a database URL, or can read configuration parameters from the properties file or a submit directory. In the later case, a database type should be provided to indicate which properties should be used to connect to the database. For example, the tool will seek for pegasus.catalog.replica.db.* properties to connect to the JDBCRC database; or seek for pegasus.catalog.master.url (or pegasus.dashboard.output, which is deprecated) property to connect to the MASTER database; or seek for the pegasus.catalog.workflow.url (or pegasus.monitord.output, which is deprecated) property to connect to the WORKFLOW database. If none of these properties are found, the tool will connect to the default database in the user's home directory (sqlite:///${HOME}/.pegasus/workflow.db).

Example: connection by providing the URL to the database:

$ pegasus-db-admin create sqlite:///${HOME}/.pegasus/workflow.db
$ pegasus-db-admin update sqlite:///${HOME}/.pegasus/workflow.db
    

Example: connection by providing a properties file that contains the information to connect to the database. Note that a database type (MASTER, WORKFLOW, or JDBCRC) should be provided:

$ pegasus-db-admin update -c pegasus.properties -t MASTER
$ pegasus-db-admin update -c pegasus.properties -t JDBCRC
$ pegasus-db-admin update -c pegasus.properties -t WORKFLOW
    

Example: connection by providing the path to the submit directory containning the braindump.txt file, where information to connect to the database can be extracted. Note that a database type (MASTER, WORKFLOW, or JDBCRC) should also be provided:

$ pegasus-db-admin update -s /path/to/submitdir -t WORKFLOW
$ pegasus-db-admin update -s /path/to/submitdir -t MASTER
$ pegasus-db-admin update -s /path/to/submitdir -t JDBCRC
    

Note that, if no URL is provided, the tool will create/use a SQLite database in the user's home directory: ${HOME}/.pegasus/workflow.db.

For complete description of pegasus-db-admin, see the man page.