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] 76c3620c7e
[3] 0c151d7d7e
Closes-Bug: #2062573
Change-Id: Ia4784f59d16660e8d40c0e409f092ac4e46870b4
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] b6b9f043ff
[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
In case of Cinder store, when updating location of a legacy image,
we call cinder store to perform the update.
If the operation fails, we log a warning in glance which states:
"Not able to update location url <url> of legacy image due to unknown issues."
Since glance doesn't have knowledge about the actual issue occurred
during the location update, we log this ambiguous warning which is not
useful for operators to debug the actual issue.
The responsibility of logging the warning should be delegated to
glance store (like done here[1]) since it can point to the right
issue as it knows which operation failed exactly.
This patch removes the warning and further warnings should be added
to glance store only.
[1] https://review.opendev.org/c/openstack/glance_store/+/911005
Change-Id: I24b14812a2a15675beacee720d722c2f3a2b252b
- comments that did not match the parameter names have been corrected.
- parameter information included in parameters but remaining in comments has been deleted.
Change-Id: I6bbaaae697f1be560897c7d99234f1e23e710143
Signed-off-by: Youngjun <yj.yoo@okestro.com>
This is follow-up of 1e683483e7 and
replaces the generic Exception asserted in a unit tests by the specific
castellan exception, according to the 4.4.0 release.
This change does not bump minimum required version of castellan because
the version requirement only affects unit tests.
Depends-on: https://review.opendev.org/c/openstack/requirements/+/911059
Change-Id: Id1ed909f179038713d9da2fd72cf39e7fb7c8dfe
Made `centralized_db` cache driver as default driver so that we
can test it using tempest jobs in gate.
Implements blueprint centralized-cache-db
Depends-On: https://review.opendev.org/c/openstack/devstack/+/907110
Change-Id: Id94e93e3ba3fc207b39c7dbff92495805aa0f6f9
oslo.concurrency 6.0.0 has relocated the lock_path that is required
for external locks from [DEFAULT] to the [oslo_concurrency] config
section. Instead of messing with configuration, we can use the
lockutils.set_defaults() method to set this for tests. So add this
to the BaseTestCase so that it's available for all tests.
Change-Id: I2878b4162dddaf935002c168bc544eb1eff71efd
In cache migration unit tests, I was using same cache.db file name
in the setup method which was used by all the tests, which was
causing a issue of deleting a file by other test and resulted
in random failure.
Using random filename to fix this issue permenantly.
Related blueprint centralized-cache-db
Change-Id: I321982013bdf571741a8ef2d0575f65288fff53f
In castellan 4.4.0, we fixed the wrong exception MockKeyManager.get
raised in case the requested key does not exist. This change interferes
with the way one unit test case ensure a key is gone.
This replaces the asserted exception by generic Exception so that we
can unblock u-c bump now. We can later replace it by the specific and
correct exception (ManagedObjectNotFoundError) once castellan 4.4.0 is
pulled to u-c.
[1] 2cc410f56e7275d982bca95aa65cd11e22fc7c3c
Change-Id: I8cc1420e8b16ce0bc74314fd7b8aabf6e133abd8
Made provision to migrate existing cache records from
sqlite to centralized db and delete those from sqlite
after successful migration.
Implements blueprint centralized-cache-db
Change-Id: I2a840915bb6d9d72d6379cae09ebec0e51a4a6dd
Moved sqlite connection code in new module so that we can use
the same in migration phase. Once sqlite driver is removed then
we can remove this common module as well.
Related blueprint centralized-cache-db
Change-Id: Id34f9ae7a2639023c8b6a7937487e7af5c2dccad
Made provision to read gloabl glance-api.conf file by
cache-pruner, cache-cleaner command line utility tools
to make those compatible with centralized_db cache driver.
Related blueprint centralized-cache-db
Change-Id: I88d28dd086b6b57bedd9eda73534fa3e05dc8cc6
Added centralized_db driver for image cache which will use
centralized database for storing cache related information.
Related blueprint centralized-cache-db
Change-Id: Iafaaa86666176cc95f77d85a4ab77286f0042bdd
Added required database API methods for cache related
operations.
Related blueprint centralized-cache-db
Change-Id: Iae1f1927566f4bda74c5aeccf464df820cfae9d4
Added expand script and model to define `cached_images` and
`node_reference` database tables.
Related blueprint centralized-cache-db
Change-Id: I9991a4e945bd4d231e942096445fd5374ff7ff2a
Stream optimized VMDKs are also monolithic disks images, and start
with the same sparse extend header as normal monolithic sparse files,
so we can parse the virtual disk size in the same manner.
See "VMware Virtual Disks Virtual Disk Format 1.1" p. 17.
> Header and Footer
> The header and the footer are both described by the same SparseExtentHeader
> structure shown in Hosted Sparse Extent Header on page 8.
Closes-Bug: #2052291
Change-Id: I7d63951ff080dc699b8d11babc0a5998d90621e4
Co-Authored-By: Rajiv Mucheli <rajiv.mucheli@gmail.com>
The following options set in functional tests do not exist.
[DEFAULT] send_identity_credentials
[DEFAULT] send_identity_headers
Change-Id: Ia739af13e0f88d0861e453a4d54ecc626e32b34b