Bug 977705 - keepalived and ipv6
keepalived and ipv6
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: keepalived (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Ryan O'Hara
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-25 03:45 EDT by Patrik Martinsson
Modified: 2013-07-09 15:25 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-09 15:25:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Patrik Martinsson 2013-06-25 03:45:27 EDT
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@bar.com
   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 07:00:51 EDT
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 11:28:40 EDT
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 11:40:22 EDT
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 15:24:56 EDT
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.