summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge "Support qpid unit tests."Jenkins2013-02-251-0/+1
|\ \ \ \ \
| * | | | | Support qpid unit tests.Russell Bryant2013-02-251-0/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qpid unit tests have never been run by default because qpid is not on pypi. I filed a bug asking the qpid project to support it: https://issues.apache.org/jira/browse/QPID-4539 Until that happens, I uploaded a package to pypi myself. https://pypi.python.org/pypi/qpid-python Fix bug 1061055. Change-Id: I2d52ff383b6393f34e94c25f959dccda5a7571de
* | | | | Merge "Clean up sqlalchemy exception code"Jenkins2013-02-253-40/+90
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Clean up sqlalchemy exception codeChris Behrens2013-02-223-40/+90
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / | | AMQP: skip duplicate messagesKei Masumoto2013-02-223-0/+82
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Fix "Needs to specify pyzmq version"Kei Masumoto2013-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | "pyzmq13.0.0" described as "pyzmq>=2.1.11" causes unit test error. Specifying correct version is necessary. Change-Id: Icb7acb0eb4d59a456999ba477e087d825be8dd4b
* | | Merge "Revert "Implement replay detection.""Jenkins2013-02-213-99/+22
|\ \ \
| * | | Revert "Implement replay detection."Mark McLoughlin2013-02-203-99/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Don't s/oslo/base/ for files in the rpc lib."Jenkins2013-02-211-1/+2
|\ \ \ \
| * | | | Don't s/oslo/base/ for files in the rpc lib.Russell Bryant2013-02-201-1/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | This breaks some message envelope handling code and is not needed for any of the source files in rpc/, so just avoid it. Change-Id: I8519568be5102a5890ae5ed046d6fcebe9bbb198
* / / / Revert "Fast serialization of RPC envelopes for Kombu"Russell Bryant2013-02-201-26/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 22c497097b0d0bd461be40a7a03290aa0b4179f2. I'm not convinced that this isn't just a micro-optimization when compared to the rest of the work that a given OpenStack service performs as the result of these messages. The implementation is also problematic. It depends on using a '\0' byte as a separator and assumes that '\0' will not exist anywhere else in the message. This seems to be asking for trouble. If future data could ever have a '\0' in it, this will be broken. Further, if a user could get a '\0' in a message directly with user-supplied input, this could result in a security vulnerability. Lastly, this has a significant impact on consumers of notifications that are outside of OpenStack code, which have been the primary use case of notifications (Ceilometer is changing that to a degree). I don't think consumers of notifications should have to implement this deserialization method. Change-Id: Ib3163ca98f568bf9f789d4b64bcc6d72e0fcb459
* | | Merge "Move DB thread pooling to DB API loader"Jenkins2013-02-204-75/+188
|\ \ \
| * | | Move DB thread pooling to DB API loaderChris Behrens2013-02-184-75/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | readd update.sh to address bootstrapping issueSean Dague2013-02-201-0/+14
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | Provide an easy way to people to run the update script even in a brand new oslo-incubator tree. (fix spelling error) Change-Id: I8c8f6e1d2d988ca0fffa79a7d8e9a67cf8311e7f
* | | Merge "Fix IPC direct topic routing."Jenkins2013-02-203-14/+32
|\ \ \
| * | | Fix IPC direct topic routing.Eric Windisch2013-02-193-14/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Setup exception handler after configuring logging.Vishvananda Ishaya2013-02-191-7/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently set up the exc handler before we configure logging. This means that an error in the setup will try to raise an exception which will then fail to log properly because we haven't set up handlers properly yet. Therefore, simply rely on the default exception handler during setup and setup our exception handler immediately after logging is configured. Fixes bug 1130464 Change-Id: I4b80c646a7d7d5048c8fbadc67dbb9f607d2af69
* | | Merge "Fix "DirectConsumer needs mirrored queue support""Jenkins2013-02-201-0/+1
|\ \ \
| * | | Fix "DirectConsumer needs mirrored queue support"Kei Masumoto2013-02-131-0/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | Currently TopicCosumer and FanoutConsumer can be used Mirrored Queue support, but not DirectConsumer. This patch fix this issue. Fix bug 1124162 Change-Id: I68ae23467ae810ce0ec917a4cb34a488283f401c
* | | Merge "Fast serialization of RPC envelopes for Kombu"Jenkins2013-02-201-2/+26
|\ \ \
| * | | Fast serialization of RPC envelopes for KombuEric Windisch2013-02-191-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By flattening the dictionary and turning it into a fast-serialized string, we save ourselves from Kombu's very slow JSON serialization routines. Change-Id: I64796265c7cc89a05406faabd8d7b253fe3b8acb
* | | | Merge "Implement replay detection."Jenkins2013-02-203-22/+99
|\ \ \ \
| * | | | Implement replay detection.Eric Windisch2013-02-193-22/+99
| |/ / / | | | | | | | | | | | | | | | | | | | | Bumps the envelope revision to 2.1 Change-Id: Ib0260a0c62e3d312d2e3448a125bed64d861319e
* | | | Merge "Avoid using cfg in install_venv_common"Jenkins2013-02-201-20/+7
|\ \ \ \
| * | | | Avoid using cfg in install_venv_commonMark McLoughlin2013-02-191-20/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several people have complained that requiring oslo-config to be installed in order to run install_venv seems like a chicken and egg problem. We're only using cfg for a boolean CLI option which is way overkill. The truth is that cfg is really only interesting if you want to process options from both the command line and configuration files. Clearly that's not the case here. Just use argparse instead of cfg. Change-Id: Ib602686b554c3548f4be3d4a69d128c5fef7e8cf
* | | | | Merge "Add function for listing native threads to eventlet backdoor"Jenkins2013-02-191-0/+8
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Add function for listing native threads to eventlet backdoorDaniel P. Berrange2013-02-181-0/+8
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The eventlet backdoor has a 'pgt' function for listing green threads and their stack traces. This adds a new 'pnt' function for doing the same with native threads. Change-Id: If6dcfd8dde61c96adfc6e052e5ec7db82914cd55 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* | | | Support RPC envelopes in impl_zmqEric Windisch2013-02-192-28/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Add ConfigFilter wrapper class"Jenkins2013-02-195-0/+423
|\ \ \ \ | |_|/ / |/| | |
| * | | Add ConfigFilter wrapper classMark McLoughlin2013-02-185-0/+423
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | blueprint amqp-rpc-fast-reply-queueRaymond Pekowski2013-02-184-81/+517
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / / Make update.py work with oslo.configDoug Hellmann2013-02-181-0/+9
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | As we move modules out of openstack.common into the oslo namespace package, we need to prevent update.py from breaking any import statements using them. Rather than build a super complicated regex to only detect the proper instances of "oslo" to replace in places like the defaults for option settings, just do the simple translation between oslo -> base and then go back and fix the modules we know have been moved. Change-Id: I9686b94b4c7df8542964b30ba15f0a91d2b3d722 Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
* | Merge "Bump eventlet to 0.12.0"Jenkins2013-02-181-1/+1
|\ \
| * | Bump eventlet to 0.12.0Eric Windisch2013-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This version has important fixes required for ZeroMQ (spurious wakeups). Fixes bug 1065532. Change-Id: I16b9220db1f5bf16a24644887963ce18e4e5ecbd
* | | Use oslo-config-2013.1b3Mark McLoughlin2013-02-1747-3858/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Change the check for the existence of .git directory.Robert Myers2013-02-152-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | returncode for Popen is valid only after communicate callDavanum Srinivas2013-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Found when testing a bug in cinder (1125416), code relying on throw_on_error won't work because returncode is None if checked before the communicate() method is called Change-Id: I8c9dd00396346ec3ad7bbe1dc17643c385da8d6f
* | | Merge "Fix Lack of reconnecting operation when using rabbitmq mirrored queue"Jenkins2013-02-141-1/+2
|\ \ \
| * | | Fix Lack of reconnecting operation when using rabbitmq mirrored queueKei Masumoto2013-02-131-1/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | On using Mirrored Queue feature in impl_kombu.py, there is a case that messages are lost because amqp client does not handle exceptions properly when rabbitmq is dead on the way to wait return value of call(). This patch fix this and enables ampq client reconnecting slave rabbitmq. Fixes bug 1102051 Change-Id: Ia7a1b9067f7ea4639195a1548de29e0364368e51
* | | Merge "Cleanup docstring and print in install_venv_common"Jenkins2013-02-141-2/+2
|\ \ \
| * | | Cleanup docstring and print in install_venv_commonMatthew Treinish2013-02-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit cleans up usage in the docstring for: run_command_with_code() to be more explicit in the description of where the commands are being run. It also updates the prints to be consistent in the usage of venv vs virtualenv. These changes were recommended in the review for change: I68fe3449ed0fcc7fdfb84af2dcc77a39ebde7f01 Change-Id: I3cdb3d991503446d37c8fa6a3547585a4f8beb6a
* | | | Merge "Add join_consumer_pool() to RPC connections"Jenkins2013-02-147-8/+188
|\ \ \ \
| * | | | Add join_consumer_pool() to RPC connectionsDoug Hellmann2013-02-137-8/+188
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge "Cleanup imports"Jenkins2013-02-141-3/+0
|\ \ \ \
| * | | | Cleanup importsEric Windisch2013-02-141-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bringing this into Nova, I found that it failed their pep8 checks (which are NOT ignored for the oslo imported binaries) Change-Id: I4fb7e32bc7e83faf4131302a06c4d9c2c16cab70
* | | | | Merge "Rename oslo-zmq-receiver to oslo-rpc-zmq-receiver"Jenkins2013-02-141-0/+0
|\| | | |
| * | | | Rename oslo-zmq-receiver to oslo-rpc-zmq-receiverEric Windisch2013-02-141-0/+0
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Would not copy without the name change. Also, this will result in this file maintaining its name in nova, where it already exists. Change-Id: Ic204be899921ce63b769194474c31e1640391197
* | | | Don't use subprocess for testing excepthookJason Kölker2013-02-131-18/+18
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | * 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
* | | Merge "sort options to make --help output prettier"Jenkins2013-02-131-1/+1
|\ \ \
| * | | sort options to make --help output prettierYAMAMOTO Takashi2013-02-131-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | explicitly sort options when adding them to argparse. it's a bit silly to print them in a dict iteration order. Change-Id: Id508331d7ee3b24e76be7fa958d27d29905bd3d2 Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>