LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: ipvsadm from cron ?

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: ipvsadm from cron ?
From: Dominik Klein <dk@xxxxxxxxxxxxxxxx>
Date: Tue, 25 Apr 2006 11:57:03 +0200
Olivier Bonvalet schrieb:
Hello,

I'm trying to change the weight of some real servers in cron, because they have some "heavy" tasks.

So, some minutes before this tasks, I set to put the weight to 0, with lines like this one : 45-59 23 * * 1 root /sbin/ipvsadm -e -t VIP:80 -r real1.hostname.tld -i -w 0

This command works perfectly in command line, but when started from cron, it have no effect.
In logs, I see only this :
Apr 24 23:45:01 LB1 /USR/SBIN/CRON[22494]: (root) CMD (/sbin/ipvsadm -e -t VIP:80 -r real1.hostname.tld -i -w 0)

Did you try to use the IP instead of the DNS name? Just an idea ...
Otherwise, dump your shell's env, put it in a script, execute the ipvsadm command at the end of the script and put that script in cron.

Might work, did not test it.

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