Fix VRRP script not running any more after reload.
authorVincent Bernat <bernat@luffy.cx>
Tue, 6 Oct 2009 07:12:10 +0000 (07:12 +0000)
committerAlexandre Cassen <acassen@freebox.fr>
Thu, 5 Nov 2009 17:12:56 +0000 (18:12 +0100)
After a reload, if a script was successful before reload and is still
present in the new configuration, its result was set to rise value to
keep its success status. However, in vrrp_init_script(), it was not
registered any more. Therefore, we set result to
VRRP_SCRIPT_STATUS_INIT_GOOD on reload and this will be changed to
rise value in vrrp_init_script() later (while registering it).

keepalived/vrrp/vrrp.c

index 589ccf9..a0673f0 100644 (file)
@@ -1190,7 +1190,7 @@ clear_diff_script(void)
                        if (nvscript) {
                                log_message(LOG_INFO, "VRRP_Script(%s) considered successful on reload",
                                           nvscript->sname);
-                               nvscript->result = nvscript->rise;
+                               nvscript->result = VRRP_SCRIPT_STATUS_INIT_GOOD;
                        }
                }
        }