OpenStack library for messaging
Go to file
joyce e8def40a41 Fix matchmaker_redis ack_alive fails with KeyError
Fix matchmaker_redis: ack_alive fails with KeyError on re-registration
attempt.

def ack_alive(self, key, host):
    topic = "%s.%s" % (key, host)
    if not self.redis.expire(topic, CONF.matchmaker_heartbeat_ttl):
        # If we could not update the expiration, the key
        # might have been pruned. Re-register, creating a new
        # key in Redis.
        self.register(self.host_topic[host], host)

self.host_topic is a dict with keys of tuple (key, host), not 'host',
register's first parameter is the topic like 'notification-info',
so modify it to key.
And it will not cause indefinite recursion, because when register end,
the key exist in redis, redis.expire will return True.

Add test case for ack_alive.

Closes-Bug: #1419718

Change-Id: I8d972afe89aec02a5c8f0d9dd4e216bc12c298a1
2015-02-27 16:32:10 +08:00
doc/source Treat sphinx warnings as errors 2015-01-29 14:24:55 -05:00
etc Routing notifier 2014-01-15 04:08:18 +00:00
oslo Expose _impl_test for designate 2015-01-26 21:55:20 +00:00
oslo.messaging/locale Imported Translations from Transifex 2015-02-02 06:12:37 +00:00
oslo_messaging Fix matchmaker_redis ack_alive fails with KeyError 2015-02-27 16:32:10 +08:00
tests Remove unnecessary log messages from amqp1 unit tests 2015-02-06 08:45:46 -05:00
tools Import run_cross_tests.sh from oslo-incubator 2014-04-03 05:30:46 -07:00
.gitignore Ignore any egg and egg-info directories 2014-02-05 09:32:25 -08:00
.gitreview Add oslo.messaging project infrastructure 2013-06-15 08:43:50 +01:00
.testr.conf Allows to overriding oslotest environ var 2014-11-19 11:28:02 +01:00
CONTRIBUTING.rst Workflow documentation is now in infra-manual 2014-12-05 03:30:39 +00:00
LICENSE Add oslo.messaging project infrastructure 2013-06-15 08:43:50 +01:00
MANIFEST.in Add oslo.messaging project infrastructure 2013-06-15 08:43:50 +01:00
README.rst Update README.rst format to match expectations 2015-01-27 13:52:20 -05:00
amqp1-requirements.txt amqp1: fix functional tests deps 2015-02-11 16:25:04 +00:00
babel.cfg Setup for translation 2014-06-05 22:48:44 +02:00
openstack-common.conf Switch to oslo.middleware 2014-11-08 18:08:37 +01:00
requirements-py3.txt Updated from global requirements 2015-01-27 02:23:38 +00:00
requirements.txt Add a new aioeventlet executor 2015-02-05 12:11:37 +01:00
setup.cfg Add a new aioeventlet executor 2015-02-05 12:11:37 +01:00
setup.py Updated from global requirements 2014-04-30 02:45:47 +00:00
test-requirements-py3.txt Upgrade to hacking 0.10 2015-01-14 09:04:22 +01:00
test-requirements.txt Upgrade to hacking 0.10 2015-01-14 09:04:22 +01:00
tox.ini amqp1: fix functional tests deps 2015-02-11 16:25:04 +00:00

README.rst

Oslo Messaging Library

The Oslo messaging API supports RPC and notifications over a number of different messaging transports.