DBZ-6875 Ensuring root user is created when using authenticated mongo rs
This commit is contained in:
parent
83e6f28e41
commit
2f70c30962
@ -270,6 +270,9 @@ public void start() {
|
|||||||
// Create rootUser
|
// Create rootUser
|
||||||
LOGGER.info("[{}] Creating root user...", name);
|
LOGGER.info("[{}] Creating root user...", name);
|
||||||
createRootUser();
|
createRootUser();
|
||||||
|
// Make sure RS status is available to root user
|
||||||
|
awaitReplicaPrimary();
|
||||||
|
|
||||||
started = true;
|
started = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,6 +332,7 @@ public void awaitReplicaPrimary() {
|
|||||||
await()
|
await()
|
||||||
.atMost(1, MINUTES)
|
.atMost(1, MINUTES)
|
||||||
.pollDelay(1, SECONDS)
|
.pollDelay(1, SECONDS)
|
||||||
|
.ignoreException(IllegalArgumentException.class)
|
||||||
.until(() -> tryPrimary().isPresent());
|
.until(() -> tryPrimary().isPresent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user