Open stable/icehouse

Change-Id: I1ff7fb4695f594a0f87a3e110195669339238709
Update ensure()/reconnect() to catch MessagingError

The error handling code that gets connections reset if necessary
caught ConnectionError.  It really needs to catch MessagingError,
which ConnectionError inherits from.  There are other types of
MessagingErrors that may occur, such as InternalError, and they need
to cause the connection to reset, as well.

Closes-bug: #1303890
Change-Id: Ic5082b74a362ded8b35cbc75cf178fe6e0db62d0
(cherry picked from commit bb6f3f11f3d65e104faa8dc4ee1b880d0c6394a4)
Fixed the issue for pop exception

Fixed the issue so that two
threads do not pop the list at the same time
Closes-Bug: #1283926
Change-Id: I693407495c18c3e4a0ca2d8d94c4f4ed179371bf
(cherry picked from commit 076db925c8625b384b3fea13ffc9dc107643bd58)
Ensure routing key is specified in the address for a direct producer

This then matches the address used a direct consumer.

Change-Id: If71f78e50f8a9b3acfd1e9d02c8271f17c4ebee7
Closes-Bug: #1300318
(cherry picked from commit 9e0e85ede8406ace45c7573b18b8fe86c3e58921)
Updated from global requirements

Change-Id: I678b31668136ec793f7f4dfadbf64cd4760af8d5
Explicitly name subscription queue for responses

This prevents response queues being abandoned but still bound to
the exchange with the same key as the newer queue.

Change-Id: Iee0465010a1c6d00e96fb672505688a0f763f86c
Closes-Bug: 1318742
(cherry picked from commit 25f3d9acc395baef730203dcfc3941dbfc4fb73b)
Add check credentials to log message if rabbmitmq closes socket

If one has the credentials misconfigured for rabbitmq currently the following
error message is shown: "AMQP server on 10.0.0.23:5672 is unreachable:
Socket closed. Trying again in 1 seconds. " This is confusing because the
problem is the login creditentials are wrong but the server can be reached.

Since the rabbmitmq server allowed the initial connection and closed the
socket it's likely an authenication issue. This patch now logs: "AMQP server
10.0.0.23:5672 closed the connection. Check login credentials: Socket closed"
to hint the user that it could be a credential issue.

Change-Id: Iadff35d88a9cf704c1edd2d5036a113966db3ea3
Closes-bug: 1325750
(cherry picked from commit bf281aace507dec7547e40f68d8cd7bb290dc903)
Fix the notify method of the routing notifier

The notify method of the routing notifier don't have the correct
signature and change the case of the priority.

This change fixes it.

Change-Id: I833b19d0c054c94b861a4f6cc263c3487fa0e544
Closes-bug: #1316681
(cherry picked from commit cbbb90e28c608d165df94b779c04593bd17d02f1)
Ensures listener queues exist in fake driver

The fanout queues of the fake driver are created at the first executor
poll, but if we use eventlet executor and the fake driver, when the sender
delivers a fanout message before the first poll, the message goes to the
topic queue instead of the server fanout queue.

The changes fixes that by ensuring the all queues exists when the
listener is created.

Closes bug #1331453
Related-Bug: #1334798

Co-authored-by: Paul Michali <pcm@cisco.com>
Change-Id: I92e7c01dd87d634b741bbcaea92f48730fdd555e
(cherry picked from commit e582da68f4c5edd3e4a3cdb62819c210c72dcfad)
(cherry picked from commit 0cfafac2468afe6b601a985495382aae3351b217)
Fixes incorrect exchange lock in fake driver

The exchanges lock in the fake driver was being disregarded,
probably due to a typo.

Closes-Bug: #1342088
Change-Id: I45261fce501a867b9253112e1608b14ed5afea26
(cherry picked from commit 1cc3e5d866ee51b7cd542e8a00721329b2bbed3c)
Sync openstack requirements

Sync the latest stable openstack requirements to get
the fix for upper version of sphinx.

Closes bug: #1346827

Change-Id: I76138256457bbac4b6887b71911087dd93d678cf
Merge "Ensures listener queues exist in fake driver" into stable/icehouse
Merge "Fixes incorrect exchange lock in fake driver" into stable/icehouse
Merge "Explicitly name subscription queue for responses" into stable/icehouse
Merge "Add check credentials to log message if rabbmitmq closes socket" into stable/icehouse
Merge "Fix the notify method of the routing notifier" into stable/icehouse
Make tests pass with random python hashseed

Under python3 and latest tox a random python hashseed is used. Currently
oslo.messaging tests do not pass this because one test assumes the
resulting list conversion from a list of lists has a specific order.
Sort both lists so that the order is explicit when checking for equality
in this test. Doing so makes the test pass with a random python hash
seed.

Note I am not actually familiar enough with oslo.messaging to know if
this failure is correct and the drivers or something deeper should be
returning lists with an explicit order. This would be the case if order
in these lists is important.

Conflicts:
	tests/test_notifier.py

Change-Id: Id54ca1f448f466304b72b1695a5c646311bbd453
(cherry picked from commit 220ccb816c75fe72f32a3112dae0b3c0790645fe)