Comment 22 for bug 1707160

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.messaging (master)

Reviewed: https://review.openstack.org/486706
Committed: https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=f059bba6ae9642675bc1c9004a4a4adc5d1b19a6
Submitter: Jenkins
Branch: master

commit f059bba6ae9642675bc1c9004a4a4adc5d1b19a6
Author: Kenneth Giusti <email address hidden>
Date: Mon Jul 24 13:36:17 2017 -0400

    Prevent rabbit from raising unexpected exceptions

    Publishing a message using the kombu connection autoretry method may
    allow exceptions from the py-amqp library to be raised up to the
    application. This does not conform to the documented oslo.messaging
    API.

    Enhance the try except block to capture any exception and translate it
    into a MessageDeliveryFailure.

    There are a few cases where exceptions will be raised during autoretry
    publishing: recoverable connection or channel errors, and
    non-recoverable connection or channel errors.

    autoretry will only retry if the error is recoverable. Non recoverable
    errors are re-raised immediately regardless of the retry count.

    In the case of a recoverable error it seems unlikely that retrying
    either the connection or the channel yet again is going to get us
    anywhere, so in this case we simply clean up the channel state, log an
    error and fail the operation.

    In the case of non-recoverable error we are out of luck (think
    authentication failure) - further retrying will not help. Best we can
    do is clean up state and log the heck out of it.

    Change-Id: I2f65d2ee19a8c3e9a323b30404abbf0cbb45a216
    Closes-Bug: #1705351
    Closes-Bug: #1707160