
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
Oslo Messaging Library
The Oslo messaging API supports RPC and notifications over a number of different messaging transports.
- License: Apache License, Version 2.0
- Documentation: http://docs.openstack.org/developer/oslo.messaging
- Source: http://git.openstack.org/cgit/openstack/oslo.messaging
- Bugs: http://bugs.launchpad.net/oslo.messaging
Description
Languages
Python
99.8%
Shell
0.2%