Commit Graph

5085 Commits

Author SHA1 Message Date
Zuul b8375913bf Merge "Replace remaining usage of [DEFAULT] sql_connection" 2024-04-19 05:27:57 +00:00
Takashi Kajinami b38a567ad4 Replace remaining usage of [DEFAULT] sql_connection
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
2024-04-18 16:51:40 +00:00
Takashi Kajinami 835e7f36a5 Remove unused run_sql_cmd
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
2024-04-15 11:54:16 +09:00
Michal Arbet 309ca3aec2 Fix glance-api if cache is disabled
This patch fixes glance when cache is disabled.

Change-Id: I3c3560ba9c87c7098d75173a095642bdd1d7c687
2024-03-08 10:36:11 +01:00
Zuul bc2b5326fa Merge "Require more specific exception" 2024-03-07 09:36:31 +00:00
Takashi Kajinami 211fdbab28 Require more specific exception
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
2024-03-06 03:20:39 +00:00
Abhishek Kekane 9b9111f819 Make `centralized_db` cache driver default
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
2024-03-05 19:35:20 +00:00
Zuul cd881124ca Merge "Prepare for castellan 4.4.0" 2024-03-04 14:23:16 +00:00
Zuul 6a53883b57 Merge "Deprecate the "glance-cache-manage" command" 2024-03-01 18:35:35 +00:00
Zuul a6b74262a6 Merge "[minor] Fix doc string for class" 2024-03-01 15:21:49 +00:00
Brian Rosmaita 9df586a5fe Set a lock_path for tests
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
2024-02-29 16:44:40 -05:00
Abhishek Kekane 5bf2f4e7a0 Fix flaky test related to cache migration
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
2024-02-29 12:35:00 -08:00
Zuul 2190d648e7 Merge "Migrate from SQLite to Centralized db" 2024-02-28 16:33:32 +00:00
Zuul 0277b24427 Merge "Move sqlite code in common module" 2024-02-28 06:59:06 +00:00
Zuul 6cd955078f Merge "Deprecate glance scrubber" 2024-02-28 05:13:38 +00:00
Takashi Kajinami 1e683483e7 Prepare for castellan 4.4.0
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
2024-02-28 11:28:48 +09:00
Zuul acd729bbb2 Merge "Read global config file for cache utilities" 2024-02-27 21:57:36 +00:00
Zuul 8651aefa23 Merge "Introduce centralized database driver for image cache" 2024-02-27 21:57:34 +00:00
Abhishek Kekane 781ce28560 Migrate from SQLite to Centralized db
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
2024-02-27 18:16:04 +00:00
Abhishek Kekane 591f479442 [minor] Fix doc string for class
Change-Id: I15b19dbbc77e211dff78bb9ba5e7c7210b08a529
2024-02-27 17:28:48 +00:00
Zuul 7b40c33cb6 Merge "Add required database API(s) for cache" 2024-02-27 14:59:26 +00:00
Brian Rosmaita b059afbe2c Deprecate glance scrubber
Deprecate the glance scrubber utility and its associated
configuration options for removal during the 2024.2 (Dalmatian)
development cycle.

Removal of the scrubber was proposed on the mailing list on
2024-02-01:

https://lists.openstack.org/archives/list/openstack-discuss@lists.openstack.org/thread/33F37CL4NUE3QI6GYBWG5BL5UNBK4L5U/

No objections were raised.

Change-Id: I82d9e7bf3f1f582030ac7729d729a746784c668f
2024-02-26 22:02:24 -05:00
Abhishek Kekane 21333c1ac8 Move sqlite code in common module
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
2024-02-20 19:52:39 +00:00
Abhishek Kekane 9c7820740a Read global config file for cache utilities
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
2024-02-20 19:51:52 +00:00
Zuul 02be49c998 Merge "Add new tables for cache operations" 2024-02-19 20:35:01 +00:00
Zuul 2fa64aea03 Merge "Support Stream Optimized VMDKs" 2024-02-16 21:47:31 +00:00
Abhishek Kekane 0bbaec2eeb Introduce centralized database driver for image cache
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
2024-02-16 16:38:06 +00:00
Zuul 06cc1782e1 Merge "Deprecate the "location_strategy" option" 2024-02-15 20:32:04 +00:00
Cyril Roelandt bd70adf049 Deprecate the "location_strategy" option
Change-Id: Ied8c4366eb1cc2ebf83a96bd824631a4d8af3a00
2024-02-15 17:17:39 +01:00
Zuul e31022bf9d Merge "Drop ineffective options from config file" 2024-02-15 15:17:20 +00:00
Abhishek Kekane 10d663d04d Add required database API(s) for cache
Added required database API methods for cache related
operations.

Related blueprint centralized-cache-db

Change-Id: Iae1f1927566f4bda74c5aeccf464df820cfae9d4
2024-02-15 14:35:05 +00:00
Zuul 7fd459fef2 Merge "Deprecate sqlite cache driver" 2024-02-14 10:16:06 +00:00
Abhishek Kekane b6bd03d4bc Add new tables for cache operations
Added expand script and model to define `cached_images` and
`node_reference` database tables.

Related blueprint centralized-cache-db

Change-Id: I9991a4e945bd4d231e942096445fd5374ff7ff2a
2024-02-09 08:40:46 +00:00
Fabian Wiesel 5e7e6bfb80 Support Stream Optimized VMDKs
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>
2024-02-05 12:06:30 +01:00
Takashi Kajinami 1e99767d0e Drop ineffective options from config file
The following options set in functional tests do not exist.
 [DEFAULT] send_identity_credentials
 [DEFAULT] send_identity_headers

Change-Id: Ia739af13e0f88d0861e453a4d54ecc626e32b34b
2024-01-31 01:16:12 +00:00
Takashi Kajinami 9f896ab03d Bump hacking
hacking 3.0.x is too old.

Change-Id: I33875c36dbbdb946841f8c583636ccdf88d3331f
2024-01-27 16:55:11 +00:00
Takashi Kajinami b6b9f043ff Replace usage of deprecated [DATABASE] sql_connection
This option was deprecated in oslo.db a long ago and was removed in
master.

Change-Id: Iba6aa00e4f86fc4b82fa354fddf2fc7d6b47c52f
2024-01-28 01:06:30 +09:00
Cyril Roelandt 71e3c036d7 Deprecate the "glance-cache-manage" command
Change-Id: I5fe40f1ebd6acd25d4ed2e05d20a409511be08af
2024-01-23 17:55:12 +01:00
Abhishek Kekane 6708fa60e9 Deprecate sqlite cache driver
sqlite cache driver and related configuration options will be
deprecated from this cycle.

Related blueprint centralized-cache-db

Change-Id: I0c1affff05a2a4c2838cfad2b637e7660b056eef
2024-01-16 03:51:20 +00:00
Takashi Kajinami 5378396b84 Fix test failures with oslo.limit 2.3.0
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
2024-01-12 00:20:42 +09:00
Zuul 41fa8223b7 Merge "Add Packed Virtqueue extra spec and image properties" 2023-12-21 16:00:25 +00:00
Zuul 061e2fb4ee Merge "Deprecate Windows OS support" 2023-12-07 17:21:47 +00:00
Danylo Vodopianov 66566c3286 Add Packed Virtqueue extra spec and image properties
Virtqueue feature was added to the metadata properties for flavor and
images

- Add the hw:virtio_packed_ring flavor extra spec and corresponding
  hw_virtio_packed_ring image property.

Nova spec: https://review.opendev.org/c/openstack/nova-specs/+/868377

Depends-On: https://review.opendev.org/c/openstack/nova/+/876075

Change-Id: Ia8caf39467a91431ca85b2a56ec93a60c41a8e7d
2023-12-05 10:59:18 +02:00
Takashi Kajinami a8bed388f2 Deprecate Windows OS support
Unfortunately the Winstackers project has been retired because of no
maintainers[1][2], and OpenStack on Windows host is no longer
maintained.

[1] https://lists.openstack.org/pipermail/openstack-discuss/2022-November/031044.html
[2] https://review.opendev.org/c/openstack/governance/+/886880

Change-Id: Ib4c42b0619254ba4167deb9d06637a8ebdbcdec1
2023-11-27 11:33:37 +09:00
Zuul db05d6c27c Merge "db: Re-use a single connection" 2023-09-25 14:21:11 +00:00
Zuul 8593179896 Merge "db: Use context, session args for metadef DB APIs" 2023-09-23 11:44:38 +00:00
Zuul 78d0c8545d Merge "db: Trivial parameter swap" 2023-09-22 07:20:12 +00:00
Zuul 88bb1568fc Merge "db: Remove explicit autocommit" 2023-09-21 22:35:10 +00:00
Zuul 05d8cafcbd Merge "db: Replace use of update.values parameter" 2023-09-21 02:55:09 +00:00
Zuul 18813914cc Merge "db: Sync migrations, models" 2023-09-19 19:14:38 +00:00