LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Broken ldirectord reload

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Broken ldirectord reload
From: "Tomas Hoger" <tomas.hoger@xxxxxxxxx>
Date: Wed, 14 Mar 2007 14:15:34 +0100
Hi!

ldirectord (version 1.186/1.42) does not seem to handle reloads
correctly.   After reload, some parameters for virtual server in its
hash are left uninitialized (e.g. $$v{proto}).  As the result, service
checking does not work correctly any more and ldirectord is attempting
to run ipvsadm with invalid list of arguments.

Missing parameters are normally initialized in ld_setup function.
This function is not called during reload.  Adding ld_setup call to
reread_config seems to fix the issue.  Possible fix:

--- /usr/sbin/ldirectord.orig   2007-02-12 23:06:29.000000000 +0100
+++ /usr/sbin/ldirectord        2007-03-14 12:08:36.000000000 +0100
@@ -917,6 +917,8 @@
               &ld_cmd_children("stop", %STOP);
               &ld_cmd_children("reload_or_start", %RELOAD);
               &ld_cmd_children("start", %START);
+
+               &ld_setup();
       };
       if ($@) {
               @VIRTUAL = @OLDVIRTUAL;

Can anyone more familiar with ldirectord internals review such fix and
point out potential problems?

Thanks!

th.

<Prev in Thread] Current Thread [Next in Thread>