OpenStack library for messaging
Go to file
Hervé Beraud 7b8fd6370c 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:24:23 +02:00
doc Cap Bandit below 1.6.0 and update Sphinx requirement 2019-05-21 15:24:23 +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:24:23 +02:00
playbooks OpenDev Migration Patch 2019-04-19 19:31:55 +00:00
releasenotes Bump amqp requirement version to >=2.4.1 2019-02-18 18:29:26 +01:00
tools Update hacking version 2019-01-21 19:45:42 -05:00
.coveragerc Update .coveragerc after the removal of respective directory 2016-10-18 17:20:09 +05:30
.gitignore Clean up .gitignore references to personal tools 2018-10-15 11:49:38 +08:00
.gitreview OpenDev Migration Patch 2019-04-19 19:31:55 +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:55 +00:00
babel.cfg Setup for translation 2014-06-05 22:48:44 +02:00
bindep.txt Switch driver to confluent-kafka client library 2018-12-04 11:25:07 -05: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
lower-constraints.txt Bump amqp requirement version to >=2.4.1 2019-02-18 18:29:26 +01:00
README.rst Add release notes link to README 2018-06-21 13:16:36 +08:00
requirements.txt Bump amqp requirement version to >=2.4.1 2019-02-18 18:29:26 +01:00
setup-test-env-kafka.sh Switch driver to confluent-kafka client library 2018-12-04 11:25:07 -05:00
setup.cfg Merge "Switch driver to confluent-kafka client library" 2018-12-07 19:59:50 +00: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:24:23 +02:00
tox.ini Update UPPER_CONSTRAINTS_FILE for stable/stein 2019-03-18 14:45:18 +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.