If db sync fails, it is never retried leading to errors. So, this
patch adds retries for db_sync to avoid sync fails.
Change-Id: I784ca2fc0a9a906633ad60d1338c4b4b73c376c7
Closes-Bug: #1628580
(cherry picked from commit c13a788dd99a515a8bc5fc52b653fead39662eb8)