2017-03-03 16:34:27 -05:00
|
|
|
=============
|
|
|
|
glance-manage
|
|
|
|
=============
|
|
|
|
|
|
|
|
-------------------------
|
|
|
|
Glance Management Utility
|
|
|
|
-------------------------
|
|
|
|
|
2017-06-15 14:20:53 -04:00
|
|
|
.. include:: header.txt
|
2017-03-03 16:34:27 -05:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
========
|
|
|
|
|
2018-03-02 12:11:35 +01:00
|
|
|
::
|
|
|
|
|
2017-03-03 16:34:27 -05:00
|
|
|
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
|
|
|
|
========
|
|
|
|
|
2018-03-02 12:11:35 +01:00
|
|
|
``db``
|
|
|
|
This is the prefix for the commands below when used with a space
|
|
|
|
rather than a _. For example "db version".
|
2017-03-03 16:34:27 -05:00
|
|
|
|
2018-03-02 12:11:35 +01:00
|
|
|
``db_version``
|
|
|
|
This will print the current migration level of a glance database.
|
2017-03-03 16:34:27 -05:00
|
|
|
|
2018-03-02 12:11:35 +01:00
|
|
|
``db_upgrade [VERSION]``
|
|
|
|
This will take an existing database and upgrade it to the
|
|
|
|
specified VERSION.
|
2017-03-03 16:34:27 -05:00
|
|
|
|
2018-03-02 12:11:35 +01:00
|
|
|
``db_version_control``
|
|
|
|
Place the database under migration control.
|
2017-03-03 16:34:27 -05:00
|
|
|
|
2018-03-02 12:11:35 +01:00
|
|
|
``db_sync [VERSION]``
|
|
|
|
Place an existing database under migration control and upgrade it to
|
|
|
|
the specified VERSION.
|
2017-03-03 16:34:27 -05:00
|
|
|
|
2018-03-02 12:11:35 +01:00
|
|
|
``db_expand``
|
|
|
|
Run this command to expand the database as the first step of a rolling
|
|
|
|
upgrade process.
|
2017-03-03 16:34:27 -05:00
|
|
|
|
2018-03-02 12:11:35 +01:00
|
|
|
``db_migrate``
|
|
|
|
Run this command to migrate the database as the second step of a
|
|
|
|
rolling upgrade process.
|
2017-03-03 16:34:27 -05:00
|
|
|
|
2018-03-02 12:11:35 +01:00
|
|
|
``db_contract``
|
|
|
|
Run this command to contract the database as the last step of a rolling
|
|
|
|
upgrade process.
|
2017-03-03 16:34:27 -05:00
|
|
|
|
2018-03-02 12:11:35 +01:00
|
|
|
``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.``
|
2017-03-03 16:34:27 -05:00
|
|
|
|
2018-03-02 12:11:35 +01:00
|
|
|
``db_load_metadefs [PATH]``
|
|
|
|
Load the metadata definitions into glance database. By default the
|
|
|
|
definitions are imported from /etc/glance/metadefs directory.
|
2017-03-03 16:34:27 -05:00
|
|
|
|
2018-03-02 12:11:35 +01:00
|
|
|
``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.
|
2017-03-03 16:34:27 -05:00
|
|
|
|
2017-02-01 11:48:30 +01:00
|
|
|
``db_purge``
|
|
|
|
Purge deleted rows older than a given age from glance db tables.
|
|
|
|
|
|
|
|
This command interprets the following options when it is invoked:
|
|
|
|
|
|
|
|
--max_rows Purge deleted rows older than age in days (default
|
|
|
|
value if not specified: 100)
|
|
|
|
--age_in_days Limit number of records to delete (default value if
|
|
|
|
not specified: 30 days)
|
|
|
|
|
|
|
|
WARNING: This function is useful primarily in test systems. We do not
|
|
|
|
recommend its use in production systems unless you have reviewed
|
|
|
|
OpenStack Security Note `OSSN-0075`_ and understand the risk involved.
|
|
|
|
|
|
|
|
.. _`OSSN-0075`: https://wiki.openstack.org/wiki/OSSN/OSSN-0075
|
|
|
|
|
|
|
|
``db_purge_images_table``
|
|
|
|
Purge deleted rows older than a given age from images db tables.
|
|
|
|
|
|
|
|
This command interprets the following options when it is invoked:
|
|
|
|
|
|
|
|
--max_rows Purge deleted rows older than age in days (default
|
|
|
|
value if not specified: 100)
|
|
|
|
--age_in_days Limit number of records to delete (default value if
|
|
|
|
not specified: 30 days)
|
|
|
|
|
|
|
|
WARNING: This function is useful primarily in test systems. We do not
|
|
|
|
recommend its use in production systems unless you have reviewed
|
|
|
|
OpenStack Security Note `OSSN-0075`_ and understand the risk involved.
|
|
|
|
|
|
|
|
.. _`OSSN-0075`: https://wiki.openstack.org/wiki/OSSN/OSSN-0075
|
|
|
|
|
2017-03-03 16:34:27 -05:00
|
|
|
OPTIONS
|
|
|
|
=======
|
|
|
|
|
2018-03-02 12:11:35 +01:00
|
|
|
**General Options**
|
2017-03-03 16:34:27 -05:00
|
|
|
|
2018-03-02 12:11:35 +01:00
|
|
|
.. include:: general_options.txt
|
2017-03-03 16:34:27 -05:00
|
|
|
|
2017-06-15 14:20:53 -04:00
|
|
|
.. include:: footer.txt
|
2017-03-03 16:34:27 -05:00
|
|
|
|
|
|
|
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
|
2020-02-13 12:30:50 +00:00
|
|
|
``glance-api.conf``.
|