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
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
sqlite cache driver and related configuration options will be
deprecated from this cycle.
Related blueprint centralized-cache-db
Change-Id: I0c1affff05a2a4c2838cfad2b637e7660b056eef
The oslo.limit 2.3.0 release contains the validation to ensure
the [oslo_limit] endpoint_id option is set[1]. This fixes the test
failures caused by that validation by overriding the option in all
test cases where unified quota implementation is used.
[1] https://review.opendev.org/c/openstack/oslo.limit/+/897509
Closes-Bug: #2049064
Change-Id: I704393892799ee0d5edf45fabe07afe01473e38d