RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 977705 - keepalived and ipv6
Summary: keepalived and ipv6
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: keepalived
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ryan O'Hara
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-25 07:45 UTC by Patrik Martinsson
Modified: 2013-07-09 19:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-09 19:25:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Patrik Martinsson 2013-06-25 07:45:27 UTC
Description of problem:
I'm really trying to understand how keepalived handles ipv6 VIP's and what's the general idea and best practise is, however I seem to miss something.
I don't understand why you wouldn't want to have keepalived to set the preferred_lft to zero when bringing up the VIP's, or actually what I don't understand is how to make various checks work with the source-address beeing the VIP and not the "iron-address". 

Version-Release number of selected component (if applicable):


How reproducible:
Always, 

Steps to Reproduce:


1. Set up keepalived with ipv6 with following config, 


# keepalived.conf,
global_defs {
   notification_email_from foo
   smtp_server bar.com
   smtp_connect_timeout 30
   lvs_id ER-TST-LD-MASTER
}

vrrp_instance VI_1 {
        state MASTER
        interface eth0
        lvs_sync_daemon_interface eth0
        virtual_router_id 56
        priority 150
        advert_int 1
        smtp_alert
        authentication {
                auth_type PASS
                auth_pass example
        }
        virtual_ipaddress {
           XXXX:XXX:XXX:XXXX::46
        }
}

virtual_server XXXX:XXX:XXX:XXXX::46  0 {
    delay_loop 10
    lb_algo rr
    lb_kind DR
    persistence_timeout 900
    protocol TCP
    real_server XXXX:XXX:XXX:XXXX::17 0 {
        weight 1
        inhibit_on_failure
        MISC_CHECK {
          misc_path "/etc/keepalived/check_tcp -H XXXX:XXX:XXX:XXXX::17 -p 21"
          misc_timeout 30
        }
    }
}
# end keepalived.conf 

Actual results:
The realserver never return the packets since the source address of the packet is the VIP (and the VIP is locally on the realserver).  

Expected results:
Well, I would expect the packet to return to keepalived so the healthcheck could work as intended. 



Additional info:
So, this would mean that when keepalived performs the check to see if the realserver (XX:17 on port 21) is alive, the source-address of that packet is the VIP (XX:46), which of course also is up on the realserver, which in turns would mean that the packet never returns to keepalived. And thus making keepalived to mark the realserver as down (since it doesnt get any reply).

So, what I'm I missing here, how is this suppose to work ?

I've been trying to read the following discussions, they seem to have the same problem,
http://www.ietf.org/mail-archive/web/v6ops/current/msg15266.html
http://marc.info/?l=keepalived-devel&m=130200733315039 (there's a patch that would make sense to me, but never got accepted if I'm not mistaken)

Comment 1 Patrik Martinsson 2013-06-27 11:00:51 UTC
I've made a simple picture trying to explain the situation, http://i.imgur.com/cIGr4wI.png

Comment 2 Ryan O'Hara 2013-06-27 15:28:40 UTC
There is not enough information here to suggest that there is a bug in keepalived. My suggestions is that you ask for assistance on the upstream mailing list. You might also want to use tcpdump to figure out what is happening with the health check.

Comment 3 Ryan O'Hara 2013-06-27 15:40:22 UTC
Do you have multiple IPv6 addresses on the interface? If so, can you verify the behavior described the patch? If you can, capture the packet sent by keepalived for the health check. Is it the most recently added IPv6 address? It would also be helpful if you could test the patch.

Comment 4 Ryan O'Hara 2013-07-09 19:24:56 UTC
When using keepalived's built-in health checkers, you can control the source addres of the health checks by using the 'bindto' parameter. For example, using the built-in TCP_CHECK:

    real_server fec0:0:a0e:5400:10:15ff:fe84:701 80 {
        weight 1
        TCP_CHECK {
            bindto fec0:0:a0e:5400:67d:7bff:fefc:1329
            connect_timeout 3
        }
    }

In this example, the health checks from will have source address of 'fec0:0:a0e:5400:67d:7bff:fefc:1329'.

However you appear to be using MISC_CHECK, which does not support 'bindto' since it simply executes the command. My suggestion is to modify your health checker such that you can specify an address to bind to.


Note You need to log in before you can comment on or make changes to this bug.