glance/doc/source/man/glancemanage.rst
Alexander Bashmakov 9968b0993f Added overwrite warning for db_export_metadefs.
The bug in [1] proposed to always require a directory option for
glance-manage db_export_metadefs command. The rationale being that
silently overwriting the default path /etc/glance/metadefs can
be undesired. However, the feedback was that this command should
stay silent in case it's called from cron jobs or automated tasks,
and that it's better to simply log a warning and proceed, as well
as update the documentation with a cautionary note. This patch
addresses that request.

[1] https://bugs.launchpad.net/glance/+bug/1367011

Change-Id: Ie8cc4bb3769a6347fd25e2235a72c6358af70d42
Closes-Bug: #1367011
2016-11-08 16:46:49 +00:00

2.6 KiB

glance-manage

Glance Management Utility

Author

glance@lists.launchpad.net

Date

2016-10-6

Copyright

OpenStack Foundation

Version

13.0.0

Manual section

1

Manual group

cloud computing

SYNOPSIS

glance-manage [options]

DESCRIPTION

glance-manage is a utility for managing and configuring a Glance installation. One important use of glance-manage is to setup the database. To do this run:

glance-manage db_sync

Note: glance-manage commands can be run either like this:

glance-manage db sync

or with the db commands concatenated, like this:

glance-manage db_sync

COMMANDS

db

This is the prefix for the commands below when used with a space rather than a _. For example "db version".

db_version

This will print the current migration level of a glance database.

db_upgrade <VERSION>

This will take an existing database and upgrade it to the specified VERSION.

db_version_control

Place the database under migration control.

db_sync <VERSION> <CURRENT_VERSION>

Place a database under migration control and upgrade, creating it first if necessary.

db_export_metadefs [PATH | PREFIX]

Export the metadata definitions into json format. By default the definitions are exported to /etc/glance/metadefs directory. Note: this command will overwrite existing files in the supplied or default path.

db_load_metadefs [PATH]

Load the metadata definitions into glance database. By default the definitions are imported from /etc/glance/metadefs directory.

db_unload_metadefs

Unload the metadata definitions. Clears the contents of all the glance db tables including metadef_namespace_resource_types, metadef_tags, metadef_objects, metadef_resource_types, metadef_namespaces and metadef_properties.

OPTIONS

General Options

--sql_connection=CONN_STRING

A proper SQLAlchemy connection string as described here

CONFIGURATION

The following paths are searched for a glance-manage.conf file in the following order:

  • ~/.glance
  • ~/
  • /etc/glance
  • /etc

All options set in glance-manage.conf override those set in glance-registry.conf and glance-api.conf.