This merely recognizes this format and always marks it as unsafe
because no service supports it. This prevents someone from uploading
one that we will ask qemu-img to inspect.
Change-Id: Ieea7b7eb0f380571bd4937cded920776e05f7ec4
This causes us to use the format inspector to pre-examine qcow and
vmdk files for safe configurations before even using qemu-img
on them.
Change-Id: I0554706368e573e11f649c09569f7c21cbc8634b
Closes-Bug: #2059809
This makes us check the extent filenames to make sure they don't
have any banned characters in them (i.e. slashes). It also makes
us reject VMDK files with a footer. Since we process these files
as a stream, we can't honor a footer that directs us to find the
descriptor block in a location we've already processed. Thus, if
a file indicates it has a footer, consider it a policy exception
and unsupported.
Change-Id: I4a1c6dff7854c49940a0ac7988722aa6befc04fa
This adds two properties to the QcowInspector that makes it able to
indicate whether the file specifies a backing_file or data_file in the
header. Both conditions are considered unsafe for our usage. To
ease checking of this condition, a classmethod is added that takes
a local filename and digests just enough of the file to assert that
both conditions are false.
Change-Id: Iaf86b525397d41bd116999cabe0954a0a7efac65
Related-Bug: #2059809
Recent changes does not allow image conversion to convert an image
having AMI disk format for image. Passing list of disk-formats to
each import job which will now use qcow2 as default disk-format to
create the image.
Change-Id: I712b304ebe168705ec2793626f5d64135ad6d458
While adding location to an image, cinder sends location url as
`cinder://volume_id` for single as well as multistore which is
incompatible with glance multistore and store throws
InvalidLoctation error.
Modifying the location url to be compatible with multistore as
`cinder://store_id/volume_id` to avoid Invalid Location error.
Related-Bug: #2054575
Change-Id: I5f791c58ae857f6c553276dd9808799c3db3aa4f
Based on:
tony@thor:~/src/opendev.org/openstack$ beagle --server https://codesearch.openstack.org search -f grep sqlparse | grep ^openstack | grep -v '/requirements'
openstack/glance:requirements.txt:10:sqlparse>=0.2.2 # BSD
openstack/kolla:docker/openstack-base/Dockerfile.j2:175:'sqlparse',
openstack/rpm-packaging:openstack/glance/glance.spec.j2:54:BuildRequires: {{ py3('sqlparse') }}
openstack/rpm-packaging:openstack/glance/glance.spec.j2:134:Requires: {{ py3('sqlparse') }}
openstack/rpm-packaging:openstack/keystone/keystone.spec.j2:47:BuildRequires: {{ py3('sqlparse') }}
It looks like sqlparse is no longer needed by glance. If we drop it
from glance, we can drop it altogether from OpenStack Requirements.
Change-Id: I113b4c75e0674657d0fe50af9721f67fd2ec386f
1. store-info --details and image-create apis fail with 500 if
swift configuration file is set in g-api.conf when muti-tenant
swift store is used. Fixed this by excluding the unregistered
conf parameter and added log warning.
2. Also, store-info --details fails with AttributeError, when
multitenant is enabled for swift store since it doesn not set
the container value during store configuration.
Fixed this by returing `None` incase of multitenant swift store.
Closes-Bug: #2061947
Change-Id: I6cbd11fd0ee5758169a2e0e9961660edb844e65f
glance-cache-preftecher utility was failing because it was not
setting global threadpool model while initilizing the tool.
Closes-Bug: #2065087
Change-Id: I0c09dd7c0d81178ebf2aa5efd19c54866fc8791b
pysendfile[1] was added as an optional dependency but the library
hasn't been maintained and has got no release since 2014.
What is worse, the sendfile implementation is not actually working
since The SendFileIterator class was removed[2]. (Follow-up[3] removed
the remaining reference to the class). The broken implementation has
not been detected because the client is not currently used to upload
contents.
Remove the incomplete implementation to get rid of the dependency on
the unmaintained library.
[1] https://pypi.org/project/pysendfile/
[2] 76c3620c7effb15be577450c276db1e394c2de3e
[3] 0c151d7d7ea00627fad182898958db55b1fef3fd
Closes-Bug: #2062573
Change-Id: Ia4784f59d16660e8d40c0e409f092ac4e46870b4
This is not really actively maintained and is duplicate of the one
available in openstack-manuals.
Change-Id: I6617397585e49501a20e758877c4071a1f3b9d84
The previous attempt[1] was incomplete and these was still one usage
left. The deprecated alias was removed from oslo.db[2] and no longer
works.
[1] b6b9f043ffe664c643456912148648ecc0d6c9b4
[2] bf90aed0f7b19441644de2be807ec680ad86b1b1
Change-Id: Ib3b0271057578a64ae556a11224e3b366ddf89bf
The run_sql_cmd method in functional tests is not used. The method uses
Engine.execute() method which was removed in 2.0.
Change-Id: I6f9ea1dfd852a2d311e17964da0ea56c052b3fda