Retry in CellDatabases fixture when global DB state changes
Retry in CellDatabases fixture when global DB state changes

There is a NOTE in the CellDatabases code about an unlikely but
possible race that can occur between taking the writer lock to set
the last DB context manager and taking the reader lock to call
target_cell(). When the race is detected, a RuntimeError is raised.

We can handle the race by retrying setting the last DB context manager
when the race is detected, as described in the NOTE.

Closes-Bug: #1959677

Change-Id: I5c0607ce5910dce581ab9360cc7fc69ba9673f35

mahak/nova,openstack/nova,openstack/nova,openstack/nova,mahak/nova,mahak/nova