Description of problem: It is not possible to convert a glance image with a file path, only url are enabled by default. Version-Release number of selected component (if applicable): 14 How reproducible: Always Steps to Reproduce: 1. 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' is not valid for this cloud. Valid values can be retrieved with import-info command. 2. glance import-info +----------------+----------------------------------------------------------------------------------+ | Property | Value | +----------------+----------------------------------------------------------------------------------+ | import-methods | {"type": "array", "description": "Import methods available.", "value": ["web- | | | download"]} | +----------------+----------------------------------------------------------------------------------+ 3. grep web-download /etc/glance/ -ri | grep -v '#' /etc/glance/glance-api.conf:enabled_import_methods = [web-download] Actual results: Not able to convert a glance image when using a file Expected results: able to convert a glance image when using a file Additional info: Need to enable it in glance config enabled_import_methods = [glance-direct,web-download] /var/lib/config-data/puppet-generated/glance_api/etc/glance/glance-api.conf This should be added in THT
Looks like GlanceEnabledImportMethods defaults to web-download We may want to add glance-direct as well or document it downstream so that users are aware.
Assigning to Pranali since she's back :) Is this serious enough to justify a backport to 16.1, 16, 15 and 13?
(In reply to Cyril Roelandt from comment #3) > Assigning to Pranali since she's back :) > > Is this serious enough to justify a backport to 16.1, 16, 15 and 13? to me, unless there are obscure reasons to avoid glance-direct, it seems just a matter of adding it to the default list in [1] so safe to backport maybe use "allowed_values" [2] to restrict the available values 1. https://github.com/openstack/tripleo-heat-templates/blob/master/deployment/glance/glance-api-container-puppet.yaml#L162 2. https://docs.openstack.org/heat/rocky/template_guide/hot_spec.html#allowed-values
GlanceEnabledImportMethods set the default value to 'web-download' and restrict Glance from using its 'glance-direct' import method because the 'glance-direct' method requires a special configuration when deployed in an HA environment. In the case of an HA setup if image import method is 'glance-direct', it requires a shared consistent staging location on the controller nodes otherwise it might happen that the image is uploaded to one node and triggering the import is executed on a different node - where the image does not exist. Hence when import method 'glance-direct' is needed, operators need to enable it explicitly with enabling NFS across the controller nodes to share the staging. Ex. By setting up below THT parameter via env file, parameter_defaults: GlanceEnabledImportMethods: web-download, glance-direct # NFS share to mount for image import staging # Type: string GlanceStagingNfsShare: '192.168.122.1:/export/glance-staging' And seems it is already documented here[1] https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/13/html/advanced_overcloud_customization/storage_configuration
The Doc Text does not specify that a shared staging location must be available. @Alex: is this something that should be added? @Greg: NFS would only be used for the staging area, not as an actual backend. I'm not sure whether CephFS could fill that role. Could you quote what Erno told you about this?
Hi @Cyril, sounds like it should be added. I am not all that familiar with glance - I am compiling the Release Notes, which rely on the 'Doc Text' field, and editing the 'Doc Text' for Red Hat style and consistency. So I will defer to your expertise on technical issues! If you would like to add anything to the 'Doc Text' field, please feel free to do so. Thanks!
@Alex: thanks, I updated the doc text.
Yes, the shared staging location will be supported in newly added Distributed Image Import feature. Marking this duplicate of #1712001 *** This bug has been marked as a duplicate of bug 1712001 ***
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days