[API] Retry request on galera deadlocks

It is possible in a multi-API situation for galera deadlocks to still happen.
This patch will trigger a retry in these scenarios.

Change-Id: I3c62a9a39f6dec921dee8106b7a3a98cf1095f6d