| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently some clients lack of non-ASCII characters support. This patch
introduces 2 functions (strutils.py) that will help clients and servers
to "safely" encode and decode strings.
About the ensure_(str|unicode) functions:
They both try to use first the encoding used in stdin (or python's
default encoding if that's None) and fallback to utf-8 if those
encodings fail to decode a given text.
Neither of them will try to encode / decode non-basestring objects
and will raise a TypeError if one is passed.
Use case:
This is currently being used in glanceclient. I5c3ea93a716edfe284d19f6291d4e36028f91eb2
Needed For:
* Bug 1061156
* Bug 1130572
Change-Id: I78960dfdb6159fd600a6f5e5551ab5d5a3366ab5
|
|\ \ \ \ |
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Moves DB exceptions that can be shared between DB implementations into
their own module.
Adds DBDeadlock() exception wrapping. Nova has its own code for
determining Deadlock and it's better to consolidate it with
DBDuplicateKey checking.
Change-Id: I108bd0da2a14d62e460a997b1472f0b65bfc9b95
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When using rabbit's mirrored queues or qpid's replicated queues, there
are conditions under which you can receive the same message twice.
One such condition is where a message has been sent to a consumer but
before an ack is received by a consumer, the master fails over to a
slave and the slave resends the message. Note that the consumer may have
sent the ack, but it was lost as the master went down.
Dispatching the same message twice is obviously something we want to
avoid. In order to do so, we add a unique_id to each message sent and
have consumers maintain a fixed length queue of recently seen unique
message IDs. Before dispatching any received message, the queue is
checked and the message is skipped if it is a duplicate.
Fixes bugs 1107064.
Change-Id: I5bfacadbdf7de8b34d6370b9aa869c271957692d
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts Ib0260a0c62e3d312d2e3448a125bed64d861319e (commit a603678)
The issue we're trying to fix here is bug #1107064 - when using mirrored
queues with AMQP, acks can be lost while a master is failing over to a
slace causing the new slave to re-send messages which had previously
been acked.
The "replay detection" code applies to more than just amqp and also has
the appearance of a security measure (e.g. the use of the term 'nonce')
when clearly it serves no security purpose until we actually have
message signing.
Revert the "replay detection" approach in favour of the more targetted
amqp bugfix.
Change-Id: I8b8d15835c8b4c85cd388f5df08b60ff4c74e38d
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes bug 1128605
The dbpool code in sqlalchemy session is the wrong place to implement
thread pooling as it wraps each individual SQL call to run in its own
thread. When combined with SQL server locking, all threads can be eaten
waiting on locks with none available to run a 'COMMIT'.
The correct place to do thread pooling is around each DB API call.
This patch removes dbpool from sqlalchemy and creates a common DB API
loader for all openstack projects which implements the following
configuration options:
db_backend: Full path to DB API backend module (or a known short name if
a project chooses to implement a mapping)
dbapi_use_tpool: True or False whether to use thread pooling around all
DB API calls.
DB backend modules must implement a 'get_backend()' method.
Example usage for nova/db/api.py would be:
"""
from nova.openstack.common.db import api as db_api
_KNOWN_BACKENDS = {'sqlalchemy': 'nova.db.sqlalchemy.api'}
IMPL = db_api.DBAPI(backend_mapping=_KNOWN_BACKENDS)
"""
NOTE: Enabling thread pooling will be broken until this issue is
resolved in eventlet _OR_ until we modify our eventlet.monkey_patch()
calls to include 'thread=False':
https://bitbucket.org/eventlet/eventlet/issue/137/
Change-Id: Idf14563ea07cf8ccf2a77b3f53659d8528927fc7
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Direct messages were being stripped of the host
value when performing IPC forwarding. This caused
direct topics to be round-robined to all
services running on the system consuming from
the same base topic name.
i.e. if 'scheduler.host1' and 'scheduler.host2'
were running on the SAME machine, messages to
'scheduler.host1' may have been routed to
'scheduler.host2'.
Now, mulitple processing specifying different
rpc_zmq_host parameters will consume on
separate direct topics and will not
round-robin to other processes.
Adds a zmq-specific test to ensure that messages to
directed topics are not consumed by other
consumers of direct topics sharing a bare
topic on the same host.
Fixes bug 1123715
Change-Id: I939c24397e58492fc16561666aed3ca891325e9c
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Bumps the envelope revision to 2.1
Change-Id: Ib0260a0c62e3d312d2e3448a125bed64d861319e
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This patch began as a set
of tests verifying the functionality of
sending and receiving RPC envelopes when
using impl_zmq. It was discovered that
when enabled, RPC envelopes were not
actually working,
The ZeroMQ driver includes its own envelopes.
This patch introduce versioning to that
envelope, eliminating the previously reserved
'style' field.
A new iteration of the zeromq-envelope is
introduced, 'impl_zmq_v2'. It specifies
that the zeromq-envelope should be followed
by an unpacked array representing key value
pairs of the standard RPC Envelope.
Because the key-values of the RPC Envelope
can be successfully transformed with bytes(),
this prevents the need to double-serialize
the content traversing the message bus.
Also removes some unused imports.
Closes bug 1123709
Closes bug 1055446
Change-Id: Ib04e3d092c9596146f1048d3502ac248496d313b
|
|\ \ \ \
| |/ / /
|/| | | |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Implements blueprint cfg-filter-view
At the moment, if a module requires a configuration option from another
module, we do:
CONF.import_opt('source.module', 'option_name')
but, in fact, all options from the imported module are available for
use.
The new ConfigFilter class makes it possible to enforce which options
are available within a module e.g. with
CONF = cfgfilter.ConfigFilter(cfg.CONF)
CONF.import_opt('foo', 'source.module')
CONF.register_opt(StrOpt('bar'))
then the foo and bar options would be the only options available via
this CONF object while still being available via the global cfg.CONF
object.
Change-Id: Ie3aa2cd090a626da8afd27ecb78853cbf279bc8b
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For AMQP based RPC, specifically RabbitMQ and Qpid, this change replaces the
dynamically created RPC call reply queue with a single queue that is created
on the first RPC call and used on all subsequent calls. It provides backward
compatibility on the callee side by recognizing downlevel callers and on the
caller side by adding a config option to revert to the old dynamically
created queue based upon the msg_id.
Change-Id: Idb09a71472866bd3950f58d4f7f45a3181eb40fc
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.1b3 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.
Remove the 'deps = pep8==1.3.3' and 'deps = pyflakes' from tox.ini as
it means all the other deps get installed with easy_install which can't
install oslo-config from the URL.
Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In common setup the check for the .git directory is too
restrictive. Instead of checking that it is a directory just
check to see if it exists. That way if the project is part
of a submodule it will continue to work correctly.
Change-Id: If6b6531ab5778ac17537e3f18bde1844620c8316
Fixes: bug 1126416
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
blueprint move-listener-framework-oslo
bug 1047015
bug 1111632
Ceilometer and Quantum use private methods of the RPC connection
object to configure themselves to listen to a queue shared among a
group of workers. This change adds a public method to the RPC
connection to support this use case, without resorting to using
private API calls.
Change-Id: I3a89f1dfdcf8accca70cf305f7a31315bea093d8
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
|
|/
|
|
|
|
|
|
|
| |
* The previous test tested the funtionality of the excepthook using
subprocess.popen. We don't need to test the interpreter, just test
that our excepthook is installed and test that it functions as expected.
* Fix Bug 1124617
Change-Id: Ifd8d35b842b913003100097d917d30bf66e5cb7a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
depth of 3, but there is at least on case in Nova (Security
group Rules) which requires a depth beyond this.
https://bugs.launchpad.net/nova/+bug/1118608
Specifically security_group_rule_get_by_security_group
returns a set of rules which have the structure:
rule -> grantee_group -> Instance -> Instance_type
Rather than just bumping the depth limit, which might break some
other user of to_primitive we make it a specific parameter that
defaults to the current value but can be over-ridden when
required and log a warning when the depth is exceeded
Change-Id: I1eaebd484e20cb2eae09a693289709973de9943c
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The matchmaker should return the correct
direct topics used by the RPC driver. The
LocalhostMatchMaker was always returning
'localhost', even though our tests might
use '127.0.0.1' instead. Now, the
LocalhostMatchmaker will use whatever
value it is told should be considered local.
MatchMakerLocalhost and LocalhostExchange
now take an optional host parameter.
impl_zmq._get_matchmaker now passes arguments to
the selected matchmaker module.
The test_zmq now initializes the matchmaker, using
the host '127.0.0.1'
Change-Id: I8daa2c0668f1d717eb95ab56009612b8b60f0a15
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Created import_group method in cfg.py
Added testcases
Fixes bug #1107843
Change-Id: I427d4069dacbb6e586687370adbb08b5d50f7b63
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Exchanges in the matchmaker are supposed
to return a directed topic as the first
element in returned tuples.
Adds a test to ensure this is so.
Change-Id: I6c62f325914faa19216d5362c6d8ed0288942110
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In preparation for having nova.db.api not return any sqlalchemy objects.
nova.db.api will return only primitives, except for datetime.datetime
objects.
Uses functools.partial to make code DRYING
Partially implements bp db-api-cleanup
Change-Id: I9980d8c4e20b05bbe734cf90ac209e4e7e89befb
|
| | |
| | |
| | |
| | |
| | |
| | | |
This is a common pattern we've adopted elsewhere, so use it here too.
Change-Id: I2e0947b4857005b478e796e9c9a7c05ea1f0d926
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fairly lame to do this instead of just fixing update.py, but we
seem to do it this way everywhere else, so ...
Change-Id: Ie1cebcfec57c6138b9b726d7d3bc6e0ea456f146
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The use of the base exception does nothing for the test but means
the "dead module walking" exception module.
Change-Id: Ibd7bb8aa526be366f005ab5e12fd4da89a976c57
|
| | |
| | |
| | |
| | | |
Change-Id: I0b3c7341e91cfc57aed625754bc9bf009ef70b14
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since this only contains exceptions that are either used in session.py
or utils.py (not both), it seems sensible to move them into the modules
where they are used.
Also, remove the use of the Invalid base exception class since we don't
seem to be making use of the base class anywhere by catching it rather
than the more specialized exceptions.
Change-Id: Ib05bb2e0a9494e1dc60c60b8eee0e76b5d2ee555
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We should add wrap_db_error for Session.execute() method, because
Query.update() method will call Session.execute() and it is not inside
Session.flush(), so exceptions from Query.update() wouldn't be wrapped.
Add test for Session.flush() wrapper
Add test for Session.execute() wrapper
Fixes bug 1107890
Change-Id: I96894e502f9f279999b61a1e66469e34a07a022d
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a follow-up to Doug suggestion at
https://review.openstack.org/#/c/20323/2/openstack/common/timeutils.py
Change-Id: Ic318202234202e56054df1b5cc7f82a404c307bc
Signed-off-by: Julien Danjou <julien@danjou.info>
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch will log a warning every time a RPC call is made while
a lock is held if the caller has requested it. This should help us
track down performance problems such as the security group refresh
problem recently found in nova.
RPC calls can emit a warning if called with check_for_lock=True
and debugging is turned on.
Sneaks up on bug 1063222.
Change-Id: Ice94093efb3cb95dd58b31d6ba817c7d505c15af
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bring in session, base model, utilities, and tests for sqlalchemy
from Nova.
Add sqlalchemy to pip-requires and and python-mysql to test-requires.
Partially implements blueprint common-db
Change-Id: I3e0065cdac87e10c4e0742d66c293c72bb3acbb2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Enable wsgi.Service to listen on ipv6 address by checking
if the host specified is ipv6. Based on that set the
appropriate family in the eventlet.listen api
More tests for just the ipv6, ipv6 with app, ipv6+ssl with app
to make sure everything is working fine
Change-Id: I2772905128bdbc69dd0fafe4ced848f5c477d7c8
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Enable support for SSL as well using code from glance. We
have some new options for configuring the SSL support.
test_app starts wsgi.Service with a test app, then creates
a url to make sure the http requests are actually served
properly
test_app_using_router adds wsgi.Router and Mapper() to the
mix along with using the wsgify annotation for serving
the http requests
Fixes LP# 979488 (partial)
Fixes LP# 869884 (partial)
DocImpact
Change-Id: Iae47b13b50e00c102c8c36f4a3e73b24fa4e6303
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a new global variable to control when exception format errors
are fatal.
Also, updates the Oslo test base class to enable fatal exception
format errors.
The motivation for this change is to give projects that use
openstack common a hook to enable exception format checking when
testing.
Change-Id: Id8f4a0946b1614c8e987976b79069532a2e8608f
|
|/
|
|
|
|
|
|
| |
Test write_git_changelog, generate_authors, get_cmdclass, and
parse_dependency_links. Also test private _run_shell_command
function.
Change-Id: I583d679afc1dc805c920b4beffc2f664833aabd0
|
|
|
|
|
|
|
|
|
|
| |
This patch sets a TTL derived from the timeout parameter used
when invoking the RPC.
Needed for:
* Bug 1053614
Change-Id: Idaf9a2a972feac3f95f170c52632033b027b4414
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The scheme of incrementing port numbers did not work so well for
parallel test runs.
Part of blueprint grizzly-testtools.
Change-Id: I100e79ae79e4409691145dc721139d1a86839199
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Using the BaseTestCase across the tests in the tree lets us put in log
fixtures and consistently handle mox and stubout.
Part of blueprint grizzly-testtools.
Change-Id: Iba7eb2c63b0c514009b2c28e5930b27726a147b0
|
|\| |
|