OpenStack library for messaging
Go to file
Hervé Beraud 26fccea843 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
(cherry picked from commit 9d8b1430e5)
2019-05-21 15:32:43 +02:00
doc Cap Bandit below 1.6.0 and update Sphinx requirement 2019-05-21 15:32:43 +02:00
etc Fix spelling typo in output 2015-09-24 18:11:22 +08:00
oslo_messaging Fix switch connection destination when a rabbitmq cluster node disappear 2019-05-21 15:32:43 +02:00
playbooks OpenDev Migration Patch 2019-04-19 19:31:54 +00:00
releasenotes Add release note for amqp library TLS/SSL error 2019-02-21 11:44:54 -05:00
tools update configuration for qdrouter v1.0.0 2018-03-20 16:42:32 -04:00
.coveragerc Update .coveragerc after the removal of respective directory 2016-10-18 17:20:09 +05:30
.gitignore Switch to stestr 2018-07-04 08:33:49 +07:00
.gitreview OpenDev Migration Patch 2019-04-19 19:31:54 +00:00
.stestr.conf Switch to stestr 2018-07-04 08:33:49 +07:00
.zuul.yaml OpenDev Migration Patch 2019-04-19 19:31:54 +00:00
CONTRIBUTING.rst Optimize the link address 2017-04-08 22:39:02 +08:00
HACKING.rst Update URLs in documents according to document migration 2017-07-12 22:54:02 +08:00
LICENSE Add oslo.messaging project infrastructure 2013-06-15 08:43:50 +01:00
README.rst Add release notes link to README 2018-06-21 13:16:36 +08:00
babel.cfg Setup for translation 2014-06-05 22:48:44 +02:00
bindep.txt Remove the deprecated Pika driver 2018-03-21 10:58:23 -04:00
lower-constraints.txt Bump py-amqp to >= 2.3.0 2018-07-11 15:22:21 +02:00
requirements.txt Bump py-amqp to >= 2.3.0 2018-07-11 15:22:21 +02:00
setup-test-env-kafka.sh Update kafka and dsvm jobs 2018-03-30 08:45:24 -04:00
setup-test-env-zmq-direct-dynamic.sh [zmq] Use more stable configuration in voting job 2017-01-16 10:13:17 +02:00
setup-test-env-zmq-proxy.sh [zmq] Fix non voting gate jobs 2016-12-02 17:12:43 +02:00
setup-test-env-zmq-pub-sub.sh [zmq] Fix non voting gate jobs 2016-12-02 17:12:43 +02:00
setup-test-env-zmq.sh [zmq] Use more stable configuration in voting job 2017-01-16 10:13:17 +02:00
setup.cfg Move requirements for the optional drivers (amqp1, kafka) 2018-04-16 10:38:07 -04:00
setup.py Updated from global requirements 2017-12-13 05:01:29 +00:00
test-requirements.txt Cap Bandit below 1.6.0 and update Sphinx requirement 2019-05-21 15:32:43 +02:00
tox.ini Update UPPER_CONSTRAINTS_FILE for stable/rocky 2018-07-26 12:38:41 +00:00

README.rst

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.