Skip to content

Commit

Permalink
keepalived-0.7.1
Browse files Browse the repository at this point in the history
* keepalived-0.7.1 released.
* Fixed a MISC_CHECK issue when registering next timer checker. Must
  register a new timer thread before forking process. This imply for
  the user the extra script call must not execute in more than
  checker->vs->delay_loop.
* Extented the ipfwwrapper (for LVS kernel 2.2) to not set ipchains
  rules if nat_mask is not specified in the configuration file.
* VRRP : Added support to delayed gratuitous ARP send. When one instance
  enter to MASTER state a timer thread is registered. The default delay
  is 5secs. This delay is configurable per vrrp instance and handle the
  'garp_master_delay' keyword. This delay refer to the delay after
  MASTER state transition we want to launch gratuitous ARP.
* VRRP : Force health checker enable flag if VRRP framework is not
  selected.
* VRRP : Review the gratuitous ARP helper function to only send
  gratuitous ARP if VRRP VIPs are set.
* VRRP : Review the FSM to eliminate stalled flapping loop. The state
  transition diagram implemented is :
                           +---------------+
          +----------------|               |----------------+
          |                |     Fault     |                |
          |  +------------>|               |<------------+  |
          |  |             +---------------+             |  |
          |  |                     |                     |  |
          |  |                     V                     |  |
          |  |             +---------------+             |  |
          |  |  +--------->|               |<---------+  |  |
          |  |  |          |  Initialize   |          |  |  |
          |  |  |  +-------|               |-------+  |  |  |
          |  |  |  |       +---------------+       |  |  |  |
          |  |  |  |                               |  |  |  |
          V  |  |  V                               V  |  |  V
       +---------------+                       +---------------+
       |               |---------------------->|               |
       |    Master     |                       |    Backup     |
       |               |<----------------------|               |
       +---------------+                       +---------------+
  The state DUMMY_MASTER state has been removed since it is a fake.
* VRRP : In order to handle all possible state transition, a Transition
  State Matrix design (TSM) has been added. This matrix defines
  transition state handlers for VRRP sync group extension. The TSM
  implemented is (cf: vrrp_scheduler.c for more informations) :
   \ E |  B  |  M  |  F  |
   S \ |     |     |     |
 ------+-----+-----+-----+     Legend:
   B   |  x     1     2  |       B: VRRP BACKUP state
 ------+                 |       M: VRRP MASTER state
   M   |  3     x     4  |       F: VRRP FAULT state
 ------+                 |       S: VRRP start state (before transition)
   F   |  5     6     x  |       E: VRRP end state (after transition)
 ------+-----------------+       [1..6]: Handler functions.
* VRRP : Set ms_down_timer to 3 * advert_int + TIMER_SKEW when leaving
  MASTER state.
* VRRP : In MASTER state, when incoming advert match or FAULT state is
  requested then force leaving MASTER state transition. (review the
  previous election approach).
* VRRP : Optimized the leave FAULT state transition. Directly coded into
  the FSM for speed up recovery or code readability.
* VRRP : Extended smtp notifier for BACKUP state. Review the MASTER state
  notification to only notify when VIPs are set.
* some cosmetics patches.
* Adam Fletcher, <adamf@rovia.com> created the 'Keepalived+LVS NAT HOWTO'
  • Loading branch information
