cyborg-dbsync¶
Synopsis¶
cyborg-dbsync <command> [<args>]
Description¶
cyborg-dbsync is a tool for managing the Cyborg database schema and performing data migrations.
Options¶
The standard pattern for executing a cyborg-dbsync command is:
cyborg-dbsync <command> [<args>]
Run without arguments to see a list of available commands:
cyborg-dbsync
Commands are:
upgraderevisionstampversioncreate_schemaonline_data_migrations
Detailed descriptions are below.
cyborg-dbsync upgradeUpgrade the database schema to the latest version. Optionally, use
--revisionto specify an alembic revision string to upgrade to.cyborg-dbsync revisionCreate a new alembic revision. Use
-mor--messageto set the message string.cyborg-dbsync stampStamp the database with a specific alembic revision.
cyborg-dbsync versionPrint the current database version information and exit.
cyborg-dbsync create_schemaCreate the database schema.
cyborg-dbsync online_data_migrationsPerform online data migrations. Currently backfills the
project_idcolumn on existing accelerator requests (ARQs) by querying Nova for the project that owns each bound instance.This command should be run after upgrading Cyborg to ensure that all ARQs have a correct
project_idvalue. The cyborg-conductor service also runs this migration automatically on startup, but the CLI command allows operators to perform the migration at a convenient time and monitor progress.Prerequisites
Cyborg must be configured with a valid OpenStack SDK compute adapter (the
[nova]group: auth URL, credentials, and region) socyborg-dbsynccan call the Nova API to resolve instance ownership. This is independent of[keystone_authtoken], which only applies to validating incoming API requests to Cyborg.Nova must be running and accessible.
Return codes
The command prints the number of ARQs migrated and exits with code 0 on success.