summaryrefslogtreecommitdiffstats
path: root/nova/rpc
Commit message (Collapse)AuthorAgeFilesLines
* Use rpc from openstack-common.Russell Bryant2012-06-2010-3745/+0
| | | | | | | | Final patch for blueprint common-rpc. This patch removes nova.rpc in favor of the copy in openstack-common. Change-Id: I9c2f6bdbe8cd0c44417f75284131dbf3c126d1dd
* Merge "Add missing ack to impl_qpid."Jenkins2012-06-141-1/+6
|\
| * Add missing ack to impl_qpid.Russell Bryant2012-06-131-1/+6
| | | | | | | | | | | | | | | | | | | | | | Fix bug 1012374. Johannes Erdfelt pointed out that impl_qpid wasn't acking messages that it received. This turned out to be a nasty oversight, resulting in unbounded message queue growth inside of the python-qpid library. This fixes it. Change-Id: I0370293807f0282e1dbdd59246f70be031e888a9
* | Log warnings instead of full exceptions for AMQP reconnects.Josh Kearney2012-06-131-1/+1
|/ | | | | | Fixes bug 1010147. Change-Id: I1af7614330307dfdf5c723710334a168bc30b50f
* Resolve unittest error in rpc/impl_zmqZhongyue Luo2012-06-081-1/+1
| | | | | | | | Fixes bug #1010376 Remove ensure_ascii=True from dumps function. Change-Id: Ifb2f12371d3262a5765e4434178621d401e8c610
* Replace standard json module with openstack.common.jsonutilsZhongyue Luo2012-06-073-8/+8
| | | | | | | | | | | Implements blueprint use-common-jsonutils 1. Edit openstack-common.conf and import nova/openstack/common/jsonutils.py 2. Remove json package imports and replace with jsonutils Places where using json.load hasn't changed. Change-Id: Ie6feab605fb0474fd505c56ef57b7a9ecfa5269d
* Merge "Unused imports cleanup (folsom-2)"Jenkins2012-06-061-2/+0
|\
| * Unused imports cleanup (folsom-2)Zhongyue Luo2012-06-031-2/+0
| | | | | | | | | | | | Fixes bug #1008023 Change-Id: Ifb8ecbb7430fdabd7b5d81ab23df66942abd9cb7
* | Add zeromq driver. Implements blueprint zeromq-rpc-driverEric Windisch2012-06-062-0/+717
| | | | | | | | Change-Id: I7d941a97bf250428e70e8a4ee65ab6cb70fdfcfb
* | Merge "Finally ack consumed message"Jenkins2012-06-051-1/+2
|\ \
| * | Finally ack consumed messageHengqing Hu2012-06-051-1/+2
| | | | | | | | | | | | | | | | | | To avoid bad messages fill up the queue. Change-Id: Id57ff33cfcacf698f89fa7f1020c0c887ebe14ed
* | | Use openstack.common.cfg.CONF.Russell Bryant2012-06-044-29/+14
|/ / | | | | | | | | | | | | | | | | | | | | | | Part of blueprint common-rpc. This patch makes the rpc code use the global config object from openstack-common. Based on some recent discussions on the mailing list, this may not be the final way configuration handling is done here, but it is certainly better than the register_opts() hack that is removed by this patch. Change-Id: Id128126e0bc064a2a1c710c6bd32fb3d137dc7f6
* / Add a comment to rpc.queue_get_for().Russell Bryant2012-06-011-1/+14
|/ | | | | | | | | | Part of blueprint common-rpc. Add a comment to the rpc.queue_get_for() function that notes that this is simply a naming convention and is dependent on how queues are set up on the consumer side. Change-Id: Ifa7d648e9b33ad2416236dc6966527c257baaf88
* Merge "Implement blueprint host-topic-matchmaking"Jenkins2012-05-311-0/+257
|\
| * Implement blueprint host-topic-matchmakingEric Windisch2012-05-311-0/+257
| | | | | | | | Change-Id: I382b731bbc64e92db9d06f4e9ee497b1cc0f7d26
* | Don't deepcopy RpcContextChris Behrens2012-05-313-1/+17
|/ | | | | | | | | | Instead of deepcopying the RpcContext, which seems to not work sometimes, we'll explicitly create a new instance of the class and deepcopy the required values. Fixes bug 1007043 Change-Id: I6578c4c82046acf149724a1c5985fa6b46857a7c
* Merge "Move queue_get_for() from db to rpc."Jenkins2012-05-311-0/+5
|\
| * Move queue_get_for() from db to rpc.Russell Bryant2012-05-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Part of blueprint common-rpc. The function queue_get_for() is a utility function used by various consumers of the rpc API. This function lived in the db API, but never ended up using anything from the database. This patch moves it into the rpc API so that it can be used by other users of rpc once it moves into openstack-common. Change-Id: If92675beecff5471b416a929c161b810e3c71939
* | Merge "Fix the conf argument to get_connection_pool()."Jenkins2012-05-302-4/+4
|\ \ | |/ |/|
| * Fix the conf argument to get_connection_pool().Doug Hellmann2012-05-302-4/+4
| | | | | | | | | | | | | | The first argument to amqp.get_connection_pool() should be a global config object, not the Connection. Change-Id: Ic0b8f32ea42bdebdd883175a1351b3a52f26942d
* | Merge "New RPC tests, docstring fixes."Jenkins2012-05-301-1/+2
|\ \
| * | New RPC tests, docstring fixes.Eric Windisch2012-05-301-1/+2
| |/ | | | | | | | | | | | | Also fixes versioning problem in impl_fake Makes topics configurable by RPC test suites. Change-Id: I2c7b2413b8e642e7ac1e82d54c052b97d6149659
* | Merge changes I17ca4b69,I9e6ec0d2Jenkins2012-05-304-11/+53
|\ \ | | | | | | | | | | | | | | | * changes: Remove nova.log usage from nova.rpc. Remove nova.context dependency from nova.rpc
| * | Remove nova.log usage from nova.rpc.Russell Bryant2012-05-263-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of blueprint common-rpc. This patch removes the usage of nova.log from nova.rpc. This is necessary before nova.rpc can be moved to openstack-common. The rpc logging was not using any of the extra features provided in nova.log as far as I can tell, so the changes are very simple. This is the final dependency. After this change, the rpc code can be moved to openstack-common without any changes. Change-Id: I17ca4b691bb8d4f18e618632a2381dd12d31852a
| * | Remove nova.context dependency from nova.rpcRussell Bryant2012-05-263-8/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | Part of blueprint common-rpc. This patch removes the usage of nova.context from nova.rpc. Everything needed to implement RpcContext now exists within nova.rpc. Change-Id: I9e6ec0d22e55d3d4f38e12e0fdd2df745da496f5
* | | Merge "Localize rpc options to rpc code."Jenkins2012-05-302-0/+39
|\| |
| * | Localize rpc options to rpc code.Russell Bryant2012-05-252-0/+39
| |/ | | | | | | | | | | | | | | | | Part of blueprint common-rpc. Move rpc options from nova.flags into nova.rpc code. This is necessary before the rpc code can be moved to openstack-common. Change-Id: I474c3660e1cbd3ab663571b1e088c84deb905e0b
* / Grammar fixes.Matt Joyce2012-05-291-7/+8
|/ | | | Change-Id: Iff3f5765193e0bc98dfc377ee5a9b6f47ae11859
* add queue name argument to TopicConsumerDoug Hellmann2012-05-244-16/+70
| | | | | | | | | | | | | | ceilometer is going to want to subscribe several worker processes to the notifications.info topic queue. The pool of workers needs to be assured of receiving all messages, without interference from other clients listening for notifications. The TopicConsumer class always assumes the topic and queue name should be the same, but in the ceilometer case we want to use a separate named queue with a different name. The only parameter that cannot be controlled by the user of TopicConsumer is the queue name, so this change adds the ability to set the queue name. Change-Id: I41a525de2fd855ca30c24fafcfbfefd6ab615dd7
* Merge "fixes bug 999206"Jenkins2012-05-231-1/+1
|\
| * fixes bug 999206Yun Mao2012-05-141-1/+1
| | | | | | | | | | | | override the __unicode__() method too for python 2.6 Change-Id: Iec76c49585e29071415d937861e94d14ff22cc04
* | Add base support for rpc API versioning.Russell Bryant2012-05-176-13/+294
| | | | | | | | | | | | | | | | | | | | | | | | Part of blueprint versioned-rpc-apis. This commit includes the base support for versioned RPC APIs. It introduces the RpcProxy and RpcDispatcher classes that have common code for handling versioning on the client and server sides, respectively. RPC APIs will be converted one at a time using this infrastructure. Change-Id: I07bd82e9ff60c356123950e466caaffdfce79eba
* | Misused and not used config optionsZhongyue Luo2012-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug #1000071 [nova.flag.py] stub_network: StrOpt -> BoolOpt [nova.api.sizelimit.py] osapi_max_request_body_size: BoolOpt -> IntOpt [nova.compute.api.py] find_host_timeout: not used [nova.rpc.__init__.py] allowed_rpc_exception_modules: IntOpt -> ListOpt [nova.virt.vmwareapi_conn.py] vmwareapi_api_retry_count: FloatOpt -> IntOpt [nova.volume.driver.py] num_shell_tries: StrOpt -> IntOpt num_iscsi_scan_tries: StrOpt -> IntOpt [nova.volume.driver.py] san_thin_provision: 'true' -> True san_is_local: 'false' -> False Change-Id: I07ab60b1d881c9475f4f2517a432f1e934d8ae52
* | Stop using nova.exception from nova.rpc.Russell Bryant2012-05-152-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a part of continuing to remove dependencies from nova.rpc on the rest of nova. One RPC related exception was defined in nova.exception, so that was moved to nova.rpc.common where the rest of them live. These exceptions were changed to no longer use NovaException as their base. Instead, there is a new RPCException base. One other change that should be reviewed closely is the removal of using nova.exception.wrap_exception() in nova.rpc.amqp. As far as I can tell, this didn't actually do anything since nothing was being passed in to wrap_exception(). Change-Id: I36ff7c05ab0467ad8506b56d561c532eadf8dff8
* | Make use of openstack.common.jsonutils.Russell Bryant2012-05-151-3/+3
| | | | | | | | | | | | | | | | | | This patch imports jsonutils from openstack-common. It removes the equivalent code from nova.utils and then converts the code base to use jsonutils. The primary motivator for this change was to remove the rest of the dependencies from nova.rpc on nova.utils. Change-Id: If43658b9b098ed56cba018c81be268b8c3e2916a
* | Alphabetize importsJoe Gordon2012-05-142-2/+2
|/ | | | | | | Except for nova/api/, nova/tests/, nova/virt/ In preparation for automated checking being enabled (N306) Change-Id: I5af70ea13b470ce58695ef0a5e0ff9da3ac1b135
* pylint cleanupJoe Gordon2012-05-071-3/+0
| | | | | | Mostly remove unused imports Change-Id: Icdb3ec77537b2568f4e85843bab89eb63cd17d8e
* Use save_and_reraise_exception() from common.Russell Bryant2012-05-021-2/+3
| | | | | | | | | | | | This patch common.excutils from openstack-common, which includes save_and_reraise_exception(). The patch also converts the code base to use it from there instead of nova.utils and then removes it from nova.utils. The initial motivation for this was removing another nova dependency from nova.rpc so that it can eventually be moved to openstack-common. Change-Id: I7354ca51a02aec9c709cf33f77d4abc46acc2742
* Merge "Use openstack.common.importutils."Jenkins2012-04-302-4/+4
|\
| * Use openstack.common.importutils.Russell Bryant2012-04-282-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use import_class(), import_object(), and import_module() from openstack-common's importutils module. The equivalent functions have been removed from nova.utils. A few modules had import order cleaned up in passing, as well. My initial motivation for this was to remove some more usage of nova bits from nova.rpc as another step towards being able to move nova.rpc import openstack-common. Since I was pulling importutils into nova, I went ahead and converted the whole thing. Change-Id: I7c7786cf0001bcd06db52b9a99ff4284a3f6c6fa
* | Remove unnecessary return statementsJohannes Erdfelt2012-04-301-1/+0
|/ | | | | | | If they're at the end of a function/method and don't return a value, then it's superfluous Change-Id: Ibd8d43a15ee83cf51c5b7cea0b1cb6ea13d1357d
* Refactor nova.rpc config handling.Russell Bryant2012-04-256-213/+252
| | | | | | | | | | | | | | | | | | | | This patch does a couple of things: 1) Remove the dependency of nova.rpc on nova.flags. This is a step toward decoupling nova.rpc from the rest of nova so that it can be moved to openstack-common. 2) Refactor nova.rpc so that a configuration object is passed around as needed instead of depending on nova.flags.FLAGS. This was done by avoiding changing the nova.rpc API as much as possible so that existing usage of nova.rpc would not have to be touched. So, instead, a config object gets registered, cached, and then passed into the rpc implementations as needed. Getting rid of this global config reference in nova.rpc will require changing the public API and I wanted to avoid doing that until there was a better reason than this. Change-Id: I9a7fa67bd12ced877c83e48e31f5ef7263be6815
* Don't leak RPC connections on timeouts or other exceptionsChris Behrens2012-04-251-1/+6
| | | | | | Fixes bug 968843 Change-Id: I9e0f1e306cab203bf4c865050b7a45f96127062e
* Set a more reasonable default RPC thread pool sizeJohannes Erdfelt2012-04-251-1/+1
| | | | | | | | No service should be doing over 1000 different tasks at once. It can only possibly end up overloading other dependent services. 64 should be a more reasonable starting point. Change-Id: I7690ad4a9cfc5ee11e1990d5cecdf23522f11f72
* Log more information when sending notificationsJohannes Erdfelt2012-04-121-1/+2
| | | | | | | For debugging purposes, it's useful to see what event type is being sent and not just where it's being sent Change-Id: I809a15a76204c79d37ed68b649cd2aea80ad3db2
* Merge "Add the serialization of exceptions for RPC calls."Jenkins2012-04-103-15/+87
|\
| * Add the serialization of exceptions for RPC calls.Alex Meade2012-04-063-15/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change uses json to serialize an exception so that it can be sent through RPC calls to be reconstructed on the other side. The traceback is added to the exception message. If recreating the exception fails for whatever reason then a RemoteError is created containing all of the exception information. Adds flag 'allowed_rpc_exception_modules' to prevent dangerous modules from being accessed and allowing arbitrary code to be run. Fixes bug 920705 Fixes bug 940500 Change-Id: Ife3b64b19fe8abbc730184d4ee7d9fcabfd29db3
* | Improved localization testing.Yuriy Taraday2012-04-102-4/+4
| | | | | | | | | | | | Moved localization tests to tools/hacking.py. Change-Id: I903b90dfb09a46a72b1c64c30301f90661999f5b
* | Use thread local storage from openstack.common.Russell Bryant2012-04-041-1/+1
|/ | | | | | | | | | nova.local was recently added to openstack-common. Remove nova.local and use openstack.common.local instead. One benefit of this change is that it is another step toward decoupling nova.rpc from the rest of nova. Change-Id: I0240f4291a81f8390d3f329a11f207a1453d7cab
* Remove nova.rpc.impl_carrot.Russell Bryant2012-04-021-684/+0
| | | | | | | | | | | | This module was marked as deprecated and scheduled for removal in Essex. Remove it now that Folsom development is open. nova.rpc.impl_kombu should be used instead. This patch also removes nova.testing.fake.rabbit, since as far as I can tell, it isn't used anymore and was the last thing still using the carrot dependency. Change-Id: I8cfb2d09ee5eed439ec1d152261f7097faf08ad6