diff --git a/oslo_messaging/_drivers/zmq_driver/client/zmq_routing_table.py b/oslo_messaging/_drivers/zmq_driver/client/zmq_routing_table.py index 42f679957..c7bcbe845 100644 --- a/oslo_messaging/_drivers/zmq_driver/client/zmq_routing_table.py +++ b/oslo_messaging/_drivers/zmq_driver/client/zmq_routing_table.py @@ -70,7 +70,7 @@ class RoutingTableAdaptor(object): if not self.routing_table.contains(target_key): LOG.debug("Target %s is not in cache. Check matchmaker server." % target_key) - hosts = self.matchmaker.get_hosts_fanout_retry( + hosts = self.matchmaker.get_hosts_fanout( target, zmq_names.socket_type_str(self.listener_type)) LOG.debug("Received hosts %s" % hosts) self.routing_table.update_hosts(target_key, hosts) @@ -174,10 +174,7 @@ class RoutingTableUpdater(zmq_updater.UpdaterBase): try: for target_key in target_keys: hosts = self.matchmaker.get_hosts_by_key(target_key) - if not hosts: - LOG.warning(_LW("Target %s has been removed") % target_key) - else: - self.routing_table.update_hosts(target_key, hosts) + self.routing_table.update_hosts(target_key, hosts) LOG.debug("Updating routing table from the matchmaker. " "%d target(s) updated %s." % (len(target_keys), target_keys)) diff --git a/oslo_messaging/_drivers/zmq_driver/matchmaker/zmq_matchmaker_redis.py b/oslo_messaging/_drivers/zmq_driver/matchmaker/zmq_matchmaker_redis.py index 196f87f03..ea1c5af2e 100644 --- a/oslo_messaging/_drivers/zmq_driver/matchmaker/zmq_matchmaker_redis.py +++ b/oslo_messaging/_drivers/zmq_driver/matchmaker/zmq_matchmaker_redis.py @@ -214,8 +214,7 @@ class MatchmakerRedisBase(zmq_matchmaker_base.MatchmakerBase): if target.server: key = zmq_address.target_to_key(target, listener_type) hosts.extend(self._smembers(key)) - - if not hosts: + else: key = zmq_address.prefix_str(target.topic, listener_type) hosts.extend(self._smembers(key)) diff --git a/oslo_messaging/_drivers/zmq_driver/zmq_address.py b/oslo_messaging/_drivers/zmq_driver/zmq_address.py index 800a26a3a..906267b42 100644 --- a/oslo_messaging/_drivers/zmq_driver/zmq_address.py +++ b/oslo_messaging/_drivers/zmq_driver/zmq_address.py @@ -34,7 +34,9 @@ def prefix_str(key, listener_type): def target_to_key(target, listener_type=None): key = target.topic if target.server: - key += "/" + target.server + # FIXME(ozamiatin): Workaround for Cinder. + # Remove split when Bug #1630975 is being fixed. + key += "/" + target.server.split('@')[0] return prefix_str(key, listener_type) if listener_type else key diff --git a/oslo_messaging/_drivers/zmq_driver/zmq_options.py b/oslo_messaging/_drivers/zmq_driver/zmq_options.py index f5cac0f16..756234c0d 100644 --- a/oslo_messaging/_drivers/zmq_driver/zmq_options.py +++ b/oslo_messaging/_drivers/zmq_driver/zmq_options.py @@ -163,7 +163,7 @@ zmq_opts = [ 'after which it is not tracked anymore by a ' 'client/server.'), - cfg.BoolOpt('rpc_use_acks', default=True, + cfg.BoolOpt('rpc_use_acks', default=False, help='Wait for message acknowledgements from receivers. ' 'This mechanism works only via proxy without PUB/SUB.'),