-
-
Notifications
You must be signed in to change notification settings - Fork 735
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
Cannot find an IP address to use for interface. #445
Comments
See 37488e57 for the commit that added this message. The reason you are getting the message is that eth4 has no IP address configured on it. This means that keepalived doesn't know what source IP address to use when sending VRRP packets. Your configuration appears to suggest that on os-controller01 should have IP address 10.30.200.101 on eth4, and on os-controller02 should have IP address 10.30.200.102 on eth4, but the ifconfig output shows that the interfaces don't have any IP addresses configured on them. This means that not only cannot keepalived determine what IP address to use as a source address, but if a VRRP packet were sent, it wouldn't be received by the other system. |
I am sorry, it is better to provide you a full overview over the interfaces of each host. The ip addresses 10.30.200.101 and 10.30.200.102, respectively are each assigned to eth0 of the corresponding host:
Can I tell VRRP to use 10.30.200.101 or 10.30.200.102, respectively as source address? |
To specify the source addresses, use the I'm not entirely sure how you want this setup to work, but I'll have a guess. I think you want to send and receive the VRRP adverts on eth0, but you want to add the virtual IP address 10.30.216.254/24 to eth4. If that is the case, then I think you should change the configuration to have |
Thanks for the hint. I have simplified my Is this a feasible solution? os-controller01:
os-controller02:
|
The configuration looks reasonable to me. You might want to consider adding You don't need You also don't need to specify I would remove the /21s for the addresses on eth0, and the /24 for the IP addresses in eth2, since those networks are already configured, and all you are wanting to do is add the individual addresses. For the eth4 VIPs, you do need the /24s since the network isn't already configured, and it might we worth adding brd 10.30. 216.255 to those lines to ensure you get the broadcast address you want. You could increase the priorities to say, 240 and 250, which will result in (slightly) faster transitions times to master. |
Thank you very much for feedback. That was really helpful! I have integrated your suggestions resulting in the following configurations. os-controller01:
os-controller02:
|
Glad to be able to help. I think the configuration looks spot on now. I'll close this issue now, since I think it is all resolved, but you can still add new messages to it. |
Project: openstack/neutron f0e4809ca82628faa43d6ac83892b4451e1512f6 Fix test_keepalived_ipv6_support for Keepalived v1.2.20 In commit [1] (some explanation in [2] ) VRRP initialisation is enhanced to read source IP address(to use when sending VRRP packets) from the HA interface or from keepalived config("unicast_src_ip" parameter). If it is unable to find IP address, VRRP initialisation will fail with error "Cannot find an IP address to use for interface". In the test, we set vrrp->family to AF_INET by setting vip to 169.254.0.1/24 through config, but not providing source IPv4 address(i.e no 'unicast_src_ip' option or no IP on HA interface), making the test to fail with [1]. To fix that, we set the IP address on HA interface. Note: Commit [1] is added in Keepalived version 1.2.20. Tested the fix on both Keepalived v1.2.19 and Keepalived v1.2.20. [1] acassen/keepalived@37488e57 [2] acassen/keepalived#445 Closes-bug: #1712388 Change-Id: I260c0e6810ed54c93f93621afa6ab13855ef2428
In commit [1] (some explanation in [2] ) VRRP initialisation is enhanced to read source IP address(to use when sending VRRP packets) from the HA interface or from keepalived config("unicast_src_ip" parameter). If it is unable to find IP address, VRRP initialisation will fail with error "Cannot find an IP address to use for interface". In the test, we set vrrp->family to AF_INET by setting vip to 169.254.0.1/24 through config, but not providing source IPv4 address(i.e no 'unicast_src_ip' option or no IP on HA interface), making the test to fail with [1]. To fix that, we set the IP address on HA interface. Note: Commit [1] is added in Keepalived version 1.2.20. Tested the fix on both Keepalived v1.2.19 and Keepalived v1.2.20. [1] acassen/keepalived@37488e57 [2] acassen/keepalived#445 Closes-bug: #1712388 Change-Id: I260c0e6810ed54c93f93621afa6ab13855ef2428
In commit [1] (some explanation in [2] ) VRRP initialisation is enhanced to read source IP address(to use when sending VRRP packets) from the HA interface or from keepalived config("unicast_src_ip" parameter). If it is unable to find IP address, VRRP initialisation will fail with error "Cannot find an IP address to use for interface". In the test, we set vrrp->family to AF_INET by setting vip to 169.254.0.1/24 through config, but not providing source IPv4 address(i.e no 'unicast_src_ip' option or no IP on HA interface), making the test to fail with [1]. To fix that, we set the IP address on HA interface. Note: Commit [1] is added in Keepalived version 1.2.20. Tested the fix on both Keepalived v1.2.19 and Keepalived v1.2.20. [1] acassen/keepalived@37488e57 [2] acassen/keepalived#445 Closes-bug: #1712388 Change-Id: I260c0e6810ed54c93f93621afa6ab13855ef2428 (cherry picked from commit 334a1ed)
In commit [1] (some explanation in [2] ) VRRP initialisation is enhanced to read source IP address(to use when sending VRRP packets) from the HA interface or from keepalived config("unicast_src_ip" parameter). If it is unable to find IP address, VRRP initialisation will fail with error "Cannot find an IP address to use for interface". In the test, we set vrrp->family to AF_INET by setting vip to 169.254.0.1/24 through config, but not providing source IPv4 address(i.e no 'unicast_src_ip' option or no IP on HA interface), making the test to fail with [1]. To fix that, we set the IP address on HA interface. Note: Commit [1] is added in Keepalived version 1.2.20. Tested the fix on both Keepalived v1.2.19 and Keepalived v1.2.20. [1] acassen/keepalived@37488e57 [2] acassen/keepalived#445 Closes-bug: #1712388 Change-Id: I260c0e6810ed54c93f93621afa6ab13855ef2428 (cherry picked from commit 334a1ed)
I have migrated from Keepalived 1.2.19 to 1.2.23. Now I get the following exception:
(vi-cloud-gateway): Cannot find an IP address to use for interface eth4
This is my configuration on
os-controller01
:and on
os-controller02
:What is wrong with my configuration or am I facing a bug?
The text was updated successfully, but these errors were encountered: