Update glance multi-store import to use web-download

This is necessary because the documented example would not work in
an HA deployment without this change.

Also, switch how it is set from using *ExtraConfig to using
GlanceEnabledImportMethods.

Change-Id: Ie0f0098481d5337a460a2c90cd76fb996b14772b
This commit is contained in:
John Fulton 2020-05-07 06:55:36 -04:00
parent 7ef9de7557
commit 29b66565d8
1 changed files with 8 additions and 12 deletions

View File

@ -438,8 +438,7 @@ Override Glance defaults for dcn0
Create ``~/dcn0/glance.yaml`` with content like the following:: Create ``~/dcn0/glance.yaml`` with content like the following::
parameter_defaults: parameter_defaults:
DistributedComputeHCIExtraConfig: GlanceEnabledImportMethods: web-download,copy-image
glance::api::enabled_import_methods: 'glance-direct,web-download,copy-image'
GlanceBackend: rbd GlanceBackend: rbd
GlanceStoreDescription: 'dcn0 rbd glance store' GlanceStoreDescription: 'dcn0 rbd glance store'
GlanceMultistoreConfig: GlanceMultistoreConfig:
@ -449,9 +448,8 @@ Create ``~/dcn0/glance.yaml`` with content like the following::
CephClientUserName: 'external' CephClientUserName: 'external'
CephClusterName: central CephClusterName: central
The `DistributedComputeHCIExtraConfig` parameter is used to override The `GlanceEnabledImportMethods` parameter is used to override the
the Glance configuration's `enabled_import_methods` setting as default of 'web-download' to also include 'copy-image', which is
described in :doc:`node_config`. These additional import methods are
necessary to support the workflow described earlier. necessary to support the workflow described earlier.
By default Glance on the dcn0 node will use the RBD store of the By default Glance on the dcn0 node will use the RBD store of the
@ -635,8 +633,7 @@ Create ``~/control-plane/glance_update.yaml`` with content like the
following:: following::
parameter_defaults: parameter_defaults:
ControllerExtraConfig: GlanceEnabledImportMethods: web-download,copy-image
glance::api::enabled_import_methods: 'glance-direct,web-download,copy-image'
GlanceBackend: rbd GlanceBackend: rbd
GlanceStoreDescription: 'central rbd glance store' GlanceStoreDescription: 'central rbd glance store'
CephClusterName: central CephClusterName: central
@ -852,14 +849,13 @@ Confirm the expected stores are available:
| | store"}] | | | store"}] |
+----------+----------------------------------------------------------------------------------+ +----------+----------------------------------------------------------------------------------+
Assuming a qcow2 image like `cirros-0.4.0-x86_64-disk.img` is in the Create an image and import it into the default backend at central as
current directory, create an image and import it into the default well as the dcn0 backend, by listing both stores with the `--stores`
backend at central as well as the dcn0 backend, by listing both option, as seen in the following example:
stores in the `--stores` option, as seen in the following example:
.. code-block:: bash .. code-block:: bash
glance image-create-via-import --disk-format qcow2 --container-format bare --name cirros --file cirros-0.4.0-x86_64-disk.img --import-method glance-direct --stores default_backend,dcn0 glance --verbose image-create-via-import --disk-format qcow2 --container-format bare --name cirros --uri http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img --import-method web-download --stores default_backend,dcn0
.. note:: The `--disk-format` is set to qcow2 as that is the format of .. note:: The `--disk-format` is set to qcow2 as that is the format of
the image file. However, Glance will convert and store the the image file. However, Glance will convert and store the