Alexandre Cassen committed Sep 28, 2009
1 parent 05ff3a7 commit a39923b
Show file tree
Hide file tree
Showing 68 changed files with 421 additions and 344 deletions.
65 changes: 65 additions & 0 deletions ChangeLog
@@ -1,3 +1,68 @@
2002-09-17 Alexandre Cassen <acassen@linux-vs.org>
* keepalived-0.7.1 released.
* Fixed a MISC_CHECK issue when registering next timer checker. Must
register a new timer thread before forking process. This imply for
the user the extra script call must not execute in more than
checker->vs->delay_loop.
* Extented the ipfwwrapper (for LVS kernel 2.2) to not set ipchains
rules if nat_mask is not specified in the configuration file.
* VRRP : Added support to delayed gratuitous ARP send. When one instance
enter to MASTER state a timer thread is registered. The default delay
is 5secs. This delay is configurable per vrrp instance and handle the
'garp_master_delay' keyword. This delay refer to the delay after
MASTER state transition we want to launch gratuitous ARP.
* VRRP : Force health checker enable flag if VRRP framework is not
selected.
* VRRP : Review the gratuitous ARP helper function to only send
gratuitous ARP if VRRP VIPs are set.
* VRRP : Review the FSM to eliminate stalled flapping loop. The state
transition diagram implemented is :
+---------------+
+----------------| |----------------+
| | Fault | |
| +------------>| |<------------+ |
| | +---------------+ | |
| | | | |
| | V | |
| | +---------------+ | |
| | +--------->| |<---------+ | |
| | | | Initialize | | | |
| | | +-------| |-------+ | | |
| | | | +---------------+ | | | |
| | | | | | | |
V | | V V | | V
+---------------+ +---------------+
| |---------------------->| |
| Master | | Backup |
| |<----------------------| |
+---------------+ +---------------+

The state DUMMY_MASTER state has been removed since it is a fake.
* VRRP : In order to handle all possible state transition, a Transition
State Matrix design (TSM) has been added. This matrix defines
transition state handlers for VRRP sync group extension. The TSM
implemented is (cf: vrrp_scheduler.c for more informations) :
\ E | B | M | F |
S \ | | | |
------+-----+-----+-----+ Legend:
B | x 1 2 | B: VRRP BACKUP state
------+ | M: VRRP MASTER state
M | 3 x 4 | F: VRRP FAULT state
------+ | S: VRRP start state (before transition)
F | 5 6 x | E: VRRP end state (after transition)
------+-----------------+ [1..6]: Handler functions.
* VRRP : Set ms_down_timer to 3 * advert_int + TIMER_SKEW when leaving
MASTER state.
* VRRP : In MASTER state, when incoming advert match or FAULT state is
requested then force leaving MASTER state transition. (review the
previous election approach).
* VRRP : Optimized the leave FAULT state transition. Directly coded into
the FSM for speed up recovery or code readability.
* VRRP : Extended smtp notifier for BACKUP state. Review the MASTER state
notification to only notify when VIPs are set.
* some cosmetics patches.
* Adam Fletcher, <adamf@rovia.com> created the 'Keepalived+LVS NAT HOWTO'

2002-08-05 Alexandre Cassen <acassen@linux-vs.org>
* keepalived-0.6.10 released.
* Fixed a faked flag during VRRP VIP set. Updated the IP address set flag to reflect
Expand Down
2 changes: 1 addition & 1 deletion INSTALL
Expand Up @@ -48,7 +48,7 @@ Configuration
considering keepalived, please refer to the keepalived homepage into the
documentation section.

http://keepalived.sourceforge.net
http://www.keepalived.org


Have fun with it !
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.6.10
0.7.1
6 changes: 3 additions & 3 deletions keepalived.spec
@@ -1,9 +1,9 @@
Summary: Generic HA monitor build upon VRRP and services poller, strongly recommanded for LVS HA.
Name: keepalived
Packager: Christophe Varoqui, <christophe.varoqui@free.fr>
Version: 0.6.10
Version: 0.7.1
Release: 1
Source: http://www.keepalived.org/software/keepalived-0.6.10.tar.gz
Source: http://www.keepalived.org/software/keepalived-0.7.1.tar.gz
Copyright: GPL
Group: Utilities/File
BuildRoot: /tmp/%{name}-%{version}.build
Expand All @@ -14,7 +14,7 @@ The main goal of the keepalived project is to add a strong & robust keepalive fa

%prep
rm -rf %{buildroot}
%setup -n keepalived-0.6.10
%setup -n keepalived-0.7.1

