~ubuntu-branches/ubuntu/karmic/keepalived/karmic

« back to all changes in this revision

Viewing changes to keepalived/vrrp/vrrp_scheduler.c

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Wirt
  • Date: 2006-06-28 20:01:56 UTC
  • mfrom: (3.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20060628200156-nrd7ykkgxgyhxl46
Tags: 1.1.12-1
* New upstream release (Closes: #365220)
* Call notification for every failure. Thanks to Len Sorenson for
  the patch (Closes: #336885)
* delete /tmp/.vrrp and /tmp/.healthcheckers if they exists before
  starting keepalived (Closes: #333102)
* bumped standard version

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *
6
6
 * Part:        Sheduling framework for vrrp code.
7
7
 *
8
 
 * Version:     $Id: vrrp_scheduler.c,v 1.1.11 2005/03/01 01:22:13 acassen Exp $
 
8
 * Version:     $Id: vrrp_scheduler.c,v 1.1.12 2006/03/09 01:22:13 acassen Exp $
9
9
 *
10
10
 * Author:      Alexandre Cassen, <acassen@linux-vs.org>
11
11
 *
19
19
 *              as published by the Free Software Foundation; either version
20
20
 *              2 of the License, or (at your option) any later version.
21
21
 *
22
 
 * Copyright (C) 2001-2005 Alexandre Cassen, <acassen@linux-vs.org>
 
22
 * Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
23
23
 */
24
24
 
25
25
#include "vrrp_scheduler.h"
186
186
                        /* Check if sync daemon handling is needed */
187
187
                        if (vrrp->lvs_syncd_if)
188
188
                                ipvs_syncd_cmd(IPVS_STARTDAEMON,
189
 
                                               vrrp->lvs_syncd_if, IPVS_MASTER);
 
189
                                               vrrp->lvs_syncd_if, IPVS_MASTER,
 
190
                                               vrrp->vrid);
190
191
#endif
191
192
                        vrrp->state = VRRP_STATE_GOTO_MASTER;
192
193
                } else {
196
197
                        /* Check if sync daemon handling is needed */
197
198
                        if (vrrp->lvs_syncd_if)
198
199
                                ipvs_syncd_cmd(IPVS_STARTDAEMON,
199
 
                                               vrrp->lvs_syncd_if, IPVS_BACKUP);
 
200
                                               vrrp->lvs_syncd_if, IPVS_BACKUP,
 
201
                                               vrrp->vrid);
200
202
#endif
201
203
                        syslog(LOG_INFO, "VRRP_Instance(%s) Entering BACKUP STATE",
202
204
                               vrrp->iname);
568
570
                vrrp_log_int_down(vrrp);
569
571
                syslog(LOG_INFO, "VRRP_Instance(%s) Now in FAULT state",
570
572
                       vrrp->iname);
 
573
                if(vrrp->state != VRRP_STATE_FAULT) {
 
574
                        notify_instance_exec(vrrp, VRRP_STATE_FAULT);
 
575
                }
571
576
                vrrp->state = VRRP_STATE_FAULT;
572
577
                vrrp->ms_down_timer =
573
578
                    3 * vrrp->adver_int + VRRP_TIMER_SKEW(vrrp);