Do not access the connection's socket during error callback
The _get_connection_info() method attempts to gather debug information
from the connection, and will reach into the amqp channel to get the
local (client's) TCP port number via the 'sock' property.
If _get_connection_info() is called from autoretry's on_error handler
the 'sock' property notices that the transport is not set and attempts
to re-connect. amqp has deprecated this reconnect behavior, and in
any case the client's socket is irrelevant since the connection may
not be valid at this point.
Closes-Bug: #1745166
Change-Id: I3c42f8463605927f6f94d6c3a7f05e584476abc1
(cherry picked from commit 361669764fd28b4f6d5f1c6896624f2da4ff5151)
Reviewed: https:/ /review. openstack. org/605325 /git.openstack. org/cgit/ openstack/ oslo.messaging/ commit/ ?id=d7a7230ff52 73f3f16fce4a37c 72e8aadd071563
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit d7a7230ff5273f3 f16fce4a37c72e8 aadd071563
Author: Kenneth Giusti <email address hidden>
Date: Fri Jul 6 11:24:40 2018 -0400
Do not access the connection's socket during error callback
The _get_connection _info() method attempts to gather debug information
from the connection, and will reach into the amqp channel to get the
local (client's) TCP port number via the 'sock' property.
If _get_connection _info() is called from autoretry's on_error handler
the 'sock' property notices that the transport is not set and attempts
to re-connect. amqp has deprecated this reconnect behavior, and in
any case the client's socket is irrelevant since the connection may
not be valid at this point.
Closes-Bug: #1745166 7f6f94d6c3a7f05 e584476abc1 f6d5f1c6896624f 2da4ff5151)
Change-Id: I3c42f846360592
(cherry picked from commit 361669764fd28b4