%build
./configure --prefix=%{buildroot} --exec-prefix=%{buildroot} --sysconfdir=%{buildroot}/etc
Expand Down
2 changes: 1 addition & 1 deletion keepalived/core/daemon.c
Expand Up @@ -5,7 +5,7 @@
*
* Part: Main program structure.
*
* Version: $Id: main.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: main.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Author: Alexandre Cassen, <acassen@linux-vs.org>
*
Expand Down
7 changes: 5 additions & 2 deletions keepalived/core/data.c
Expand Up @@ -5,7 +5,7 @@
*
* Part: Dynamic data structure definition.
*
* Version: $Id: data.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: data.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Author: Alexandre Cassen, <acassen@linux-vs.org>
*
Expand Down Expand Up @@ -161,6 +161,8 @@ dump_vrrp(void *data)
if (vrrp->lvs_syncd_if)
syslog(LOG_INFO, " Runing LVS sync daemon on interface = %s",
vrrp->lvs_syncd_if);
if (vrrp->garp_delay)
syslog(LOG_INFO, " Gratuitous ARP delay = %d", vrrp->garp_delay);
syslog(LOG_INFO, " Virtual Router ID = %d", vrrp->vrid);
syslog(LOG_INFO, " Priority = %d", vrrp->priority);
syslog(LOG_INFO, " Advert interval = %dsec",
Expand Down Expand Up @@ -320,7 +322,8 @@ dump_vs(void *data)
#ifdef _KRNL_2_2_
case 0:
syslog(LOG_INFO, " lb_kind = NAT");
syslog(LOG_INFO, " nat mask = %s", inet_ntop2(vs->nat_mask));
if (vs->nat_mask)
syslog(LOG_INFO, " nat mask = %s", inet_ntop2(vs->nat_mask));
break;
case IP_MASQ_F_VS_DROUTE:
syslog(LOG_INFO, " lb_kind = DR");
Expand Down
2 changes: 1 addition & 1 deletion keepalived/core/layer4.c
Expand Up @@ -6,7 +6,7 @@
* Part: Layer4 checkers handling. Register worker threads &
* upper layer checkers.
*
* Version: $Id: layer4.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: layer4.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Author: Alexandre Cassen, <acassen@linux-vs.org>
*
Expand Down
2 changes: 1 addition & 1 deletion keepalived/core/list.c
Expand Up @@ -5,7 +5,7 @@
*
* Part: List structure manipulation.
*
* Version: $Id: list.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: list.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Author: Alexandre Cassen, <acassen@linux-vs.org>
*
Expand Down
2 changes: 1 addition & 1 deletion keepalived/core/main.c
Expand Up @@ -5,7 +5,7 @@
*
* Part: Main program structure.
*
* Version: $Id: main.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: main.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Author: Alexandre Cassen, <acassen@linux-vs.org>
*
Expand Down
2 changes: 1 addition & 1 deletion keepalived/core/memory.c
Expand Up @@ -6,7 +6,7 @@
* Part: Memory management framework. This framework is used to
* find any memory leak.
*
* Version: $Id: memory.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: memory.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Authors: Alexandre Cassen, <acassen@linux-vs.org>
* Jan Holmberg, <jan@artech.net>
Expand Down
11 changes: 10 additions & 1 deletion keepalived/core/parser.c
Expand Up @@ -7,7 +7,7 @@
* data structure representation the conf file representing
* the loadbalanced server pool.
*
* Version: $Id: parser.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: parser.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Author: Alexandre Cassen, <acassen@linux-vs.org>
*
Expand Down Expand Up @@ -486,6 +486,12 @@ vrrp_lvs_syncd_handler(vector strvec)
vrrp->lvs_syncd_if = set_value(strvec);
}
static void
vrrp_garp_delay_handler(vector strvec)
{
vrrp_rt *vrrp = LIST_TAIL_DATA(conf_data->vrrp);
vrrp->garp_delay = atoi(VECTOR_SLOT(strvec, 1));
}
static void
vrrp_auth_type_handler(vector strvec)
{
vrrp_rt *vrrp = LIST_TAIL_DATA(conf_data->vrrp);
Expand Down Expand Up @@ -745,6 +751,7 @@ init_keywords(void)
install_keyword("certificate", &sslcert_handler);
install_keyword("key", &sslkey_handler);

#ifdef _WITH_VRRP_
/* VRRP Instance mapping */
install_keyword_root("vrrp_sync_group", &vrrp_sync_group_handler);
install_keyword("group", &vrrp_group_handler);
Expand All @@ -767,11 +774,13 @@ init_keywords(void)
install_keyword("notify_fault", &vrrp_notify_fault_handler);
install_keyword("smtp_alert", &vrrp_smtp_handler);
install_keyword("lvs_sync_daemon_interface", &vrrp_lvs_syncd_handler);
install_keyword("garp_master_delay", &vrrp_garp_delay_handler);
install_keyword("authentication", NULL);
install_sublevel();
install_keyword("auth_type", &vrrp_auth_type_handler);
install_keyword("auth_pass", &vrrp_auth_pass_handler);
install_sublevel_end();
#endif

#ifdef _WITH_LVS_
/* Real server group mapping */
Expand Down
2 changes: 1 addition & 1 deletion keepalived/core/pidfile.c
Expand Up @@ -5,7 +5,7 @@
*
* Part: pidfile utility.
*
* Version: $Id: pidfile.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: pidfile.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Author: Alexandre Cassen, <acassen@linux-vs.org>
*
Expand Down
2 changes: 1 addition & 1 deletion keepalived/core/scheduler.c
Expand Up @@ -7,7 +7,7 @@
* the thread management routine (thread.c) present in the
* very nice zebra project (http://www.zebra.org).
*
* Version: $Id: scheduler.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: scheduler.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Author: Alexandre Cassen, <acassen@linux-vs.org>
*
Expand Down
2 changes: 1 addition & 1 deletion keepalived/core/smtp.c
Expand Up @@ -7,7 +7,7 @@
* using the smtp protocol according to the RFC 821. A non blocking
* timeouted connection is used to handle smtp protocol.
*
* Version: $Id: smtp.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: smtp.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Author: Alexandre Cassen, <acassen@linux-vs.org>
*
Expand Down
2 changes: 1 addition & 1 deletion keepalived/core/timer.c
Expand Up @@ -5,7 +5,7 @@
*
* Part: Timer manipulations.
*
* Version: $Id: timer.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: timer.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Author: Alexandre Cassen, <acassen@linux-vs.org>
*
Expand Down
2 changes: 1 addition & 1 deletion keepalived/core/utils.c
Expand Up @@ -5,7 +5,7 @@
*
* Part: General program utils.
*
* Version: $Id: utils.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: utils.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Author: Alexandre Cassen, <acassen@linux-vs.org>
*
Expand Down
2 changes: 1 addition & 1 deletion keepalived/core/vector.c
Expand Up @@ -5,7 +5,7 @@
*
* Part: Vector structure manipulation.
*
* Version: $Id: vector.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: vector.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Author: Alexandre Cassen, <acassen@linux-vs.org>
*
Expand Down
2 changes: 1 addition & 1 deletion keepalived/healthcheck/Makefile.in
Expand Up @@ -14,7 +14,7 @@ endif
INCLUDES = -I../include
CFLAGS = @CFLAGS@ $(INCLUDES) \
-Wall -Wunused -Wstrict-prototypes
DEFS = -D$(KERNEL) -D@IPVS_SUPPORT@ -D@IPVS_SYNCD@ @DFLAGS@ $(CIFLAGS)
DEFS = -D$(KERNEL) -D@IPVS_SUPPORT@ -D@IPVS_SYNCD@ -D@VRRP_SUPPORT@ @DFLAGS@ $(CIFLAGS)
COMPILE = $(CC) $(CFLAGS) $(DEFS)

OBJS = check_api.o check_tcp.o check_http.o check_ssl.o \
Expand Down
5 changes: 4 additions & 1 deletion keepalived/healthcheck/check_api.c
Expand Up @@ -5,7 +5,7 @@
*
* Part: Checkers registration.
*
* Version: $Id: check_api.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: check_api.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Author: Alexandre Cassen, <acassen@linux-vs.org>
*
Expand Down Expand Up @@ -70,6 +70,9 @@ queue_checker(void (*free) (void *), void (*dump) (void *)
chk->rs = rs;
chk->data = data;
chk->enabled = (vs->vfwmark) ? 1 : 0;
#ifdef _WITHOUT_VRRP_
chk->enabled = 1;
#endif

/* queue the checker */
list_add(checkers_queue, chk);
Expand Down
2 changes: 1 addition & 1 deletion keepalived/healthcheck/check_ci.c
Expand Up @@ -5,7 +5,7 @@
*
* Part: CI-LINUX checker. Integration to Compaq Cluster Infrastructure.
*
* Version: $Id: check_ci.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: check_ci.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Authors: Alexandre Cassen, <acassen@linux-vs.org>
* Aneesh Kumar K.V, <aneesh.kumar@digital.com>
Expand Down
4 changes: 2 additions & 2 deletions keepalived/healthcheck/check_http.c
Expand Up @@ -5,7 +5,7 @@
*
* Part: WEB CHECK. Common HTTP/SSL checker primitives.
*
* Version: $Id: check_http.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: check_http.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Authors: Alexandre Cassen, <acassen@linux-vs.org>
* Jan Holmberg, <jan@artech.net>
Expand Down Expand Up @@ -421,7 +421,7 @@ http_handle_response(thread * thread, unsigned char digest[16]
return epilog(thread, 1, 1, 0) + 1;
}
}
return epilog(thread, 0, 0, 0) + 1;
return epilog(thread, 1, 0, 0) + 1;
}

/* Asynchronous HTTP stream reader */
Expand Down
10 changes: 5 additions & 5 deletions keepalived/healthcheck/check_misc.c
Expand Up @@ -6,7 +6,7 @@
* Part: MISC CHECK. Perform a system call to run an extra
* system prog or script.
*
* Version: $Id: check_misc.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: check_misc.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Authors: Alexandre Cassen, <acassen@linux-vs.org>
* Eric Jarman, <ehj38230@cmsu2.cmsu.edu>
Expand Down Expand Up @@ -102,6 +102,10 @@ misc_check_thread(thread * thread)
return 0;
}

