summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add release notes for 0.4.00.4.0Nikhil Komawar2015-03-181-0/+13
| | | | | | | | | | | | | | | | | $ git log 0.3.0..HEAD --no-merges --oneline c89bfe2 Fix intermittent failure in test_vmware_store f98018c Deprecate the gridfs store 6aa9dd1 Remove incubative openstack.common.context module 4f05481 Update help text with sample conf 2454639 Use oslo_config.cfg.ConfigOpts in glance_store 5121910 Make dependency on boto entirely conditional b8d6263 Move from oslo.utils to oslo_utils (supplement) affcd80 Fix timeout during upload from slow resource 8bd848d Throw NotFound exception when template is gone 89e8884 Correct such logic in store.get() when chunk_size param provided Change-Id: Ie89bdf1c252a41b4c7b7ac40376d254b5f71fc8f
* Fix intermittent failure in test_vmware_storeSabari Kumar Murugesan2015-03-181-1/+2
| | | | | | | The test test_delete_non_existing was failing intermittently due to a missing mock. Change-Id: If231fd1d7b88a48e2011306cfca620ac7e0ad41e
* Merge "Throw NotFound exception when template is gone"Jenkins2015-03-172-0/+18
|\
| * Throw NotFound exception when template is goneJun Hong Li2015-03-102-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | When using vsphere backend store, if the template is deleted in vCenter datastore by some reason, it fails to delete the image from glance due to the generic Exception. The bug is fixed by catching oslo.vmware.FileNotFoundException, and throw NotFound exception. So that the behavior of deleting image will be identical with file system backend. Change-Id: If22f71feadec025eaf9a38c4cb15eb7f669820f8 Closes-Bug: 1418396
* | Merge "Deprecate the gridfs store"Jenkins2015-03-161-0/+6
|\ \
| * | Deprecate the gridfs storeFlavio Percoco2015-03-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The store doesn't seem to be used by anyone and it's sitting there without good maintainers. I'm the original author of this code and I'm not willing to maintain it any longer since I don't think it's a good fit for glance's use case. This was announced and discussed here: http://lists.openstack.org/pipermail/openstack-dev/2014-October/047720.html I'd like to remove it entirely now but we should be good boys and offer a deprecation period first, hence this patch. Change-Id: I984ef82b6c96e4edea102ae69a1d009c2f2965bd
* | | Merge "Correct such logic in store.get() when chunk_size param provided"Jenkins2015-03-139-16/+51
|\ \ \
| * | | Correct such logic in store.get() when chunk_size param providedZhi Yan Liu2015-03-049-16/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change corrected the logic of image content reading function in get() for some store drivers. if the chunk_size param provided from outside, it means client want to read partial image content from storage, current implementation is incomplete and has some problem. The change didn't try to make drivers fully support random access from backend with chunk_size (and offset) param, that stuff will be implementated by a dedicated patch, this one only to make default logic be correct. Change-Id: I76fd3746a2c449e257ea2a19c2dc6118be207eec Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
* | | | Merge "Remove incubative openstack.common.context module"Jenkins2015-03-135-151/+16
|\ \ \ \
| * | | | Remove incubative openstack.common.context moduleZhi Yan Liu2015-03-125-151/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glance_store library needn't to use openstack.common.context module really, the only relevancy is swift store unit test, which would be better to use mock instead however. The patch changed swift store unit test to use mock easily, and removed glance_store.openstack namespace due to context module is the last one incubative module synced from oslo-inc. We might use graduated oslo library in future neatly and hopefully. Change-Id: I4442735e4f4350eb01dfd49f4cf8b12a141ce0f7 Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
* | | | | Merge "Use oslo_config.cfg.ConfigOpts in glance_store"Jenkins2015-03-135-5/+5
|\ \ \ \ \
| * | | | | Use oslo_config.cfg.ConfigOpts in glance_storeZhi Yan Liu2015-03-115-5/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move from oslo.config to oslo_config. This change could prevent glance failed by "NoSuchOptError: no such option: glance_store" triggered in verify_default_store() error when startup [0]. The root cause is that when we import oslo.config.cfg (when importing glance_store in glance context) first than oslo_config.cfg, global oslo.config.cfg.ConfigOpts object (CONF) in glance_store code is a different object (and type) than oslo_config.cfg.ConfigOpts object in glance code, so register_opts() of glance_store registered all store needed options to a separated ConfigOpts object but glance used one. With change I30ecbf8f9de77496fcb643c7ad9738d79ad359f0) glance is using oslo_config namespace now, so before release new glance_store, we need merge this change in. A clear and simpler example as following: Python 2.7.6 (default, Mar 22 2014, 22:59:56) >>> from glance_store import backend >>> from glance.common import config # we do this importing order for pep8 required in now code. >>> config.CONF == backend.CONF, config.CONF, backend.CONF (False, <oslo_config.cfg.ConfigOpts object at 0x7f4e4cd18690>, <oslo.config.cfg.ConfigOpts object at 0x7f4e4e521d50>) # Renew python session. >>> from glance.common import config >>> from glance_store import backend >>> config.CONF == backend.CONF, config.CONF, backend.CONF (True, <oslo_config.cfg.ConfigOpts object at 0x7fc355937450>, <oslo_config.cfg.ConfigOpts object at 0x7fc355937450>) Change-Id: I1f1962c462b0c1fcdce0c04c6a1cec57d9f191eb Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
* | | | | Merge "Make dependency on boto entirely conditional"Jenkins2015-03-121-1/+2
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Make dependency on boto entirely conditionalIan Cordasco2015-03-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By moving the import into the (only) method that needs boto.exception we retain the ability to list the options from that driver without breaking glance_store.backend.register_opts. Closes-bug: 1426767 Change-Id: Ie35b4b41f71b79502cb2d4b83c2037ec0d798557
* | | | | Merge "Update help text with sample conf"Jenkins2015-03-111-8/+18
|\ \ \ \ \
| * | | | | Update help text with sample confSabari Kumar Murugesan2015-03-111-8/+18
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The help text for vmware_datastores needs to be in sync with the sample conf in glance. This will ensure there is no loss of information when we move to generating the config file. Change-Id: I0f727ba696ae2b9fd19b4ffc5c8acdbf8c0a2d86
* | | | | Merge "Fix timeout during upload from slow resource"Jenkins2015-03-111-1/+1
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Fix timeout during upload from slow resourceMike Fedosin2015-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To prevent timeouts during upload images from slow resources it's recommended to reduce chunk size from 16mb to 4mb. Change-Id: If994748e6571123370d26eea347ee1bfb5639711 Closes-Bug: 1429785
* | | | | Move from oslo.utils to oslo_utils (supplement)Zhi Yan Liu2015-03-102-2/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | oslo_utils has been moved out of the oslo namespace. bp drop-namespace-packages (First Change: Id4ccf076983592026d35407107e79cf1575248ce ) Change-Id: Ie8597692978c2fc090591bdae213e649e1a80c8c Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
* | | | Merge "Use oslo_utils.units where appropriate"0.3.0Jenkins2015-03-109-32/+36
|\ \ \ \
| * | | | Use oslo_utils.units where appropriateGorka Eguileor2015-03-099-32/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use units from oslo_utils where appropriate instead of using magic numbers. Changes from patch Ib08b8d8843b72966e2cf87f741b1cc0eea0672e5 are also included. Co-Authored-By: Gorka Eguileor <geguileo@redhat.com> Co-Authored-By: James Page <james.page@canonical.com> Change-Id: I082ea91cb06e49659495cae9072b263eccda76a1
* | | | | Merge "Deprecate VMware store single datastore options"Jenkins2015-03-101-3/+10
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | Deprecate VMware store single datastore optionsSabari Kumar Murugesan2015-03-091-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The options vmware_datastore_name and vmware_datacenter_path are redundant with vmware_datastores provided by the multi-datastore support in blueprint vmware-store-multiple-datastores. Depends-On: I61d1a6b07fe384c49958dbf3f912a65e52cc4f6c Change-Id: I573f415f2a44c35838a0a1a2c30da71e36b13549
* | | | | Merge "VMware: Support Multiple Datastores"Jenkins2015-03-093-47/+392
|\ \ \ \ \ | |/ / / / | | / / / | |/ / / |/| | |
| * | | VMware: Support Multiple DatastoresSabari Kumar Murugesan2015-03-063-47/+392
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for VMware store to use multiple datastore backends. Spec (approved): https://review.openstack.org/#/c/146723/ tl;dr: 1. Adds a new config option vmware_datastores to configure multiple datastores. 2. Implements a selection logic based on priority to choose from the list of datastores. 3. Modifies StoreLocation parsing logic to identify datastore related info from location URI. DocImpact Implements-Blueprint: vmware-store-multiple-datastores Change-Id: I176f1143cd2d9b0a01a0f4f4256e7ac7d9b09afd
* | | Merge "Support for deleting images stored as SLO in Swift"0.2.0Jenkins2015-03-052-7/+69
|\ \ \ | |/ / |/| |
| * | Support for deleting images stored as SLO in SwiftHemanth Makkapati2015-03-032-7/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an image is deleted, the image data is not being deleted completely if it is stored as static large object(SLO). Only the manifest is deleted leaving behind all the segments. This leads to stale data in swift cluster. This change attempts to delete the SLO in the following way: 1. Identify a SLO with 'x-static-large-object' header on an object 2. Delete the SLO, both manifest and the segments, using the query string 'multipart-manifest=delete' while deleting the object Closes-Bug: 1425617 Change-Id: Id2cd3b63ca88d66c5e7435b528ba75fa3c2cbb1c
* | | Merge "Unify using six.moves.range rename everywhere"Jenkins2015-03-044-0/+8
|\ \ \ | |_|/ |/| |
| * | Unify using six.moves.range rename everywhereErno Kuvaja2015-02-254-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Mainly to improve consistency, use range() from six.moves renames across glance. Behaves consistently like py2 xrange() and py3 range(). Change-Id: I542fcb2a762cf4b34c30fc796854c6fcf305d798
* | | Merge "Enable DRIVER_REUSABLE for vmware store"Jenkins2015-03-041-1/+2
|\ \ \ | |_|/ |/| |
| * | Enable DRIVER_REUSABLE for vmware storeSabari Kumar Murugesan2015-03-021-1/+2
| | | | | | | | | | | | | | | | | | | | | VMware store is reusable and there is no need to re-create the store instance everytime. Change-Id: Ieb311e07dec6896286a025c1f24e10d247d22a7e
* | | Merge "Move to hacking 0.10"0.1.12Jenkins2015-03-028-15/+14
|\ \ \
| * | | Move to hacking 0.10JordanP2015-02-268-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Release notes: http://git.openstack.org/cgit/openstack-dev/hacking/tag/?id=0.10.0 Change-Id: Iaed2de813fb181ab9f67dda50a4c19d1b9a7dc31
* | | | Show fully qualified store name in update_capabilities() loggingZhi Yan Liu2015-03-011-1/+2
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | Current debug log in StoreCapability.update_capabilities() used the basic class name of store driver, but since different driver uses same class name - Store, so it doesn't make any senese for people who checks this log, who can't figure out which store the log was talking about. Change-Id: I4e22a3a84003909a66f5edaa6298c68e9fdb43e2 Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
* | | Merge "Use a named enum for capability values"Jenkins2015-03-0116-83/+107
|\ \ \
| * | | Use a named enum for capability valuesIan Cordasco2015-02-1316-83/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Iedf0d4f829e46ca64c3f4fc6a7dfee54d9b0605b we added support for driver capabilities in glance_store. That same change also used (mutable) module globals to check driver capabilities. By moving the capability definitions inside a subclass of IntEnum we retain all of the previous functionality with the guarantee that the enum values will not change once defined. Change-Id: I13c7bd507252e793b2c790cc9b77c7b8db432d02
* | | | Fix sorting query string keys for arbitrary url schemesSabari Kumar Murugesan2015-02-252-4/+16
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python2.6, urlparse module does not parse the query string from from the url for arbitrary schemes. http://bugs.python.org/issue9374 Thus, our test utility method does not sort the qs keys for vmware store url scheme (which is vsphere). This causes random failures in py26 unit tests. Change-Id: I1f5da01bfb346b547c1f70b7de9b18585c197f29
* | | Merge "Add coverage report to run_test.sh"Jenkins2015-02-252-2/+23
|\ \ \
| * | | Add coverage report to run_test.shGorka Eguileor2015-02-192-2/+23
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Adds argument -c to run_test.sh to generate HTML coverage reports like Glance has. It also displays coverage stats on terminal. Change-Id: I3439ac43964a59e993253d1ad45ef74af86e2ad9
* | | Merge "Convert httpretty tests to requests-mock"Jenkins2015-02-252-29/+17
|\ \ \ | |_|/ |/| |
| * | Convert httpretty tests to requests-mockJamie Lennox2015-02-062-29/+17
| | | | | | | | | | | | | | | | | | | | | A cleaner syntax and more maintained library. This is what is being recommended for all projects. Change-Id: I425a9ab606419af0642492499d9338f4a9b3f42f
* | | Merge "Remove duplicate key"Jenkins2015-02-201-1/+0
|\ \ \
| * | | Remove duplicate keyDanny Al-Gaaf2015-02-191-1/+0
| | |/ | |/| | | | | | | | | | | | | | | | Remove twice added key 'obj_name' from LOG msg. Change-Id: Ib78c9f98796a9c8d59de5a2928375b7bdb3d87f4 Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* | | Merge "Check VMware session before uploading image"0.1.11Jenkins2015-02-192-11/+59
|\ \ \ | |/ / |/| |
| * | Check VMware session before uploading imageSabari Kumar Murugesan2015-02-092-11/+59
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uploading an image to vSphere backend without checking the session results in broken pipe socket error. When this happens, glance-api sends a 400 response because the IOError is not handled by the store. We address this issue by :- 1. Checking if session is authenticated before uploading the image. 2. Handle IOError and check the response code. Closes-Bug: #1402354 Change-Id: I66b6dfddfb2ddd089488f3f79f3917fd69739fc9
* | Add capabilities to storage driverZhi Yan Liu2015-02-0825-61/+551
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Storage capabilities is used to indicate the static and dynamic ability of the storage driver object based on current driver implementation or particular driver configuration and backend status. Use storage capabilities glance_store can do more proper operations on backend to support upper layer request, like to enable or disable add() function to glance, or if allow glance reuse driver instance for all request according to whether the driver and/or backend is stateless. This patch implemented some initial capabilities for existing drivers, and change the foundational code to make them be aware. Mainly it contains: 1. Implemented essential code to enable driver capabilities, adding necessary capabilities. 2. Added a generic checker on necessary storage operations, to make sure the capabilities of the driver are capable of handling requested operation. We can enhance the check logic as needed easily in future. 3. Added a callback based schedule logic to update dynamic capabilities of store when operator enabled it by a option. 4. Refactoring on existing disablement logic on driver add() interface, to use consistent capabilities way to handle it, removed add_disabled(). 5. Therefor the related exception conversion logic for other interfaces are redundant, due to now we can raise proper exception directly from the checker. 6. Added the logic to recreate drive object if the storage and/or driver isn't stateless. Few minor changes need to be added to Glance side: Change Ibbc85b6bc2ea98c564d316db2874d7df5aac32a6 . docImpact Implements: blueprint store-capabilities Change-Id: Iedf0d4f829e46ca64c3f4fc6a7dfee54d9b0605b Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
* | Fixing PEP8 E712 and E265Radoslaw Smigielski2015-02-067-11/+12
|/ | | | | | | | | | | 1. PEP8 E712, removed singleton comparison using '==' operator: E712 comparison to True should be 'if cond is True:'or 'if cond:' Two places. 2. Fix PEP8 E265 block comment syntax. E265 block comment should start with '# ' 3. No more E712 so removed it from tox.ini ignored list. Change-Id: I778aa5c4e1458cccb7a34d087b3b59eceadd45d0
* Merge "Replace snet config with endpoint config"Jenkins2015-02-033-35/+52
|\
| * Replace snet config with endpoint configJesse J. Cook2015-02-023-35/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The snet option forces the deployer to name the desired endpoint after the public endpoint. In order to switch between multiple internal networks, names have to be changed. Instead of constructing a URL with a prefix from what is returned by auth, specify the URL via configuration. DocImpact UpgradeImpact bp replace-snet-config-with-endpoint-config Change-Id: Ie97bedc7c364db9a07d64621b847e466162fdd22
* | Merge "Validate metadata JSON file"Jenkins2015-02-033-65/+207
|\ \