Hervé Beraud 9d8b1430e5 Fix switch connection destination when a rabbitmq cluster node disappear
In a clustered rabbitmq when a node disappears, we get a
ConnectionRefusedError because the socket get disconnected.

The socket access yields a OSError because the heartbeat
tries to reach an unreachable host (No route to host).

Catch these exceptions to ensure that we call ensure_connection for switching
the connection destination.

POC is available at github.com:4383/rabbitmq-oslo_messging-error-poc

Example:
    $ git clone git@github.com:4383/rabbitmq-oslo_messging-error-poc
    $ cd rabbitmq-oslo_messging-error-poc
    $ python -m virtualenv .
    $ source bin/activate
    $ pip install -r requirements.txt
    $ sudo podman run -d --hostname my-rabbit --name rabbit rabbitmq:3
    $ python poc.py $(sudo podman inspect rabbit | niet '.[0].NetworkSettings.IPAddress')

And in parallele in an another shell|tmux
    $ podman stop rabbit
    $ # observe the output of the poc.py script we now call ensure_connection

Now you can observe some output relative to the connection who is
modified and not catched before these changes.

Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1665399

Closes-Bug: #1828841

Change-Id: I9dc1644cac0e39eb11bf05f57bde77dcf6d42ed3
2019-05-13 17:09:04 +02:00
2019-01-23 08:27:43 -05:00
2015-09-24 18:11:22 +08:00
2019-04-19 19:31:51 +00:00
2019-04-19 19:31:51 +00:00
2018-07-04 08:33:49 +07:00
2019-04-19 19:31:51 +00:00
2014-06-05 22:48:44 +02:00
2017-04-08 22:39:02 +08:00
2018-06-21 13:16:36 +08:00
2019-04-15 01:14:11 +00:00
2017-12-13 05:01:29 +00:00
2019-04-18 01:14:36 +00:00

Team and repository tags

image

Oslo Messaging Library

Latest Version

Downloads

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

Description
OpenStack library for messaging
Readme 36 MiB
Languages
Python 99.8%
Shell 0.2%