This patch adds retries to connect to the mongodb, after a restart.
Change-Id: I16e37614736c247fa0b737db2b868c052c2aa33a
| ... | ... |
@@ -68,7 +68,9 @@ function is_marconi_enabled {
|
| 68 | 68 |
# cleanup_marconi() - Remove residual data files, anything left over from previous |
| 69 | 69 |
# runs that a clean run would need to clean up |
| 70 | 70 |
function cleanup_marconi() {
|
| 71 |
- mongo marconi --eval "db.dropDatabase();" |
|
| 71 |
+ if ! timeout $SERVICE_TIMEOUT sh -c "while ! mongo marconi --eval 'db.dropDatabase();'; do sleep 1; done"; then |
|
| 72 |
+ die $LINENO "Mongo DB did not start" |
|
| 73 |
+ fi |
|
| 72 | 74 |
} |
| 73 | 75 |
|
| 74 | 76 |
# configure_marconiclient() - Set config files, create data dirs, etc |