-
-
Save hatan4ik/40a4794003d3862d1c44c95c9a7aa9ac to your computer and use it in GitHub Desktop.
Revisions
-
antonlindstrom revised this gist
Oct 12, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,7 +36,7 @@ virtual_server 10.0.2.16 53 { } # Check for TCP virtual_server 10.0.2.16 53 { delay_loop 6 lb_algo wlc -
antonlindstrom revised this gist
Jul 22, 2011 . 1 changed file with 24 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,6 +12,7 @@ vrrp_instance dns_test { } } # Check for UDP virtual_server 10.0.2.16 53 { delay_loop 6 lb_algo wlc @@ -34,3 +35,26 @@ virtual_server 10.0.2.16 53 { } } # Check for TCP (might work) virtual_server 10.0.2.16 53 { delay_loop 6 lb_algo wlc protocol TCP real_server 10.0.2.20 53 { weight 100 TCP_CHECK { connect_timeout 6 } } real_server 10.0.2.21 53 { weight 100 TCP_CHECK { connect_timeout 6 } } } -
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #!/bin/bash #$Id: keepalivepin,v 1.2 2006/02/27 07:30:41 hmy Exp hmy $ #use dig check the powerdns's status. #in the dns database,have a IN TXT RR keepalivepin.vmmatrix.net,content is "AaBbCcDdEeFf" # Source: http://puppet-manifest-share.googlecode.com/svn/trunk/vmx-puppet/modules/lvs/files/keepalived.dns-pin # RR=keepalivepin.vmmatrix.net [ $# -le 1 ]&&{ echo "usage: ${0} -h <ip>"; exit 126;} while getopts "h:" OPT;do case $OPT in h)host=$OPTARG;; *)echo "usage: $0 -h <ip>"&&exit 1;; esac done dig @${host} txt ${RR}|grep "\<AaBbCcDdEeFf\>" >/dev/null exit $? This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ vrrp_instance dns_test { interface eth0 state MASTER virtual_router_id 51 priority 100 authentication { auth_type PASS auth_pass p4ssw0rd } virtual_ipaddress { 10.0.2.16/24 dev eth0 } } virtual_server 10.0.2.16 53 { delay_loop 6 lb_algo wlc protocol UDP real_server 10.0.2.20 53 { weight 100 MISC_CHECK { connect_timeout 6 misc_path "/etc/keepalived/dnscheck -h 10.0.2.20" } } real_server 10.0.2.21 53 { weight 100 MISC_CHECK { connect_timeout 6 misc_path "/etc/keepalived/dnscheck -h 10.0.2.21" } } }