Keepalived v1.3.5 failing to assign IP for HA interface

Bug #1712388 reported by venkata anil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
venkata anil

Bug Description

From the below syslog, I see keepalived is unable to read IP address from config filr to configure HA interface(though config file is properly configured). Need to check why this is happening. I also tested Keepalived v1.3.5 on ubuntu machine and saw the same error.

Steps to reproduce:
Install Keepalived v1.3.5 and run below functional test
neutron.tests.functional.sanity.test_sanity.SanityTestCaseRoot.test_keepalived_ipv6_support
This test will fail and you can see the errors in syslog.

Complete syslog -

Aug 22 19:52:01 vagrant6 Keepalived[14752]: Starting Keepalived v1.3.5 (03/19,2017), git commit v1.3.5-6-g6fa32f2
Aug 22 19:52:01 vagrant6 Keepalived[14752]: Unable to resolve default script username 'keepalived_script' - ignoring
Aug 22 19:52:01 vagrant6 Keepalived[14752]: Opening file '/tmp/tmpxxwEQH/tmpeVAVKR/router1/keepalived.conf'.
Aug 22 19:52:01 vagrant6 Keepalived[14753]: Starting VRRP child process, pid=14754
Aug 22 19:52:01 vagrant6 Keepalived_vrrp[14754]: Registering Kernel netlink reflector
Aug 22 19:52:01 vagrant6 Keepalived_vrrp[14754]: Registering Kernel netlink command channel
Aug 22 19:52:01 vagrant6 Keepalived_vrrp[14754]: Registering gratuitous ARP shared channel
Aug 22 19:52:01 vagrant6 Keepalived_vrrp[14754]: Opening file '/tmp/tmpxxwEQH/tmpeVAVKR/router1/keepalived.conf'.
Aug 22 19:52:01 vagrant6 Keepalived_vrrp[14754]: (VR_1): Cannot find an IP address to use for interface ha-c896a1c
Aug 22 19:52:02 vagrant6 Keepalived_vrrp[14754]: Stopped
Aug 22 19:52:02 vagrant6 Keepalived[14753]: Keepalived_vrrp exited with permanent error CONFIG. Terminating
Aug 22 19:52:02 vagrant6 Keepalived[14753]: Stopping
Aug 22 19:52:07 vagrant6 Keepalived[14753]: Stopped Keepalived v1.3.5 (03/19,2017), git commit v1.3.5-6-g6fa32f2

Changed in neutron:
assignee: nobody → venkata anil (anil-venkata)
Changed in neutron:
importance: Undecided → Medium
status: New → Confirmed
tags: added: func
tags: added: functional-tests
removed: func
tags: added: l3-ha
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/496615

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/496615
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=334a1ed7d52afa21230db8588dd4cc1673386ae3
Submitter: Jenkins
Branch: master

commit 334a1ed7d52afa21230db8588dd4cc1673386ae3
Author: venkata anil <email address hidden>
Date: Wed Aug 23 14:01:19 2017 +0300

    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] https://github.com/acassen/keepalived/commit/37488e57
    [2] https://github.com/acassen/keepalived/issues/445

    Closes-bug: #1712388
    Change-Id: I260c0e6810ed54c93f93621afa6ab13855ef2428

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/497157

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/497187

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/ocata)

Reviewed: https://review.openstack.org/497187
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=26383b0339120875c4cf464c710fe25c47460d7b
Submitter: Jenkins
Branch: stable/ocata

commit 26383b0339120875c4cf464c710fe25c47460d7b
Author: venkata anil <email address hidden>
Date: Wed Aug 23 14:01:19 2017 +0300

    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] https://github.com/acassen/keepalived/commit/37488e57
    [2] https://github.com/acassen/keepalived/issues/445

    Closes-bug: #1712388
    Change-Id: I260c0e6810ed54c93f93621afa6ab13855ef2428
    (cherry picked from commit 334a1ed7d52afa21230db8588dd4cc1673386ae3)

tags: added: in-stable-ocata
tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/pike)

Reviewed: https://review.openstack.org/497157
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=c16800f02aa740142d0e7655086dfafb23b96f51
Submitter: Jenkins
Branch: stable/pike

commit c16800f02aa740142d0e7655086dfafb23b96f51
Author: venkata anil <email address hidden>
Date: Wed Aug 23 14:01:19 2017 +0300

    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] https://github.com/acassen/keepalived/commit/37488e57
    [2] https://github.com/acassen/keepalived/issues/445

    Closes-bug: #1712388
    Change-Id: I260c0e6810ed54c93f93621afa6ab13855ef2428
    (cherry picked from commit 334a1ed7d52afa21230db8588dd4cc1673386ae3)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 10.0.4

This issue was fixed in the openstack/neutron 10.0.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 11.0.1

This issue was fixed in the openstack/neutron 11.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 12.0.0.0b1

This issue was fixed in the openstack/neutron 12.0.0.0b1 development milestone.

Revision history for this message
reza (rezabojnordi) wrote :

I am using ussuri OpenStack but keepalive doesn't assign IP for HA interface?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.