This is a rather beefy change due to the number of usages of this
import. The changes are trivial though.
Change-Id: I7badeeaca438b0291f4ed86670e7f217e6372c61
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
glance-cahce-manage is broken due to circilar imports.
Fixed the same by importing 'prefetcher' module right before
'Prefetcher' object is initialized.
Closes-Bug: #1888349
Change-Id: I57d473572ca0a341082bacc3883cd9f763d77fa7
Added new periodic job which will run as per interval set using
'cache_prefetcher_interval' configuration option and fetch images
which are queued for caching in cache directory.
DocImpact
Change-Id: If2875f7a215aca10a6ed2febc89b02219f90a10d
In order to run the unit and functional Glance tests on Windows, we
have to:
* avoid monkey patching the os module on Windows (which causes Popen
to fail)
* update sqlite connection URL
* avoid os.fork, not available on Windows.
* we'll use subprocess.Popen when spinning up http servers.
* for the really simple ones defined in the test helpers, we'll just
use threads
* do not attempt to connect to '0.0.0.0', use '127.0.0.1' instead
* some tests aren't properly skipped (xattr ones), so we're covering that
as well
* skip log rotation test, we can't move in-use files. Log rotation can
be performed by the log handler itself.
* expect an exception when hitting connection timeouts
* avoid installing unavailable test requirements (xattr, pysendfile)
* pin the instance creation timestamp. some tests that deal with
markers rely on ordering, which can be flipped if the timestamps are
identical (can happen in case of resources created one after the
other, not sure yet if this happens really fast or the clock isn't
accurate enough).
* add a few seconds to some timeouts (much needed when running the tests
in VMs).
blueprint windows-support
Change-Id: Ife69f56a3f9f4d81e1e2e47fde4778efd490938f
There are several places in the source code where
HTTP response codes are used as numeric values.
These values are used from six.moves and the
numeric values are replaced by constants.
All of the used status codes were replaced with symbolic constants
from six.moves.http_client.
More about six.moves.http_client can be found at [2],
under the table "Supported renames:".
Also, this change improves code readibility.
This patchset does not extract numeric values from
the code itself, but it can be found at [1].
[1]: Ib9e26dcea927e96e65c626c18421621d3a29a64d
[2]: https://pythonhosted.org/six/#module-six.moves
Change-Id: Idfc7b043552f428f01ac3e47b270ee0639a8f5bc
Closes-Bug: #1520159
The HTTP body must be bytes.
This commit fixes:
glance.tests.functional.test_client_exceptions
glance.tests.functional.v1.test_multiprocessing
Change-Id: Ifbe98e68000625b0f5c721f815e40bd1244c1200
After running the unit tests (eg with tox -epy27) a stale 'nosetests'
process was always left behind. It left TCP ports open and held references on
inodes. The latter caused a problem with some automated build systems.
Rework the relevant test 'test_no_client_tracebacks' to be functionally
the same, but clean up fully.
Fixes bug 1198685.
Change-Id: If9d3afa370dc2bd3c470b509d38c94cfb5844518
Return to using one wsgi application but use one database engine
per worker process.
Fixes Bug #1089916
Change-Id: Iea4b1b925208317c3c6ee3c9461b6723f3168405
Fixes bug 1054388
Clear up a couple of cases where a functional test fired up a
wsgi.Server without explicitly setting the workers config option
to zero.
Change-Id: I5e2e8fe3c5d6e0c017d27074d35fd79b7dd7d79d
A single WSGI app, and therefore a single sqlalchemy engine (mysql
connection), was being used across all API workers. This patch
instantiates the WSGI app once per worker rather than up front to
give a separate database connection to each worker.
Fixes bug 1036193
Change-Id: I2cbb61fd88a6ec4fb03fa84196ba0a380b3842d0
Implements blueprint cfg-global-object
This iteration fixes up the remaining places where we're passing a
conf object around.
Change-Id: I3b627d093a6b7afeee129ab66b377a3b0af5439b
Implements blueprint cfg-global-object
Begin adopting cfg's global CONF object pattern rather than passing
a conf object around everywhere.
This iterations does just enough to have each of the glance programs
initialize CONF and get the unit tests working.
Change-Id: Ia34959b3ba52cbe933d5d347f31319271b2e14f9
Raise UnexpectedStatus as opposed to a generic Exception when
an unexpected HTTP status is seen by the glance client.
Further fix for bug 952618
Change-Id: I222c7553e1a687aec0f6dde8215e4400ea6be2cb