From 9b0ddd8cf37fbf4e453d476a985f00e36bbb0861 Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 2 May 2011 22:04:56 +0000 Subject: [PATCH] Resolves #1486. When sticky option is selected under advanced->misc honor it even in the relayd.conf setting. --- etc/inc/vslb.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etc/inc/vslb.inc b/etc/inc/vslb.inc index 2c3f0ca5eb..f984b60036 100644 --- a/etc/inc/vslb.inc +++ b/etc/inc/vslb.inc @@ -241,6 +241,9 @@ function relayd_configure() { $conf .= " listen on {$vs_a[$i]['ipaddr']} port {$vs_a[$i]['port']}\n"; $conf .= " forward to <{$vs_a[$i]['pool']}> port {$pools[$vs_a[$i]['pool']]['port']} {$check_a[$pools[$vs_a[$i]['pool']]['monitor']]} timeout 1000\n"; + if (isset($conf['system']['lb_use_sticky'])) + $conf .= " sticky-address\n"; + # sitedown MUST use the same port as the primary pool - sucks, but it's a relayd thing if (isset($vs_a[$i]['sitedown']) && strlen($vs_a[$i]['sitedown']) > 0) $conf .= " forward to <{$vs_a[$i]['sitedown']}> port {$pools[$vs_a[$i]['pool']]['port']} {$check_a[$pools[$vs_a[$i]['pool']]['monitor']]} timeout 1000\n"; @@ -354,4 +357,4 @@ function get_lb_summary() { return $relay_hosts; } -?> \ No newline at end of file +?>