Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When ansible can't authenticate against a host, and your answer is no, ansible crash #3466

Closed
cristobalrosa opened this issue Jul 8, 2013 · 5 comments
Labels
bug This issue/PR relates to a bug.

Comments

@cristobalrosa
Copy link
Contributor

Hi guys,

I've two hosts on my ansible configuration file. When I try to do a ping against them, and ansible can't authenticate with one of them, Ansible asks me a question:
Are you sure you want to continue connecting (yes/no)?

When my answer is 'no', ansible crashes:

/etc/ansible/hosts:
XXX.XXX.XXX
YYY.YYY.YYY

Steps to reproduce:

ansible all -m ping -u root

paramiko: The authenticity of host 'XXX.XXX.XXX.XXX' can't be established.
The ssh-rsa key fingerprint is zzzzzzzzzzzzzzzz
Are you sure you want to continue connecting (yes/no)?
no
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/ansible/runner/init.py", line 70, in _executor_hook
return_data = multiprocessing_runner._executor(host, new_stdin)
File "/usr/local/lib/python2.7/dist-packages/ansible/runner/init.py", line 378, in _executor
self.callbacks.on_unreachable(host, msg)
File "/usr/local/lib/python2.7/dist-packages/ansible/callbacks.py", line 357, in on_unreachable
display("%s | FAILED => %s" % (host, res), stderr=True, color='red', runner=self.runner)
File "/usr/local/lib/python2.7/dist-packages/ansible/callbacks.py", line 114, in display
log_flock(runner)
File "/usr/local/lib/python2.7/dist-packages/ansible/callbacks.py", line 83, in log_flock
fcntl.lockf(LOG_LOCK, fcntl.LOCK_EX)
IOError: [Errno 35] Resource deadlock avoided
yyy.yyy.yyy | success >> {
"changed": false,
"ping": "pong"
}

Ansible has been installed using pip.

@mpdehaan
Copy link
Contributor

mpdehaan commented Jul 8, 2013

Out of curiosity, What operating system are you running from?

@cristobalrosa
Copy link
Contributor Author

Both are linux (Debian testing)

@mpdehaan
Copy link
Contributor

mpdehaan commented Jul 8, 2013

Thanks.... looks like I need to make the log locking a little smarter.

Will fix this on 1.3.

On Mon, Jul 8, 2013 at 9:06 AM, cristobalrosa notifications@github.comwrote:

Both are linux (Debian testing)


Reply to this email directly or view it on GitHubhttps://github.com//issues/3466#issuecomment-20603656
.

@safabelkacem
Copy link

i have the same problem , please any idea for the solution ??

mpdehaan pushed a commit that referenced this issue Aug 3, 2013
Fixes issue #3466 - When ansible can't authenticate against a host,
and your answer is no, ansible crash.
@mpdehaan
Copy link
Contributor

mpdehaan commented Aug 3, 2013

fixed per above, so closing

@mpdehaan mpdehaan closed this as completed Aug 3, 2013
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants