Changes FakeMemcache to set token to expire on utcnow + 5 mins

fixes bug 1240994

keystoneclient 0.4 will use utcnow to compare expiration date.
The FakMemcache class sets expiration to datetime.now which sets
date for local timezone. If this timezone happens to be behind
utc the test will fail with expiration error because we are
comparing utc + 5 mins with utc - 1 or more hours.

Change-Id: I551506a5aaf0aef77476b11786399a66225603bf
(cherry picked from commit ac2a503d4d9ada69b5d5c1fbd2acf7397d8b4ac9)
Pin test-requirement for Nova to Havana

Change-Id: If5f28cf19211a69b4d2b6094ff05b6e82129d873
mongodb, db2: do not print full URL in logs

The full URL used to connect to MongoDB or DB2 might contains sensitive
information such as username and password, so it's better to not print
it at all.
Instead, just print the hosts that are being connected to.

Fixes-Bug: #1244476

(cherry picked from commit f2e651181f0016e96a123556aba46bd8d91e0012)

Change-Id: I4390020d24386df38b1fae32aeeb657456142abd
Selectively import RPC backend retry config

Fixes bug 1244698

When setting the RPC publisher policies, selectively import
the retry config native to the configured RPC backend.

This avoid ImportErrors when all the dependencies of an unused
RPC backend are not installed locally.

Change-Id: If05a5a389a1b417875e0426fd83fb6d73d570487
(cherry picked from commit a8e12c0429516d477b40eb7106c3b160a29c965a)
Merge "Selectively import RPC backend retry config" into stable/havana
make record_metering_data concurrency safe

Recording metering might happen in parallel, and if two sqlalchemy
session try to create a source, a user, a project or a resource at the
same time, one of them fail with a IntegrityError.

This patch ensure the record_metering_data sqlalchemy session always
have the needed source, user, project and a resource by creating missing
obj in an other sqlalchemy session.

Fixes bug: #1237671

Change-Id: Ie8761ce1615c3142ad6ad2a400537f465f3bbf0a
(cherry picked from commit dd62f9ce0d8d5abac0fb34b0520515b6c4566c1f)
Avoid intermittent integrity error on alarm creation

Fixes bug 1255107

Previously, alarm created failed intermittently with the
sqlalchemy driver, due to the reliance on session merge to create
the project & user IDs if not already encountered.  This approach
conflicted with the strict foreign key constraints that were
added to the alarms table as an after-thought.

Now, we avoid the potential problem by creating the project and
user IDs explicitly.

Unfortunately, this cannot be tested via the scenario tests,
as there we use sqlite (the problematic migration does not
apply the foreign key constraints for that engine).

Change-Id: Ieaed676a0a68725242fadbf658646b874d6851ce
(cherry picked from commit b2b500c83cf5a81269c84a16f9a30ab7fa4c8ee6)
Merge "Changes FakeMemcache to set token to expire on utcnow + 5 mins" into stable/havana
Merge "make record_metering_data concurrency safe" into stable/havana
Merge "Avoid intermittent integrity error on alarm creation" into stable/havana
Properly reconnect subscribing clients when QPID broker restarts

Fixes bug 1251757

This is a cherrypick of oslo-incubator:
55678c7ab7fbc1b2beb428d046bb4162f23b0a53

From the oslo-incubator bug:
When the QPID broker is restarted (or fails over), subscribed clients
will attempt to re-establish their connections.  In the case of fanout
subscriptions, this reconnection functionality is broken. For version
1 topologies, the clients attempt to reconnect twice to the same
exclusive address - which is illegal.  In the case of version 2
topologies, the address parsing is broken and an illegal address is
created on reconnect.  This fix avoids the problem by removing the
special-case reconnect code that manages UUID addresses; it is
unnecessary as the QPID broker will generate unique queue names
automatically when the clients reconnect.

Change-Id: If966bb25e49b5837293a1bb181bbb02086599d81
Create a shared queue for QPID topic consumers

Fixes bug 1257293

This is a cherrypick of oslo-incubator:
e355fa3a9f49ff524ce98d1263a784b5a7929dfb

From the oslo-incubator commit:
When multiple RPC servers (consumers) are subscribed to the same RPC
topic, a single RPC request to that topic should be received by only
one of the consumers.  A bug in the QPID driver caused every consumer
to receive a copy of the RPC request.  This bug affects only Topology
version 2.  This patch will cause a single queue to be created for
each topic, and shared among all consumers of that topic.  This
results in each RPC request being received by only one consumer,
in turn across all the competing consumers.

Change-Id: I97c6eb5fe63322ab70716c63074818ff1b6ea82b
Merge "Properly reconnect subscribing clients when QPID broker restarts" into stable/havana
Merge "Create a shared queue for QPID topic consumers" into stable/havana
Updated from global requirements

Change-Id: I3c2bf6087cf07cddb4b1290470d5180edbbec42f
Merge tag '2013.2.1' of https://github.com/openstack/ceilometer into havana

2013.2.1