cinder/cinder/tests
Gorka Eguileor 8ea9f67b03 Fix RPC and Object version pinning on API
The way the API node initializes it requires that all nodes are up and
running for version pinning to work correctly, otherwise it will set
version to None for the RPC clients and the serializers same thing
happens to the scheduler node for the volume rpc.

This is a problem, also on CI, because you cannot guarantee that the API
will start last, and so versions will be incorrect and cause problems in
some cases.

This patch pins RPC client and serializer to the latest known versions
when there are no services on the DB.  This should only happen on CI,
devstack, and similar cases where we start everything for the first time
almost simultaneously.

An alternative that would work for the API would be to make the RPC
client lazily instantiated which solves the problem of load order as no
API requests come in before the other nodes are up and running.

But it would not solve the problem of the scheduler, as it fires a
request to volumes to publish_service_capabilities on start and that
would instantiate the rpc client.

Closes-Bug: #1569350
backport-potential: mitaka
Change-Id: I301c60c4c75cebb4fa6392fe7c9c11cedd1c09c8
2016-04-13 12:04:31 +02:00
..
functional Enable functional test for volume creation 2016-03-18 16:30:11 +00:00
unit Fix RPC and Object version pinning on API 2016-04-13 12:04:31 +02:00
__init__.py Move unit tests into dedicated directory 2015-04-21 18:40:40 -06:00
fixtures.py Copy StandardLogging fixture from Nova 2016-02-29 17:46:31 -05:00