| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Kill some of the variables marked as unused by flakes8. This should
allow to enable F841 check in the future.
Only trivial cases with no function calls and obviously pure functions
(like datetime.now(), or len()) are cleaned up here.
Part 1, split to reduce conflicts.
Change-Id: I82854349574ec4bcb9336aba626eefdaed81a8c8
|
| |
|
|
|
|
| |
Multi-line doc-strings should end on a new, separate line.
Change-Id: I4cf0cfe92b634ef77971863a4df41ef43531bc20
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
* Allows image location that begins with '/' during EC2 image register
* Adds relevant unit test
Fixes LP bug #1074908
Change-Id: I488b126c2079de4370823b347e80c7ec1ecc2c9f
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| | |
Mechanical translation of the deprecated
except x,y: construct with except x as y:
The latter works with any Python >= 2.6.
Add Hacking check.
Change-Id: I845829d97d379c1cd9b3a77e7e5786586f263b64
|
| |/
|
|
|
|
|
|
|
|
| |
Change so _s3_create handles the image it is creating
being deleted while it is creating it without logging a stacktrace
and instead just logging a simple message explaining what happened.
Fixes bug 1084703
Change-Id: I9d984dd1cf4f393010493cacd048d20ad5225db8
|
| |
|
|
|
|
|
|
| |
There are some small warts (mostly around other execute() like
methods which reuse the exception). I will fix these warts in later
reviews.
Change-Id: Ice9cdbdc5f3e5a9f8365f5d99acf1863a9fe3e7a
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Catch exception from glance when image creation fails because the
requested name is too long. Currently the exception is not caught
in the api which results in an 400 Bad Request correctly being
returned, but also leaving a traceback in the logs. Correctly catching
the exception and explicitly raising an HTTPBadRequest removes
the production of the traceback.
Fixes bug #1169560
Change-Id: I511da79cb0b1b4578bf43f0819b2ac64fb6e5fb3
|
| |/
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Update all references of "LLC" to "Foundation".
Change-Id: I009e86784ef4dcf38882d64b0eff484576e04efe
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
blueprint vmware-compute-driver
Glance change to fix image download to ESX
The current glance code downloads files in a blocking/synchronous
manner, the fix improves it to work with ESX glance file reader
in a non-blocking manner.
This allows ESX glance file reader to read items from the returned
queue.
Change-Id: I05ab7ac00878aeeea3bbcd7546b05398f2630dd3
|
| |/
|
|
|
|
| |
Calling out to another service may take a while, so lets log this
Change-Id: I223105ee578ae82230cbc3936c096e148b07e8f1
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The my_ip, host and use_ipv6 options are used all over the codebase
and they're pretty well related to each other. Create a new netconf
module for them to live in.
There are now no options registered globally in nova.config!
blueprint: scope-config-opts
Change-Id: Ifde37839ae6f38e6bf99dff1e80b8e25fd68ed25
|
| |/
|
|
|
|
|
| |
fix N402 (single line docstrings should end in a period) for
rest of nova files
Change-Id: I57d0d9ab01345dd83e544e476d79d2c2ca68ee51
|
| |
|
|
|
|
|
| |
s3_host and s3_port are only used in nova.image.s3.
blueprint: scope-config-opts
Change-Id: Ia841406ebe7c03b2a58392e2453118e2646ad7ce
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
When a user tries to access an image that is
forbidden it sends an HTTPForbidden. Inform the user
with a help message that the permission is not available
to them.
Change-Id: I3082c789876440226b5f177216ec628436c7b3ce
Signed-off-by: Chuck Short <chuck.short@canonical.com>
|
| |
|
|
|
|
|
|
|
| |
The glance_api_servers and glance_api_insecure options are only used in
nova.image.glance. The only other place that glance_num_retries is used
is nova.virt.xenapi.vm_utils.
blueprint: scope-config-opts
Change-Id: I2cd0f62e43379bc94c95f85ab5b4aac9faf6c4f7
|
| |
|
|
|
|
|
|
|
| |
api_rate_limit is only used in nova.api.auth and auth_strategy is only used in
one other place. Scoping both options to nova.api.auth makes their purpose more
clear.
blueprint: scope-config-opts
Change-Id: I03f35c0e38239ecd96e8c304527530d42ab4097e
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
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: Ib110ba8d1837780e90b0d3fe13f8e6b68ed15f65
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The Nova Glance wrapper returns all images metadata
if the parameter 'limit' is not define. It doesn't
split the image metadata list.
So the sub method fetch_image is no more needed.
We can delete it.
I added a check in Nova Glance wrapper to be sure
the parameter 'marker' or another one aren't set
to 'None' (like in bug #1065053).
Fixes LP bug #1070904
Change-Id: I24ecc4adf158401f60b508aa3a20bd4c91bfa92b
|
| |/
|
|
|
|
|
|
| |
Updates _params rather than params to ensure filters.
Fixes bug 1070138.
Change-Id: I4e71d19f120ea91d8dfca32785ccb0aa7b1c770b
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a regression that causes tracebacks in s3
Traceback (most recent call last):
File "/opt/stack/nova/nova/image/s3.py", line 294, in delayed_create
_update_image_state(context, image_uuid, 'downloading')
File "/opt/stack/nova/nova/image/s3.py", line 286, in _update_image_state
headers)
TypeError: update() takes at most 5 arguments (6 given)
This is due to 6e4539f397bfc5dbf9ec88ddc3968621815d576b
Fixes LP: #1031867
Change-Id: I6cf786999c623c0ca780a173dcba49354207e9c3
Signed-off-by: Chuck Short <chuck.short@canonical.com>
|
| |
|
|
|
|
|
|
|
|
| |
* 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
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
* Directly import glance.client rather than through importutils
* Arbitrary code cleanup (spacing, comments, etc)
Change-Id: I27410e5e37bcb010e68c964fbdb6d2e46608cc87
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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
|