/* Register next timer checker */
thread_add_timer(thread->master, misc_check_thread, checker,
checker->vs->delay_loop);

/* Daemonization to not degrade our scheduling timer */
pid = fork();

Expand Down Expand Up @@ -142,9 +146,5 @@ misc_check_thread(thread * thread)
}
}

/* Register next timer checker */
thread_add_timer(thread->master, misc_check_thread, checker,
checker->vs->delay_loop);

exit(0);
}
2 changes: 1 addition & 1 deletion keepalived/healthcheck/check_ssl.c
Expand Up @@ -7,7 +7,7 @@
* url, compute a MD5 over this result and match it to the
* expected value.
*
* Version: $Id: check_ssl.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: check_ssl.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Authors: Alexandre Cassen, <acassen@linux-vs.org>
* Jan Holmberg, <jan@artech.net>
Expand Down
2 changes: 1 addition & 1 deletion keepalived/healthcheck/check_tcp.c
Expand Up @@ -5,7 +5,7 @@
*
* Part: TCP checker.
*
* Version: $Id: check_tcp.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: check_tcp.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Author: Alexandre Cassen, <acassen@linux-vs.org>
*
Expand Down
6 changes: 5 additions & 1 deletion keepalived/healthcheck/ipfwwrapper.c
Expand Up @@ -7,7 +7,7 @@
* library to add/remove server MASQ rules to the kernel
* firewall framework.
*
* Version: $Id: ipfwwrapper.c,v 0.6.10 2002/08/06 02:18:05 acassen Exp $
* Version: $Id: ipfwwrapper.c,v 0.7.1 2002/09/17 22:03:31 acassen Exp $
*
* Author: Alexandre Cassen, <acassen@linux-vs.org>
*
Expand All @@ -31,6 +31,10 @@ ipfw_cmd(int cmd, virtual_server * vs, real_server * rs)
struct ip_fwuser ctl;
int ret = 1;

/* Exit if NAT mask is not specified */
if (!vs->nat_mask)
return IPFW_SUCCESS;

memset(&ctl, 0, sizeof (struct ip_fwuser));

/* Create the firewall MASQ rule */
Expand Down

0 comments on commit a39923b

Please sign in to comment.