OpenStack library for messaging
Go to file
Hervé Beraud a053b1db0f 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-06-10 12:19:28 +02:00
doc Cap Bandit below 1.6.0 and update Sphinx requirement 2019-06-06 10:13:32 +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-06-10 12:19:28 +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-22 12:42:26 -05:00
tools Update kafka functional test 2017-12-16 14:41:03 -05:00
.coveragerc Update .coveragerc after the removal of respective directory 2016-10-18 17:20:09 +05:30
.gitignore Add reno for releasenotes management 2016-05-19 17:14:31 +03:00
.gitreview OpenDev Migration Patch 2019-04-19 19:31:54 +00:00
.testr.conf tests: don't run functional tests in parallel 2017-02-23 10:59:00 +01: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 Update links in README 2017-08-04 05:27:43 +00:00
babel.cfg Setup for translation 2014-06-05 22:48:44 +02:00
bindep.txt Merge "Provide bindep_profile in openstack-tox job setup" 2017-12-11 09:39:31 +00:00
requirements.txt Updated from global requirements 2018-02-13 01:58:13 +00:00
setup-test-env-kafka.sh Queens gate fixes 2018-06-14 14:52:27 +02: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 Update URLs in documents according to document migration 2017-07-12 22:54:02 +08: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-06-06 10:13:32 +02:00
tox.ini Update UPPER_CONSTRAINTS_FILE for stable/queens 2018-01-24 18:05:55 +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.