diff --git a/3.2/root/usr/share/container-scripts/mongodb/init-petset-replset.sh b/3.2/root/usr/share/container-scripts/mongodb/init-petset-replset.sh index 4386e0ff..a85d720e 100755 --- a/3.2/root/usr/share/container-scripts/mongodb/init-petset-replset.sh +++ b/3.2/root/usr/share/container-scripts/mongodb/init-petset-replset.sh @@ -140,8 +140,11 @@ function add_member() { info "Successfully joined replica set" } -info "Waiting for local MongoDB to accept connections ..." -wait_for_mongo_up &>/dev/null +info "Waiting for local MongoDB to accept connections on ${MEMBER_HOST} ..." +# connect using the host to ensure networking is working, otherwise +# the add_member call will fail. +wait_for_mongo_up ${MEMBER_HOST} &>/dev/null +#wait_for_mongo_up &>/dev/null # PetSet pods are named with a predictable name, following the pattern: # $(petset name)-$(zero-based index)