summaryrefslogtreecommitdiffstats
path: root/openstack/common/rpc
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge "Fixes import order"Jenkins2012-11-291-1/+1
|\ \ | |/ |/|
| * Fixes import orderZhongyue Luo2012-11-281-1/+1
| | | | | | | | | | | | Rearranged import order of openstack.common.rpc.matchmaker Change-Id: I034a96e459763910adf51dc8f6642d6485208732
* | Make project pyflakes clean.Monty Taylor2012-11-283-6/+7
|/ | | | | | | | | | | | | Added both a tox test-env for pyflakes and fixed the current pyflakes errors. This did actually fix a couple of bugs. The CI team has started using pyflakes on its projects and also has started using oslo for things, so ignoring pyflakes warnings on the oslo code was starting to get old. However, additionally, pyflakes is pretty solid, so we should maybe consider gating on it across the board. (% locals() is the biggest thing that we do that it doesn't like) Change-Id: Iac1ca62db301892b7863711162fcbc74807eb24f
* Fix common rpc to use common logging instead of python loggingDavanum Srinivas2012-11-244-4/+4
| | | | | | | | Looks like we just need to fix imports Fixes Bug #1072633 Change-Id: Iac84ae3aadbe440f9b19e184f080320e4c6cca5f
* updating sphinx documentationJoe Heck2012-11-181-4/+6
| | | | | | | | | | * adding openstack theming (copied from keystone project theme) * updating .gitignore to ignore generated API docs * updated formatting in index.rst page * updaed openstack/common/processutils.py to match hacking docstring * updated docstrings to resolve sphinx warnings Change-Id: Ie89afe20eeab1efd2daf440fc65ccdf90f723c51
* Added initialize_service_hook for rpc.Service.Lianhao Lu2012-11-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | This fixes the collector part of the bug 1075463. Declaring a consumer topic on the same rpc connection after the consume thread has started would result the eventlet raise RuntimeError exception. So all the declaring work should be done before calling rpc.conn.consume_in_thread(). If the manager of a rpc.Service wants to declare topic consumers other than the default ones created by rpc.Service.start(), it could define the following hook in the manager class: def initialize_service_hook(self, service): # # Do initialization work after rpc connection is created and before # starting consuming thread. # Params: # service: handle to the rpc.Service instance. Change-Id: I80001c32ee4e51e394fed827c91ad5e1eb0f94dc
* Merge "Fix QPID reconnect issues"Jenkins2012-11-131-44/+26
|\
| * Fix QPID reconnect issuesGary Kotton2012-11-071-44/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem results from the eventlet monkey patching and the way in which qpid performs the session reconnection. The solution is to have the qpid reconnection disbaled and the common rpc code performing the reconnection. The time waiting between reconnections will be a multiple of 2 starting at 1 and a maximum of 60 seconds. This works around bug 1073999. Change-Id: I3c53211d23e4e68ed73046cb3c637662ab73b339
* | Clean up dictionary use in RPC driversDoug Hellmann2012-11-072-18/+14
|/ | | | | | | | Initialize the base dictionary before setting overrides. Do not modify the argument passed to Connection.__init__. Change-Id: I5479483509efe6966094b50af2703e566a99dace Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
* Tweak rpc.queue_get_for to deal with host=None.Russell Bryant2012-11-051-1/+1
| | | | | | | Make rpc.queue_get_for() just a tad more convenient by dealing with the case of host=None. In that case, just return the base topic. Change-Id: I2f55c2205c219df7481dd6e507caf7182622195b
* kombu's fanout_cast_to_server was calling wrong methodChris Behrens2012-11-011-1/+1
| | | | | | | | | Make it call the common amqp method fanout_cast_to_server vs cast_to_server. Fixes bug 1074113 Change-Id: If06bde93dab94c6030465a5e7ba329d8936c69e3
* Removes redundant string castZhongyue Luo2012-10-311-1/+1
| | | | | | Removes uuid.UUID.hex result string casting Change-Id: I4b0ed3ec1e4dc4a1ade149a539c5068ac154ebf7
* Merge "Use queue_arguments for fanout consumers too."Jenkins2012-10-301-0/+1
|\
| * Use queue_arguments for fanout consumers too.Sam Morrison2012-10-261-0/+1
| | | | | | | | | | | | | | | | | | | | Fixes bug 1071528 queue_arguments (currently only x-ha-policy for now) were only set for topic consumers, this adds support for rabbit HA for fanout consumers too. Change-Id: I0d5c0393b49cf249262d93a64f6348caa76ef8dd
* | Import order clean-upZhongyue Luo2012-10-291-1/+1
|/ | | | | | Reorder imports by full module path Change-Id: If619b4b50aa052401f7fa65df57b74d4ad1b65a6
* Revert "fanout subscriptions in impl_zmq"Eric Windisch2012-10-112-78/+20
| | | | | | | | | | This changed the message format without consideration for versioning. If this is resubmitted, it will be only after message versioning is introduced. This reverts commit 032bf345ea593e97fcc07e23c1725ba5f4b612d0. Change-Id: I4f4326b0ba78699b5f149cc2d2822235e9a30462
* Revert "Support declare_topic_consumer in impl_zmq"Eric Windisch2012-10-111-29/+0
| | | | | | | | | | | | Depends on reverted patch. Not used by any code or project. This was an implementation of an internal AMQP-driver method. Will determine long-term requirement or replacement for declare_topic_consumer at Grizzly sumit. This reverts commit d5095d7effe79c1dcf19a67ff03e00a454662830. Change-Id: I48883c5011ebccba3e6f987ae48bff871d016bd1
* Fix missing import of `rpc.dispatcher` in `rpc.service`Kiall Mac Innes2012-10-021-4/+5
| | | | Change-Id: I7bdd5fbff1addef4a855aa72f3551930630299f5
* Merge "Add the rpc service and delete manager"Jenkins2012-09-271-0/+69
|\
| * Add the rpc service and delete managerAngus Salkeld2012-09-261-0/+69
| | | | | | | | | | | | Part of blueprint service-infrastructure Change-Id: Ie00efcb1c974d699ac6b2a38285abef1b295f3ce
* | Add exchange_name parameter to TopicConsumerJulien Danjou2012-09-272-6/+11
| | | | | | | | | | | | | | | | | | | | | | In Ceilometer, we need to consume messages from different exchanges of type 'topic', so being able to specify the exchange name rather than using the default in TopicConsumer is necessary. This fixes bug #1055483 Change-Id: Ibbaec8496f24c0b221cf489258af1e7fe362e84a Signed-off-by: Julien Danjou <julien@danjou.info>
* | Extracted parse_host_port into network_utils.Eugene Kirpichov2012-09-261-2/+2
| | | | | | | | Change-Id: I77bcbf03a18659cfa62e99da9ba2136f8348022b
* | LOG.exception() should only be used in exception handlerJohannes Erdfelt2012-09-251-9/+10
| | | | | | | | | | | | | | When used outside of an exception handler it will print the message and then 'None', which isn't useful at all. Change-Id: If687a764dea4c7dc0046d7c3054318f2a751a2ea
* | Merge "Don't deprecate rabbit_host and rabbit_port"Jenkins2012-09-251-3/+4
|\ \
| * | Don't deprecate rabbit_host and rabbit_portMark McLoughlin2012-09-251-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where a single RabbitMQ broker node is used (rather than a cluster of nodes) it is simplest for users to just set the rabbit_host option. Often users will not need to specify a port number at all. Similarly, where a cluster is used, it is simplest for the user to just specify a list of node addresses in rabbit_hosts and assume that all nodes are listening on the port specified in rabbit_port. Change-Id: I4227541676dffc50cd6116225de0cec0afa36a41
* | | Merge "DRY up mirrored Rabbit queue declaration"Jenkins2012-09-251-5/+17
|\ \ \
| * | | DRY up mirrored Rabbit queue declarationMark McLoughlin2012-09-251-5/+17
| |/ / | | | | | | | | | | | | | | | | | | Consolidate the setting of x-ha-policy to a single place and add soem documentation. Change-Id: I35751e43c3ac15c142996f291e0ec609cab4948a
* | | Merge "Support for several HA RabbitMQ servers."Jenkins2012-09-251-29/+49
|\| |
| * | Support for several HA RabbitMQ servers.Eugene Kirpichov2012-09-251-29/+49
| | | | | | | | | | | | | | | | | | | | | | | | Use the rabbit_ha_queues boolean option. It is off by default, and you need to wipe RabbitMQ Mnesia database (/var/lib/rabbitmq/mnesia) when changing it. Change-Id: Id06692a142d1e5316602f6ceed4ccad615ce74c1
* | | Support declare_topic_consumer in impl_zmqEric Windisch2012-09-201-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | Required to support scalable agents in Quantum. declare_topic_consumer is implementation-specific, but it (or similar) is needed to consume notifications. Change-Id: Ifdeff8ae0ed90106a6bfaae0116db9d91d6b6faf
* | | fanout subscriptions in impl_zmqEric Windisch2012-09-202-20/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This necessary to support Quantum's scalable agents in the Folsom release. Supports matchmaking and subscribing to publishers, in addition to sender-only fanout broadcasting. Until now, senders of fanout messages had to know of all recipients via the matchmaker. This patch allows recipients to discover message publishers via the matchmaker. This is useful in patterns when there are few publishers, but many subscribers. The raw message passed to ZeroMQ is changed so that zmq_subscribe can filter by topic. This patch may be partially reverted in Grizzly, after the arrival of the ServiceGroupAPI which will significantly improve the matchmaking capabilities. Change-Id: Ifc132519c6e380cb0a3643680764a38b841add0e
* | | Merge "Change the qpid_heartbeat default to 60 seconds."Jenkins2012-09-141-1/+1
|\ \ \ | |/ / |/| |
| * | Change the qpid_heartbeat default to 60 seconds.Russell Bryant2012-09-131-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The heartbeat option enables sending a message at the AMQP layer at a regular interval. This helps ensure that the connection is still up and working. Once a failure is detected, a reconnection can be attempted. The default for qpid_heartbeat was previously 5 seconds. This is pretty aggressive and can lead to invalid timeouts occuring. An example is the nova-compute service. It may block in native code (such as libvirt) under normal circumstances. When this happens, other greenthreads (such as the one responsible for sending the heartbeat) can not be scheduled. This patch makes the default a less aggressive 1 minute. Fix bug 1050661. Change-Id: Idce48944050c331dda85e9b10ab6f5b025845c34
* / Use pep8 v1.3.3Zhongyue Luo2012-09-132-11/+18
|/ | | | | | | Fixed indents which violate pep8 1.3.3 Also added .mailmap file to coalesce commits Change-Id: Ia7a788a28e6c0fd9cb52fb7ea477cddd7d589e58
* Make projects define 'control_exchange'.Russell Bryant2012-09-114-19/+30
| | | | | | | | | | | | | | | The 'control_exchange' option needs to have a project-specific default value. Just don't register this option and expect it to be registered by the project using this code, at least for now. ****** IMPORTANT NOTE WHEN IMPORTING THIS CHANGE ****** If you are importing this change into a project that uses rpc, you must add the control_exchange option in your code! ******************************************************* Change-Id: Ida5a8637c419e709bbf22fcad57b0f11c31bb959
* Add cinder to allowed_rpc_exception_modules.Dan Prince2012-09-051-0/+1
| | | | | | | | | When configuring Cinder I would rather not have to specify allowed_rpc_exception_modules in my default config. This patch updates the default list of allowed_rpc_exception_modules to include cinder.exception. Change-Id: Ib7babb1ceb13e86c555947ebc869b50afd7e9b49
* Update zmq context cleanup to use term.Dan Prince2012-08-301-1/+1
| | | | | | | | | | | | | Updates the RPC cleanup function for the zmq RPC driver to use Context.term() instead of Context.destroy(). This allows the Nova code to work with older versions (pre 2.1.10) of pyzmq. The Context term() function seems to do the job just as well as destroy() (and is also thread safe) so lets just use it instead. Fixes LP Bug #1044004. Change-Id: Ifadd2c19914abfe5dbb58310d21eb6c78563fb82
* Remove unused importsRongzeZhu2012-08-161-2/+0
| | | | | | Fixes bug #1037578 Change-Id: I87dbd0bc5fe16a4416a676dc26f2446a54509bc1
* Remove register_opts from client methodsEric Windisch2012-08-151-5/+0
| | | | | | | | | During the nova->common migration, it was required to call register_opts on every client RPC api call. This is no longer required with cfg.CONF. Change-Id: Ia46c5d54e68c4d86a87570b2caff0da9755ca931
* Rename FLAGS to CONF; Remove self.confEric Windisch2012-08-061-16/+14
| | | | | | Remove all uses of self.conf and rename FLAGS to CONF. Change-Id: If7b3a3e69fe3c3d2c83033d2b44eb106794ef087
* Remove bogus conf argument from create_consumer()Mark McLoughlin2012-08-011-4/+2
| | | | | | | | | | Fixes bug #1031713 Commit 0b11668 in nova added a conf parameter to the create_consumer() method in the base class, but not to the implementations. Looks to be a random thinko. Change-Id: I92b87eed2f7708af696e02e229bf6daa0d305fdd
* fix the qpid_heartbeat option so that it's effectivePádraig Brady2012-07-301-1/+1
| | | | | | | | The 'hearbeat' typo caused this setting to be ineffective. This bug has been present since the initial nova qpid implementation. Fixes bug: 1030430 Change-Id: Ibb9d7484b9d11a6904cc9e2a8dde6d9164ee05b1
* Enable fanout_cast and fanout_cast_to_server to provide topicGary Kotton2012-07-231-4/+8
| | | | | | | The code would make use of the self.topic instead of allowing the user to define the topic. Change-Id: Ibdd4fab6dd019d223c3256d70f123829939056d2
* fix bug lp:1019348,update openstack-common to support pep8 1.3.Yaguang Tang2012-07-181-1/+1
| | | | | | also,this patch turns off pep8 E125 check. Change-Id: I22d2a94d89530586d614af39af17ae542c5e0cbf
* Merge "Add additional usage info on rpc_zmq_host flag"Jenkins2012-07-161-1/+2
|\
| * Add additional usage info on rpc_zmq_host flagEric Windisch2012-07-131-1/+2
| | | | | | | | Change-Id: I8f1f3b42de7253c993e2afa44ed1c0ad4dbbb74f
* | Merge "Restore register_opts on impl_zmq module load"Jenkins2012-07-161-0/+3
|\ \
| * | Restore register_opts on impl_zmq module loadEric Windisch2012-07-131-0/+3
| | | | | | | | | | | | Change-Id: I6acdf1445e1f03246476292b38d7c52a29934af1
* | | Merge "Minor pep8 cleanup in rpc."Jenkins2012-07-151-1/+1
|\ \ \ | |_|/ |/| |
| * | Minor pep8 cleanup in rpc.Andrew Bogott2012-07-082-2/+2
| | | | | | | | | | | | | | | | | | Removed a space, reordered an import. Change-Id: I418d1f7c6a5a3b8ef231c88b4ef28114ca0eb7cd