From 5f8d58ffef12096558a0fb7a8b6a03f83a50bb06 Mon Sep 17 00:00:00 2001 From: PiBa-NL Date: Tue, 10 Feb 2015 01:16:37 +0100 Subject: haproxy-devel,bump 0.19, fixed carp monitoring and added conversion from old carp-monitor config --- config/haproxy-devel/haproxy.inc | 2 +- config/haproxy-devel/pkg/haproxy_upgrade_config.inc | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'config/haproxy-devel') diff --git a/config/haproxy-devel/haproxy.inc b/config/haproxy-devel/haproxy.inc index bc2b0ac8..54cfb81b 100644 --- a/config/haproxy-devel/haproxy.inc +++ b/config/haproxy-devel/haproxy.inc @@ -472,7 +472,7 @@ function haproxy_install_cron($should_install) { $cron_item['month'] = "*"; $cron_item['wday'] = "*"; $cron_item['who'] = "root"; - $cron_item['command'] = "/usr/local/etc/rc.d/haproxy.sh check"; + $cron_item['command'] = "/usr/local/etc/rc.d/haproxy.sh onecheck"; $config['cron']['item'][] = $cron_item; parse_config(true); write_config("haproxy, install cron CARP job"); diff --git a/config/haproxy-devel/pkg/haproxy_upgrade_config.inc b/config/haproxy-devel/pkg/haproxy_upgrade_config.inc index 9c602457..c1c951df 100644 --- a/config/haproxy-devel/pkg/haproxy_upgrade_config.inc +++ b/config/haproxy-devel/pkg/haproxy_upgrade_config.inc @@ -179,6 +179,20 @@ function haproxy_upgrade_config() { } $configversion = "00.17"; } + if ($configversion < "00.19") { + update_output_window($static_output); + $carpint = $config['installedpackages']['haproxy']['carpdev']; + if (is_arrayset($config, 'virtualip', 'vip') && is_arrayset($config, 'installedpackages', 'haproxy')) { + foreach($config['virtualip']['vip'] as $carp) { + $carp_int = "{$carp['interface']}_vip{$carp['vhid']}"; + if ($carp_int == $carpint) { + $config['installedpackages']['haproxy']['carpdev'] = $carp['subnet']; + break; + } + } + } + $configversion = "00.19"; + } $writeconfigupdate = $config['installedpackages']['haproxy']['configversion'] <> $configversion; if ($writeconfigupdate) { -- cgit v1.2.3