summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Update 'extras' for cinder driver"HEADmasterZuul2023-05-161-1/+1
|\
| * Update 'extras' for cinder driverBrian Rosmaita2023-05-111-1/+1
| | | | | | | | | | | | | | | | Raise the min version of os-brick to include the fix for CVE-2023-2088. Change-Id: If3dba01d5cbb3a3deacdf23ab5290d7bcab4b5c7 Related-bug: #2004555
* | Imported Translations from ZanataOpenStack Proposal Bot2023-05-111-7/+7
|/ | | | | | | For more information about this automatic import see: https://docs.openstack.org/i18n/latest/reviewing-translation-import.html Change-Id: Ic5399869cc57661706a6e8801fcb200fbb526082
* Add force to os-brick disconnect4.4.0Brian Rosmaita2023-05-104-3/+15
| | | | | | | | | In order to be sure that devices are being removed from the host, we should be using the 'force' parameter with os-brick's disconnect_volume() method. Closes-bug: #2004555 Change-Id: I63d09ad9ef465bc154c85a9ea125449c039d1b90
* Merge "move attachment_update to try block"Zuul2023-05-032-18/+31
|\
| * move attachment_update to try blockanguoming2023-02-162-18/+31
| | | | | | | | | | | | | | | | | | move attachment_update to try block, so when there is some error calling attachment_update the finally block will be called, then the attachment created could be deleted. Closes-bug: #1983238 Change-Id: I2dc3888a56d802424c6d62a656b2e5fef9dabb3e
* | Merge "RBD: Wrap RBD calls in native threads"Zuul2023-04-262-4/+58
|\ \
| * | RBD: Wrap RBD calls in native threadsRajat Dhasmana2023-04-062-4/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | librbd methods call lower level C code which runs in native thread and isn't aware about the eventlet threads hence hangs the eventlet loop until the native thread is executed. This could cause problems when we are creating multiple images with large size where one call to librados can cause the process to hang and other operations can starve for execution and error out. This patch wraps each RBD call in it's own native thread that won't affect other RBD call from executing. Change-Id: I8efb0460df9fcba050b5ce949eb10caea325c851
* | | Run cinder driver unit testsBrian Rosmaita2023-04-182-0/+1
| | | | | | | | | | | | | | | | | | We have all these nice tests, might as well execute them. Change-Id: Iaf5131927bc2a0a953ec87c8b4d2e40f5d61d878
* | | Update master for stable/2023.1OpenStack Release Bot2023-03-012-0/+7
|/ / | | | | | | | | | | | | | | | | | | | | | | Add file to the reno documentation build to show release notes for stable/2023.1. Use pbr instruction to increment the minor version number automatically so that master versions are higher than the versions on stable/2023.1. Sem-Ver: feature Change-Id: I9de26e99ebd9ab6bd106c7e0b10347ca572663de
* | Merge "cinder: Disable cinder stores if cinderclient is not installed"Zuul2023-02-221-0/+6
|\ \
| * | cinder: Disable cinder stores if cinderclient is not installedTakashi Kajinami2023-02-211-0/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | Change Iec6ac7020f66f9f9728d6cf4452127b8d55a8b2d made cinderclient optional but it did not add proper validation while initializing a cinder store. This can cause ugly errors in case users tries to enable cinder stores without installing cinderclient. This ensures glance_store checks whether cinderclient is available and disables all cinder stores in case cinderclient is not available. Change-Id: Idb8abfdab9639b5b70ddddc3a76b1f1d24dd035d
* | Merge "Fix misuse of assertTrue"Zuul2023-02-222-22/+22
|\ \
| * | Fix misuse of assertTrueTakashi Natsume2023-02-122-22/+22
| |/ | | | | | | | | | | | | Replace assertTrue with assertIsInstance or assertEqual. Change-Id: Ied3d6ba3941745a6bebda50780d16be2908a619c Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* | Merge "rbd: Disable rbd stores if libraries are not available"Zuul2023-02-221-0/+7
|\ \
| * | rbd: Disable rbd stores if libraries are not availableTakashi Kajinami2023-02-211-0/+7
| |/ | | | | | | | | | | | | | | | | | | This ensures glance_store checks whether the dependent libraries (rbd and rados) when adding rbd store and disables all rados stores in case these libraries are not available. This avoid ugly error (eg. AttributeError) caused by missing libraries. Change-Id: I673473aa8b540c084ce3a4934e8be7069f13e77f
* | Do not always import boto3Takashi Kajinami2023-02-211-4/+17
|/ | | | | | | | | | | | | Currently boto3 is not part of requirements but stevedore always tries to import it and shows error in case boto3 is missing. This is not a real error unless users actually enable s3 backends and can be quite confusing. This makes the driver code ignore ImportError and actually fail only if users try to enable s3 backend without installing boto3. Closes-Bug: #2007924 Change-Id: Ia94dd1d12a3d723f6263bdfb0966d416dfbae1af
* Imported Translations from ZanataOpenStack Proposal Bot2023-02-101-4/+28
| | | | | | | For more information about this automatic import see: https://docs.openstack.org/i18n/latest/reviewing-translation-import.html Change-Id: If3f612f3ecabcd2610ea0443d3866a001dd82d0a
* Merge "Replace deprecated UPPER_CONSTRAINTS_FILE variable"Zuul2023-02-091-3/+3
|\
| * Replace deprecated UPPER_CONSTRAINTS_FILE variableXinxin Shen2023-02-071-3/+3
| | | | | | | | | | | | | | | | | | UPPER_CONSTRAINTS_FILE is old name and deprecated See https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file Co-Authored-By: Cyril Roelandt <cyril@redhat.com> Change-Id: If844b485970c4d0e0b13dcf431fe0e5138004b6e
* | Merge "Cinder: Add support to extend attached volumes"4.3.0Zuul2023-02-0811-50/+212
|\ \
| * | Cinder: Add support to extend attached volumesRajat Dhasmana2023-01-1811-50/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While creating an image, if we want to extend the volume (to accomodate the image), we need to first detach the volume, perform the extend and attach it again. This is inefficient for backends that support extending attached volumes since we are performing 3 cinder operations (the attachment call includes 3 API calls which sum to a total of 5 API calls for 3 operations) instead of directly extending it which requires only 1 API call to cinder. The support for extending attached volumes was added in cinder microversion 3.42. This patch adds a new boolean config option ``cinder_do_extend_attached`` which allows operators to specify if the cinder backend they are using supports extending attached (in-use) volumes. By default this will be ``false``. Based on the parameter, we will perform the extend operation, online (if cinder_do_extend_attached is true) and offline otherwise. Spec: https://review.opendev.org/c/openstack/glance-specs/+/868901 Depends-On: https://review.opendev.org/c/openstack/glance/+/869021 Depends-On: https://review.opendev.org/c/openstack/cinder/+/869051 Change-Id: I5e70824e9abc5277ea25ba95704b358fe3686037
* | | Merge "Rbd: Deprecate unused rados_connect_timeout"Zuul2023-02-084-21/+15
|\ \ \ | |_|/ |/| |
| * | Rbd: Deprecate unused rados_connect_timeoutCyril Roelandt2022-08-044-21/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option determines the value we pass as the "timeout" argument to rados.Rados.connect. Unfortunately, this argument is silently ignored by librados[1]. [1] https://docs.ceph.com/en/latest/rados/api/python/#rados.Rados.connect Closes-Bug: #1983499 Change-Id: I819df987f690c7a8c0a1153ad0e30bd5dbeb7b57
* | | Imported Translations from ZanataOpenStack Proposal Bot2023-02-041-4/+15
| |/ |/| | | | | | | | | | | For more information about this automatic import see: https://docs.openstack.org/i18n/latest/reviewing-translation-import.html Change-Id: I7f90bb35d8de35404a4c5a8c49835ba83faba4f7
* | Refactor/restructure glance cinder storewhoami-rajat2023-01-1714-154/+566
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an effort to decouple some of the cinder backend specific code (like nfs, scaleio) from the generic logic. The purpose is to make the code modular and any change for a particular cinder backend should not affect the code path of other backends thereby reducing regression. This is also required for another use case of supporting extend of attached volumes added in [1]. Following are the major changes done in this patch: 1) Move cinder store to a new directory 'cinder' and rename 'cinder.py' to 'store.py' (similar to swift) 2) Create new files for nfs and scaleio backends for moving code specific to these backends into their own separate file. This also fixes one bug when using sparse files in nfs and we wait for file size to be equal to volume size (initially done for scaleio/powerflex backend) but this will never happen for nfs sparse files. See bug: 2000584 3) Move cinder tests to 'tests/unit/cinder' directory and add tests for base, nfs and scaleio files. 4) Modify/fix existing tests Closes-Bug: #2000584 [1] https://review.opendev.org/c/openstack/glance_store/+/868742 Depends-On: https://review.opendev.org/c/openstack/glance/+/869021 Change-Id: I26c272b6c503e98fbbafca411d3eec47283bd6fc
* | Fix tox4 error4.2.0Ghanshyam Mann2022-12-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | tox.ini started failing with Tox4 which had some incompatible changes. Fixing tox.ini for tox4 changes. Depends-On: https://review.opendev.org/c/openstack/glance/+/868530 Change-Id: I96feba843ca5ebecdc7313961207369da30e72f5
* | Add region_name option to s3 storeArnaud Morin2022-12-024-4/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | Add an option to let the operator choose a proper region_name. Some operator are not using S3 from amazon but from other provider. In such case, the get_s3_location cannot give good region_name. Adding an option from config seems a better option that relying on hardcoded stuff in the code. Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com> Change-Id: I71352e75f6415494709d8fb62c8b13f3ea7c6016
* | Merge "Remove logic for Python <= 2.6"Zuul2022-11-173-13/+1
|\ \
| * | Remove logic for Python <= 2.6Takashi Kajinami2022-07-173-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | ... because that old version is no longer supported. Also the check_python_version method is removed by this change, because the required python version is now enforced by setup.cfg. Change-Id: Ie9c91adcb81a1a5dbca2587b6592a58d4cc91e4a
* | | [test-only] OverflowError running on 32-bit systemsBrian Rosmaita2022-10-121-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change I59b1579dc9877668b82d4195431c1 added tests that mock an input buffer, but the mocked return_value for __len__ exceeds the allowable maximum value for an index in the CPython implementation on 32-bit systems. Fix this by using half the value and allowing the buffer to be called twice during the tests. Change-Id: Iaba20c01fb4d994cd738a570197f8f6f04f22606 Closes-bug: #1991406
* | | Merge "Switch to 2023.1 Python3 unit tests and generic template name"Zuul2022-09-161-1/+1
|\ \ \
| * | | Switch to 2023.1 Python3 unit tests and generic template nameOpenStack Release Bot2022-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an automatically generated patch to ensure unit testing is in place for all the of the tested runtimes for antelope. Also, updating the template name to generic one. See also the PTI in governance [1]. [1]: https://governance.openstack.org/tc/reference/project-testing-interface.html Change-Id: I8a2644e11afccdb9e937ec09b6766e7c7f7ae574
* | | | Imported Translations from ZanataOpenStack Proposal Bot2022-09-161-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For more information about this automatic import see: https://docs.openstack.org/i18n/latest/reviewing-translation-import.html Change-Id: I6e39ce009fe9602dd63dd0052e8925b63ade3e0f
* | | | Merge "Update master for stable/zed"Zuul2022-09-122-0/+7
|\ \ \ \ | |/ / /
| * | | Update master for stable/zedOpenStack Release Bot2022-09-062-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add file to the reno documentation build to show release notes for stable/zed. Use pbr instruction to increment the minor version number automatically so that master versions are higher than the versions on stable/zed. Sem-Ver: feature Change-Id: I9745880b98acf910c4f8cf74372a7fdc9ebac582
* | | | Imported Translations from ZanataOpenStack Proposal Bot2022-09-061-2/+19
|/ / / | | | | | | | | | | | | | | | | | | For more information about this automatic import see: https://docs.openstack.org/i18n/latest/reviewing-translation-import.html Change-Id: I531c32bd0b9692efc68a3a16ad7f4eb6fa996ce0
* | | Imported Translations from ZanataOpenStack Proposal Bot2022-08-241-10/+30
| | | | | | | | | | | | | | | | | | | | | For more information about this automatic import see: https://docs.openstack.org/i18n/latest/reviewing-translation-import.html Change-Id: I8dabf5882020d5bc17007f12f1d4afd0e9ecc45c
* | | Merge "Tests: Mock sleep in cinder test_attachment_create_retries"4.1.0Zuul2022-08-231-0/+1
|\ \ \
| * | | Tests: Mock sleep in cinder test_attachment_create_retriesEric Harney2022-08-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings the time to run this unit test from 6+ seconds to 0.003s. Change-Id: I0c40e33bb7f35555b50ca04f1b048d9b716b77b5
* | | | Merge "Swift: Honor *_domain_name parameters"Zuul2022-08-226-27/+194
|\ \ \ \ | |/ / / |/| | |
| * | | Swift: Honor *_domain_name parametersTakashi Kajinami2022-08-186-27/+194
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | The *_domain_id parmaeters should not have any default. Otherwise keystoneauth ignores the *_domain_name parameters and it requires only *_domain_id parameters are used. Closes-Bug: #1620999 Change-Id: I1f8c9184761313f9fc5fda2f257e52233e0196d1
* | | Merge "Do not loose url queries on redirects"Zuul2022-08-112-2/+20
|\ \ \
| * | | Do not loose url queries on redirectsPavlo Shchelokovskyy2022-08-042-2/+20
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | when fetching images with http driver, the redirect URL can have mandatory query in it, which must be kept intact to successfully fetch the image. Change-Id: I2a9d4d026b935ea6c5e5a3a46c86f70ce1e39ae7 Closes-Bug: #1633860
* | | Merge "Imported Translations from Zanata"Zuul2022-08-111-2/+78
|\ \ \ | |/ / |/| |
| * | Imported Translations from ZanataOpenStack Proposal Bot2022-05-261-2/+78
| | | | | | | | | | | | | | | | | | | | | For more information about this automatic import see: https://docs.openstack.org/i18n/latest/reviewing-translation-import.html Change-Id: I5e4fd429f900c33934ca34afb340f06f174616fd
* | | Add debug logs to cinder storewhoami-rajat2022-07-202-1/+12
| |/ |/| | | | | | | | | | | | | | | | | When debugging issues related to glance cinder store, there are several calls to cinder and it becomes hard to determine which step we are currently executing without going through cinder logs. This patch adds some useful debug logs for the new attachment's code to understand which stage of attachment we are on. Change-Id: I491b7292a511c47c1d6148dab69ae04269e50c85
* | Support os-brick specific lock_path for Cinder4.0.1Gorka Eguileor2022-07-122-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a new feature relevant for the Cinder store, os-brick now supports setting the location of file locks in a different location from the locks of the service. The functionality is intended for HCI deployments and hosts that are running Cinder and Glance using Cinder backend. In those scenarios the service can use a service specific location for its file locks while only sharing the location of os-brick with the other services. To leverage this functionality the new os-brick code is needed and method ``os_brick.setup`` needs to be called once the service configuration options have been loaded. The default value of the os-brick ``lock_path`` is the one set in ``oslo_concurrency``. This patch adds support for this new feature in a backward compatible way so code works even if using an os-brick version that doesn't have this feature. That is the case for many CI jobs that install os-brick from PyPi instead of the code present in master. Change-Id: Ib11d63e3c388e12f145f40247d17030a566b8c5e
* | Remove Python 2 supportliyou012022-05-2532-323/+283
|/ | | | | | | | | Python 2 has been deprecated for almost two years, and has not been guaranteed to work with glance_store for a while. This patch removes all traces of six, unicode strings and Python 2 tweaks. Co-Authored-By: Cyril Roelandt <cyril@redhat.com> Change-Id: Ifa78924d7ecf4f2d9a54c677888ab2926530c487
* Update python testing as per zed cycle teting runtime4.0.0Ghanshyam Mann2022-05-104-25/+24
| | | | | | | | | | In Zed cycle, we have dropped the python 3.6/3.7[1] testing and its support. Moving the py36 job to py3 based so that they run on latest supported python 3. Updating the python classifier also to reflect the same. [1] https://governance.openstack.org/tc/reference/runtimes/zed.html Change-Id: Ida582daf7db6fb3cedb3c7e37fc512d094b37c6e