Fix replication module failing on timeout
This commit is contained in:
parent
188cbaae59
commit
0e7dbda68d
|
@ -301,7 +301,7 @@ def load_mongocnf():
|
||||||
|
|
||||||
return creds
|
return creds
|
||||||
|
|
||||||
def wait_for_ok_and_master(module, client, timeout = 60):
|
def wait_for_ok_and_master(module, client, timeout = 120):
|
||||||
while True:
|
while True:
|
||||||
status = client.admin.command('replSetGetStatus', check=False)
|
status = client.admin.command('replSetGetStatus', check=False)
|
||||||
if status['ok'] == 1 and status['myState'] == 1:
|
if status['ok'] == 1 and status['myState'] == 1:
|
||||||
|
@ -397,6 +397,10 @@ def main():
|
||||||
connection_params = {
|
connection_params = {
|
||||||
"host": login_host,
|
"host": login_host,
|
||||||
"port": int(login_port),
|
"port": int(login_port),
|
||||||
|
"username": login_user,
|
||||||
|
"password": login_password,
|
||||||
|
"authsource": login_database,
|
||||||
|
"serverselectiontimeoutms": 110000,
|
||||||
}
|
}
|
||||||
|
|
||||||
if ssl:
|
if ssl:
|
||||||
|
|
Loading…
Reference in New Issue