mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 22:30:22 -07:00
Display error during launch of accelerated daemon
* also minor tweak to the # of retries in the connection attempt Fixes #4012
This commit is contained in:
parent
8a016bb374
commit
2696135b3b
1 changed files with 3 additions and 1 deletions
|
@ -74,7 +74,7 @@ class Connection(object):
|
||||||
try:
|
try:
|
||||||
if not self.is_connected:
|
if not self.is_connected:
|
||||||
# TODO: make the timeout and retries configurable?
|
# TODO: make the timeout and retries configurable?
|
||||||
tries = 10
|
tries = 3
|
||||||
self.conn = socket.socket()
|
self.conn = socket.socket()
|
||||||
self.conn.settimeout(30.0)
|
self.conn.settimeout(30.0)
|
||||||
while tries > 0:
|
while tries > 0:
|
||||||
|
@ -91,6 +91,8 @@ class Connection(object):
|
||||||
if allow_ssh:
|
if allow_ssh:
|
||||||
vvv("Falling back to ssh to startup accelerated mode")
|
vvv("Falling back to ssh to startup accelerated mode")
|
||||||
res = self._execute_fb_module()
|
res = self._execute_fb_module()
|
||||||
|
if not res.is_successful():
|
||||||
|
raise errors.AnsibleError("Failed to launch the accelerated daemon on %s (reason: %s)" % (self.host,res.result.get('msg')))
|
||||||
return self.connect(allow_ssh=False)
|
return self.connect(allow_ssh=False)
|
||||||
else:
|
else:
|
||||||
raise errors.AnsibleError("Failed to connect to %s:%s" % (self.host,self.fbport))
|
raise errors.AnsibleError("Failed to connect to %s:%s" % (self.host,self.fbport))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue