| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
* Allows image location that begins with '/' during EC2 image register
* Adds relevant unit test
Fixes LP bug #1074908
Change-Id: I488b126c2079de4370823b347e80c7ec1ecc2c9f
|
|
|
|
|
|
|
|
|
|
|
|
| |
test_show_translates_image_state_correctly sometimes fails
on some systems. This is caused because the ec2utils cache
is reset after the test rather than before the test (but after
the images are manually added to the db in setUp). This change
resets the ec2utils cache in the correct place
Fixes bug 1174266
Change-Id: I2ff9b71c932c913ca0423b1de4c04ca7d9de59cf
|
|
|
|
|
|
|
|
|
|
| |
Fixes the EC2 API so it maps internal S3 image state values to
ones defined by the EC2 API rather than returning the internally
used values.
Fixes bug #1074904
Change-Id: Iabbda0e5fcbe4d572c76367c6f98d4bece050e73
|
|
|
|
|
|
|
|
|
|
|
|
| |
We recently introduced EC2 image caching in 2865a76.
On some python 2.6 distros I'm now seeing nova.tests.image.test_s3
failures caused by test ordering issues. Tests appear to reuse
IDs and this can cause issue if we don't clear the cache in tearDown.
Fixes LP Bug #1158935.
Change-Id: Ifeedaf7a784b787de95d2f36394216cf7c94c5f4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes bug 1138666
When you delete an image that you just deleted, you get a 500 Internal Server Error.
In this case, the problem isn't an internal server error but the "unauthorized" response
from the image service is not expected.
This can be recreated with devstack:
1) delete an image
2) delete the same image
Here's an example:
$ nova image-list
+--------------------------------------+---------------------------------+--------+--------+
| ID | Name | Status | Server |
+--------------------------------------+---------------------------------+--------+--------+
| caa6c969-0f32-466b-8e8e-a7e0ac835470 | cirros-0.3.1-x86_64-uec | ACTIVE | |
| 8af603da-b69f-49c6-8e52-25632eccb31c | cirros-0.3.1-x86_64-uec-kernel | ACTIVE | |
| fe67d4e1-baca-4968-8638-2314373b620b | cirros-0.3.1-x86_64-uec-ramdisk | ACTIVE | |
+--------------------------------------+---------------------------------+--------+--------+
$ nova image-delete caa6c969-0f32-466b-8e8e-a7e0ac835470
$ nova image-delete caa6c969-0f32-466b-8e8e-a7e0ac835470
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-1254f8a5-8dda-444a-a077-2072ab3baa6a)
If you delete a deleted image, the server should respond with '403 Forbidden'
because the image still exists and no user is allowed to delete a deleted image.
The fix is to catch the exception from the image service and
convert it to a wsgi exception for '403 Forbidden'.
Change-Id: I2f14687d5468b67389f5dd6ab338ceb54e8a29bb
|
|
|
|
|
|
| |
Update all references of "LLC" to "Foundation".
Change-Id: I009e86784ef4dcf38882d64b0eff484576e04efe
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adds image size data that is returned from Glance into the API response.
This becomes really useful for users when they take a snapshot and want
to track the storage used by it. Since this information is already
being pulled by Nova we should display it.
DocImpact
Change-Id: I8a2d4001c21bcc54cac1a2992034dfc9fbe39d7e
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.
Add the 2013.1b4 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.
Add dependency_links to setup.py so that oslo-config can be installed
from the tarball URL specified in pip-requires.
Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other
deps get installed with easy_install which can't install oslo-config
from the URL.
Make tools/hacking.py include oslo in IMPORT_EXCEPTIONS like it already
does for paste. It turns out imp.find_module() doesn't correct handle
namespace packages.
Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).
Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
|
|
|
|
|
|
| |
Fixes bug 1108978
Change-Id: I5113e67bad1aaafdbaa0adc202cac97ba8d0dfdb
|
|
|
|
|
|
|
|
| |
Flagged with: https://github.com/lyda/misspell-check
Run with: git ls-files | misspellings -f -
Fixes bug: 1100083
Change-Id: Icf1f844fea8ad0a1101d1dc64b9a126608e9536e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
That patch allows nova to use shutil to copy a file directly from the
glance store. For this to work glance needs to enable direct_url
descriptions in the image metadata. This is done by setting
show_image_direct_url to True in glance-api.conf. The path used to back
glance also must match the path used to back nova instance storage. This
should be a large performance increase for the cases where both glance
and nova instance storage are backed by a shared file system like gluster
or ceph.
A new option has been added to nova: allowed_direct_url_schemes
This option is set to a list of schemes that can be directly accessed.
For this first simple patch only file:// is valid, and the
implementation is simple and inline. In the future it would be better
to make this into propagation modules which are dynamically loaded
according to the scheme.
DocImpact
Implements: blueprint direct-file-copy
Change-Id: I041b5524f8a0ea59e89ece0202f0503abf2f9d8e
|
|
|
|
|
|
|
|
|
| |
convert docstrings on test_ functions to comments to prevent the
function name from being masked by test infrastructure
convert the rest of the docstrings to end in punctuation as per N401
Change-Id: Ib400537c6f7feb30739207a627b5aac3a7eb165a
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the glance_host, glance_port and glance_protocol options into the
nova.image.glance module.
Also move the generate_glance_url() and generate_image_url() utility
methods there since they're the only uses of the options outside of the
module.
blueprint: scope-config-opts
Change-Id: I3beca1a65cdd902a94ddc1c512d79a4de635ef38
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert nova from using nosetests to testr for its test runner. Some
tests had to be modified to get them to run properly under testr.
run_tests.sh has been updated to run testr instead of nosetests.
Coverage is collected by running subunit.run under coverage.py when the
coverage environment is selected.
Note that you will need to rebuild your virtualenvs as nose is being
removed from the dependency lists and is being replaced by testr. Tests
will run in different processes once this test is merged so you cannot
use test classes to pass information between tests. Each test should be
a proper independent unit. Additionally the -x and -d flags to
run_tests.sh have been removed as there are currently no decent
approximations for those functions.
Change-Id: I019ca098972ca749b195f59968cf21edd5ba9109
|
|
|
|
|
|
|
|
|
| |
A bunch of config options are declared in nova.config but only used
in nova.compute.api or nova.compute.manager. Move them to the module
which uses them.
blueprint: scope-config-opts
Change-Id: Id33182e9276f61e799305b6b743d1a1f34f25625
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The only reason for importing nova.config now is where one of the
options defined in that file is needed. Rather than importing
nova.config using an import statement, use CONF.import_opt() so
that it is clear which option we actually require.
In future, we will move many options out of nova.config so many
of these import_opt() calls will either go away or cause a module
other than nova.config to be imported.
Change-Id: I0646efddecdf2530903afd50c1f4364cb1d5dce1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modules import nova.config for two reasons right now - firstly, to
reference nova.config.CONF and, secondly, if they use one of the
options defined in nova.config.
Often modules import nova.openstack.common.cfg and nova.config
which is a bit pointless since they could just use cfg.CONF if
they just want to nova.config in order to reference CONF.
Let's just use cfg.CONF everywhere and we can explicitly state
where we actually require options defined in nova.config.
Change-Id: Ie4184a74e3e78c99658becb18dce1c2087e450bb
|
|
|
|
|
|
|
|
| |
Now that options have all moved from nova.flags to nova.config, we can
safely remove the nova.flags imports and replace them with nova.config
imports.
Change-Id: Ic077a72dd6419bbf1e1babe71acfa43c4e8b55c8
|
|
|
|
|
|
|
| |
Removed gen_uuid and uuid related unittests
Replaced utils.gen_uuid() with uuid.uuid4()
Change-Id: I3020a0d67525eb73cfb8873d2570c93e2022bb76
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now that we testtools, We can use stock testtools assert methods
instead of defining our own. As part of removing them, we add Matcher
classes to use in the testtools.assertThat method. testtools matchers can
be arbitrarily combined and chained, so give more flexibility than plain
asserts
Related to blueprint grizzly-testtools.
Change-Id: I26d1dbac8dc3c322eb55c96c48330c0e38636107
|
|/
|
|
|
|
|
|
|
|
|
| |
Use the global CONF variable instead of FLAGS. This is purely a cleanup
since FLAGS is already just another reference to CONF.
We leave the nova.flags imports until a later cleanup commit since
removing them may cause unpredictable problems due to config options not
being registered.
Change-Id: Ic0168188dfe214fc81af04c8a9644d2d9f31600d
|
|
|
|
|
|
|
|
|
|
|
|
| |
As a step towards parallelizing the test runs, use testtools as the
base unittest test case class. In this patch, it has caused us to catch
places where setUp and tearDown were not being chained properly.
Additionally, we get to remove our custom skip decorators and a few
backported assert calls.
Part of blueprint grizzly-testtools
Change-Id: Ia2025e1b7191b65130b85b30ce6239d5c431c8ba
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is useful for determining whether the backend storage for the
image in Glance is the same as the storage used in a volume driver.
The direct_url is only available in the v2 images API, so add a
version parameter to each request. As more parts of the v2 API are
used, this parameter will become more useful.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Conflicts:
nova/image/glance.py
This is based on a cherry-pick of cinder commit
171a57a6879683dac5f219a0e8f1080ea687105d
Change-Id: I5ca06b6d80ffe4118f8dd381ed11283573bce71f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was some funky logic for getting networks to work around
the project only decorator. This changes the code to match what
we actually want which is:
In Flat and FlatDHCP mode non-admins should be able to access
networks that belong to their project or networks that have no
project_id assigned.
In VlanManager, project_id=None projects should not be accessible
as this means the project hasn't been assigned yet. The assignment
is done with an elevated context.
This patch adds some logic to model_query to allow None in the
project_only filter and makes network_get_all_by_uuids and
network_get use it.
fixes bug 1048869
Change-Id: I5377cea87dec8e9d0d9cec84e07128c5c6e8dca3
|
|
|
|
|
|
|
|
|
|
| |
This introduces a new glance_api_insecure setting that can be used to
not verify the certificate of the glance server against the certificate
authorities.
Fix bug 1042081.
Change-Id: I0a9f081425854e9c01e00dfd641e42276c878c67
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have no validation the the samples at api.openstack.org are
actually correct. This creates a framework to validate the request
and response samples through integration tests.
Adds a bit of stubbing in fake_network to return simple network_info
along with instance records and adds a call in image/fake to get
av valid image.
It will create non-templated versions of the samples when
the tests are running if GENERATE_SAMPLES is set in the environment
when running nova/tests/integrated/test_api_samples.py
Change-Id: Id134af0b23f0d0932c8789697439ce94bbe2834b
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes bug 1039675
glanceclient can raise HTTPNotFound (as well as NotFound) it appears,
but glance image service is only converting NotFound ->
InstanceNotFound. Same applies to 'Forbidden' and other exceptions.
This patch converts 'exc_type is NotFound'-like checks to use
'isinstance' instead, which will cover HTTPNotFound, etc.
Change-Id: I0982875e667121cee3da3cfe0124499cad484fa6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch rewrites the Glance-specific code within Nova to use
the new python-glanceclient library. The old client is deprecated
in Folsom and should not be used in conjunction with
python-glanceclient.
This removes the dependency on installing 'glance' through pip.
Implements bp integrate-python-glanceclient
Fixes bug 880964
Change-Id: Ifb9e75593abd36a2d1c08773d02f192e5e5627fc
|
|
|
|
|
|
|
|
|
|
| |
* Add comment explaining relevance of _is_image_available
* Drop superfluous log statements
* Drop GlanceImageService.delete_all as it has never been implemented
* Drop the 'features' kwarg for GlanceImageService.update
* Code simplification
Change-Id: Ie538dd93dec729fb060bbcddfbddcba6cf303e52
|
|
|
|
|
|
|
| |
Rather than reimplement openstack-common's isotime functionality,
just use what's provided for us!
Change-Id: Id44eab3c34ae2c682d27d1563c6baaf68b979d2b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes bug 1029397
This adds better retry support, making sure that if we need to retry
requests to glance, we cycle through all hosts before potentially
attemping the hosts that failed. The old random selection could cause
immediate retrying of the same host that failed.
This also adds logging of the host:port that failed and fixes a bug in
the retry test, which didn't actually successfully test retrying.
Tests for new code added.
Change-Id: I400616081e1e547b9ca2e0be622889d3a399a5bf
|
|
|
|
|
|
|
|
|
|
| |
* Drop the code block specific to deprecated auth in image
deletion code
* Remove reference to deprecated auth in the auth_strategy
config option help text
* Related to bp remove-deprecated-auth
Change-Id: Id0f4f287d33d01d54642fbc544ada9b7ef1b83ec
|
|
|
|
|
|
| |
I only just moved logging from nova to common, so behavior should remain the same.
Change-Id: I1d7304ca200f9d024bb7244d25be2f9a670318fb
|
|
|
|
|
|
|
| |
These have snuck in recently since tox does not appear to run the
hacking tests anymore during gating.
Change-Id: Iaaffdee03964baf4c47d25bde93c54d3b59e2154
|
|
|
|
|
|
|
|
| |
In preparation for integration with the new Glance client, this
drops the return of image metadata from GlanceImageService.get
in addition to renaming it to 'download'.
Change-Id: I75ca3a0a909335e74cd521da6f894c163e773e94
|
|
|
|
|
|
|
|
|
| |
Since there is no difference in index vs detail in the v2 API,
let's drop that as a requirement in the GlanceImageService.
Related to bp integrate-python-glanceclient
Change-Id: If98cf68e7e18fa78a2f9c09526ca9e80d2e27c1b
|
|
|
|
|
|
|
|
|
| |
This method isn't worth keeping around. It's used in one place and
consists of a try/except block. We also shouldn't encourage clients
of GlanceImageService to depend on finding a single unique image
by a non-unique attribute.
Change-Id: I02347adef7bc7ac70407226ea150000e55a798bc
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove image_service flag
* Move nova.image.fake to nova.tests.image.fake
* Move nova.image.get_default_image_service to
nova.image.glance.get_default_image_service
* Move nova.image.get_image_service to
nova.image.glance.get_remote_image_service
* Related to bp integrate-python-glanceclient
Change-Id: Iea6db7898328a9060fb88586e042efbc0a4351fc
|
|
|
|
|
|
| |
Fixes bug 1018216.
Change-Id: I5540e0b8ab1df1904778e3edc250369b0930987e
|
|
|
|
|
|
|
|
|
|
| |
All internal clients of Glance should be using GlanceImageService. This
refactors the code in the xen and vmware virt drivers that were
directly instantiating a glance.client object
Related to bp integrate-python-glanceclient
Change-Id: I354254060e400d9c1dfd6d041b071e3960a9ece6
|
|
|
|
|
|
|
|
|
| |
Fixes bug 827458. nova/image/s3.py _s3_create iterates through each
image_state during image creation isn't mindful of metadata updates
such as 'is_public'. Now will only update the specific pertinent
metadata instead of purging all.
Change-Id: I3e678d028464ac252383aa363baf488249dca198
|
|
|
|
| |
Change-Id: Ib8e747f91f5277aecc3be01a5e8cee5bc911e823
|
|
|
|
|
|
| |
Fixes bug 817107
Change-Id: I6253e6bbcc44676c587b315fa32afba6459e676a
|
|
|
|
|
|
| |
This is related to bug 883328.
Change-Id: Iadd1aec8d1bda3bd75bd0ab7f6797b643626db90
|
|
|
|
|
|
|
|
| |
* Remove references to deprecated NotAuthorized exception
* Handle Forbidden and NotAuthenticated
* Fixes bug 965540
Change-Id: Ib5eef3015239e0fafdb01c975a0f5d553f70519e
|
|
|
|
|
|
|
| |
Openstack => OpenStack
for nova/*py
Change-Id: Ibcfae4776422a515a109e59510fc84f8b63c00b9
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Forcing deployers to modify a paste config file to change auth
strategies is very fragile. This simplifies things by keying
pipeline construction off of a single flag. Note that this will
require a small change to devstack.
Change-Id: I49728c356266e6084ecafb6c59542390137f89e9
|