-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
git module needs better error messages for timeout related errors #19440
Comments
Does ssh-keyscan tell us why it failed? If so, then we could include it in the error message. If not, then it seems like we'd be as in the dark as the user as to why it failed. |
looks like 'ssh-keyscan -v' sometimes shows slightly more info, but nothing particularly consistent:
|
In general ssh-keyscan is not very communicative. I get an error (that looks config/distro specific) when the hostname can not be resolved, but if there is no answer on port 22 ssh-keyscan stays silent. I guess those two are the most common cases. |
Okay. I'm in favour of better error messages but it doesn't seem like ssh-keyscan is giving us the information that we need to make a good message in this case. Maybe we can make it a little more specific about what we were doing when it failed? "Failed to retrieve hostname. ssh-keyscan -p PORT HOSTNAME returned no matches" ? It's not much but it's the only thing I can think to do. |
ssh-keyscan isn't very verbose about errors. Give the user whatever information we have available even if it isn't much. At least they will know how we were running ssh-keyscan and why there's an error now. Fixes ansible#19440
ssh-keyscan isn't very verbose about errors. Give the user whatever information we have available even if it isn't much. At least they will know how we were running ssh-keyscan and why there's an error now. Fixes #19440
ISSUE TYPE
COMPONENT NAME
git
ANSIBLE VERSION
CONFIGURATION
N/A
OS / ENVIRONMENT
N/A
SUMMARY
Ansible's git module reports a hostkey error rather than a timeout when in fact it simply couldn't make a connection at all. Sure, now that I've traced it to a firewall restriction and the ensuing timeout, that makes sense, but this could be a much more insightful and accurate error message.
STEPS TO REPRODUCE
Set a security group egress restriction on the ssh port (22), and attempt to do a git clone...
EXPECTED RESULTS
ACTUAL RESULTS
Instead of a timeout related error, the error message refers to failing to get the hostkey.
The text was updated successfully, but these errors were encountered: