Commit Graph

8 Commits

Author SHA1 Message Date
Abhishek Kekane fd222f3128 Sort locations based on store weight
Related to blueprint store-weight

Change-Id: I2383a476cb7e79c7efecdf33203cff0b50ef3bbb
2023-08-01 14:16:08 +00:00
Mridula Joshi b0d727d028 Extending stores-detail API
This patch extends the functionality of the API
``GET /v2/info/stores/detail`` to expose store details
of other stores. Currently the ``stores-detail`` API
exposes store details of RBD backend.

Implements: blueprint expanding-stores-detail
Change-Id: I0c7bbc315b56dc0e40397b4ed8a68d1668203c44
2022-08-23 14:42:53 +00:00
Mridula Joshi a34764ecac Added a new API to expose store info
This patch adds a new API to glance ``GET /v2/info/stores/detail``
to expose the stores specific details about the store like store
type and other specific store properties.This operation
will be admin only and validated by the new policy rule
``stores_info_detail`` which defaults to admin only

Implements: blueprint expose-store-specific-info
Change-Id: I6882fd2381e6ae245fd8c61bf9f4d52df2b216f5
2022-02-16 05:46:47 +00:00
whoami-rajat 98a1e792c6 Support cinder multiple stores
This patch updates the location URL of the legacy images while
upgrading from single cinder store to multiple stores.
It does that with the help of lazy loading logic i.e. while
GET images call, it checks the location URL and metadata
of the image against the configured store ids and updates
images to respective stores on the basis of volume type (comparing
image-volume's type with the configured cinder_volume_type).
Legacy image URL:
cinder://<volume-id>
New image URL:
cinder://<store-id>/<volume-id>

NOTE: bumping lower-constraints/requirements of glance-store to 2.3.0 as
it includes changes[1] that are a hard requirement for cinder multiple
stores to work with glance

[1] https://review.opendev.org/#/c/746556/

Change-Id: I087a89c20813378fea8ff22ddf81d7a10c220db3
Implements: blueprint multiple-cinder-backend-support
2020-09-07 09:07:42 +00:00
Abhishek Kekane 6dba83ba3a Rethinking filesystem access
In Rocky multiple backend support is added as experimental feature. In
order to take advantage of this feature it is decided to deprecate
work_dir and node_staging_uri configuration options
and reserve two filesystem stores 'os_glance_tasks_store' and
'os_glance_staging_store', which can be used to get rid of initializing
store via internal functions.

These internal stores are considered "reserved stores" by Glance.
For the time being, these are hard-coded as filesystem stores.  The
store prefix 'os_glance_' is reserved for internal Glance use and
the glance-api service will refuse to start if a store with this
prefix is included in the enabled_backends config option in
glance-api.conf.

NOTE: Because there are no sensible default values for the location
of the datadir for each of these stores, the operator must define
'os_glance_tasks_store' and 'os_glance_staging_store' in
glance-api.conf configuration file as shown below.

[os_glance_tasks_store]
filesystem_store_datadir = /var/lib/glance/tasks_work_dir/

[os_glance_staging_store]
filesystem_store_datadir = /var/lib/glance/staging/

Each filesystem store must have a unique datadir.

Depends-On: https://review.openstack.org/#/c/639765/
Implements: blueprint rethinking-filesystem-access
Change-Id: I86ec513c5fc653dbb97b79d953d8430f014e684f
2019-10-01 09:53:48 +00:00
Abhishek Kekane 0182868be5 Unit tests fails with new glance_store version 0.29.0
Around 11 unit tests are failing [1] with a recent patch [2] merged in
glance_store. The reason behind the failure is glance unit tests are
loading rbd store which is not supported in gate. Earlier these tests
were passing because they were not trying to connect to rados while
loading the store, but after merging of recent patch [1] it tries to
connect to rados via configure_add method of rbd driver.

To avoid these kind of failures in near future we should drop using
rbd store in tests as we know it is not supported in gate.

NOTE:
Also corrected the naming conventions of store identifiers, instead
of using file1 etc., used appropriate names.

[1] http://logs.openstack.org/40/663740/1/check/cross-glance-py27/50a9a9c/
[2] https://review.opendev.org/660340

Change-Id: I18add352238e93c5d4ade8b3e8d967b2f639cdad
Closes-Bug: #1831963
2019-06-07 06:24:36 +00:00
Abhishek Kekane f930288120 Mark http store read-only in discovery call
Made changes to discovery store to show 'http'
store as 'read-only' if it is configured under
'enabled_backends' cofiguration option.

Change-Id: If5d292bbb4cef1bd21a7e6cd4ef343a767eb91a4
2019-05-29 05:12:44 +00:00
Abhishek Kekane 73109de485 Unit/Functional tests for multi store support
Added some unit tests for coverage purpose.
Added functional tests for create and import scenarios.

Note:
For functional tests I have considered file store with two
different image directories.

Related to blueprint multi-store
Change-Id: I59e28ab822fb5f6940f48ddbf6dfba4cb7d4c509
2018-08-01 08:57:56 +00:00