-
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
Lack of v6 routing causes setup to fail #882
Comments
want to send me a patch? |
It's possible that the RTNETLINK issue is due to bad configuration someplace, but even in this case the system should not error. |
If there is an error in how interfaces are configured (or only one set, like IPv6), the setup command should not error out.
closed per #882 |
If IPv6 is disabled (for testing one can pass ipv6.disable=1 to kernel), ansible dies at "gathering facts" step:
We can not get route:
This is handled in library/setup, get_default_interfaces(), but _low_level_exec_command() in lib/ansible/runner/init.py returns stdout and stderr together, so we have "RTNETLINK answers: Operation not supported" appended to JSON output which causes failure. I fixed this in quick-and-dirty way by adding
to the end of _low_level_exec_command(). It does not look like a proper way, but I'm not sure what to do here. |
Can you give me the output from "ansible --version" please? (If still present in the latest 0.7 devel -- which should already be fixed I thought, we'd definitely want to see it fixed in library/setup, which is the module that generates these facts) |
Sure. The latest.
|
cc @sfromm reopening this. Though please check and make sure you're not pointing to an older library path, such as if you are running from checkout but have code left over from a previous "make install" or RPM install, etc. |
No installed copies, only one from checkout. Also the problem disappears when I apply mentioned fix, so it is not because of stalled version somewhere. The first patch (August, 15) fixes gathering of interfaces info. But here is different issue: error message is still printed to stderr and _low_level_exec_command() considers it as a part of output. But later ansible tries to parse this output as JSON data and of course fails. |
I found a few places where it was not collecting stderr -- fixing that and testing now. |
Should be fixed in 8f220a4 |
setup used to check for ipv6 support with |
When doing the gathering-facts phase, playbook errors with:
The problem is that on some systems (RHEL5.8 in my case) there response to
/sbin/ip -6 route get '2404:6800:400a:800::1012'
is not what's expected:The solution is to ignore these errors and return an empty interfaces dictionary for this specific interface.
The text was updated successfully, but these errors were encountered: