|
|
Subject: execute a command after getting/loosing a IP-Address? - msg#00011
Hi list,
i've set up a round robin/failover scenario with squid.
Wackamole works fine, but my problem is that, in my case,
squid has to bind itself to a special address (not all 0.0.0.0).
So i have to send a kill -HUP to the squid process, after getting a new
IP address, because squid does not listen to this IP.
The problem occurs with any other process, that binds to a special IP and not
to all.
I've put a line in wackamole.c at the end of the Acquire function:
system ("kill -HUP `cat /var/run/squid.pid >/dev/null 2>&1` >/dev/null 2>&1");
But I don't like this very dirty solution, so i wanted to ask,
if there could be a better way to execute a command after
acquiring/releasing an ip address.
I can write the system stuff in c, but I would prefer a more configurable
solution.
Thanks.
Kind regards,
Oliver Fänger
Thread at a glance:
Previous Message by Date:
RE: BPF
Thanks Theo,
Basically ... I don't think enabling the BPF (Berkley Packet Filter) in the
kernel is going to be an option, due= to the potential security risk .. is
there any other way of enabling this .. or will I have to put my hands up
and not use Wackamole (sniff) .. ?
Your replies are much appreciated.
David
-----Original Message-----
From: wackamole-users-admin@xxxxxxxxxxxxxxxxxx
[mailto:wackamole-users-admin@xxxxxxxxxxxxxxxxxx]On Behalf Of Theo
Schlossnagle
Sent: 20 November 2003 17:43
To: wackamole-users@xxxxxxxxxxxxxxxxxx
Cc: Theo Schlossnagle
Subject: Re: [Wackamole-users] BPF
On Nov 20, 2003, at 7:54 AM, David Carroll wrote:
> Do you need to enable BPF in the kernel of each server that runs
> Wackamole ?
wackamole will open the /dev/bpf### device. I am not sure if that
kernel option is required to use the device node, but if it is, then
yes it is required for Wackamole to run.
// Theo Schlossnagle
// Principal Engineer -- http://www.omniti.com/~jesus/
// Postal Engine -- http://www.postalengine.com/
// Ecelerity: fastest MTA on earth
_______________________________________________
wackamole-users mailing list
wackamole-users@xxxxxxxxxxxxxxxxxx
http://lists.backhand.org/mailman/listinfo/wackamole-users
Next Message by Date:
Re: execute a command after getting/loosing a IP-Address?
So, we don't provide any solutions to this problem within Wackamole.
However, I'm sure someone else has had to deal with it, and might answer
you with something they've already developed. (This is a big holiday in
the US, which means a lot of people on the list probably won't be
responding for a few days).
The solution you proposed is probably the quickest and dirtiest way to
get what you want. If you wanted something more powerful, using the
same mechanism to run a pair of shell-scripts "Acquire-script" and
"Release-script" would give this to you. However, I'd be a little
worried about doing so in a general situation, because of the privileges
with which Wackamole is run.
I wouldn't recommend adding anything too complicated directly to
Wackamole, because of timing concerns. You might consider a
long-running daemon to handle this failover, that communicates
(something along the lines of "Acquire/Release address") with Wackamole
via named pipes or another Unix IPC mechanism.
Hops this helps,
Ryan
Oliver Fänger wrote:
Hi list,
i've set up a round robin/failover scenario with squid.
Wackamole works fine, but my problem is that, in my case,
squid has to bind itself to a special address (not all 0.0.0.0).
So i have to send a kill -HUP to the squid process, after getting a new
IP address, because squid does not listen to this IP.
The problem occurs with any other process, that binds to a special IP
and not
to all.
I've put a line in wackamole.c at the end of the Acquire function:
system ("kill -HUP `cat /var/run/squid.pid >/dev/null 2>&1` >/dev/null
2>&1");
But I don't like this very dirty solution, so i wanted to ask,
if there could be a better way to execute a command after
acquiring/releasing an ip address.
I can write the system stuff in c, but I would prefer a more
configurable solution.
Thanks.
Kind regards,
Oliver Fänger
_______________________________________________
wackamole-users mailing list
wackamole-users@xxxxxxxxxxxxxxxxxx
http://lists.backhand.org/mailman/listinfo/wackamole-users
--
Ryan W. Caudy
Center for Networking and Distributed Systems
Department of Computer Science
Johns Hopkins University
Previous Message by Thread:
BPF
Hi All,
I have a quick question.
Do you need to enable BPF in the kernel of each server that runs Wackamole ?
Thanks
David,
Next Message by Thread:
Re: execute a command after getting/loosing a IP-Address?
So, we don't provide any solutions to this problem within Wackamole.
However, I'm sure someone else has had to deal with it, and might answer
you with something they've already developed. (This is a big holiday in
the US, which means a lot of people on the list probably won't be
responding for a few days).
The solution you proposed is probably the quickest and dirtiest way to
get what you want. If you wanted something more powerful, using the
same mechanism to run a pair of shell-scripts "Acquire-script" and
"Release-script" would give this to you. However, I'd be a little
worried about doing so in a general situation, because of the privileges
with which Wackamole is run.
I wouldn't recommend adding anything too complicated directly to
Wackamole, because of timing concerns. You might consider a
long-running daemon to handle this failover, that communicates
(something along the lines of "Acquire/Release address") with Wackamole
via named pipes or another Unix IPC mechanism.
Hops this helps,
Ryan
Oliver Fänger wrote:
Hi list,
i've set up a round robin/failover scenario with squid.
Wackamole works fine, but my problem is that, in my case,
squid has to bind itself to a special address (not all 0.0.0.0).
So i have to send a kill -HUP to the squid process, after getting a new
IP address, because squid does not listen to this IP.
The problem occurs with any other process, that binds to a special IP
and not
to all.
I've put a line in wackamole.c at the end of the Acquire function:
system ("kill -HUP `cat /var/run/squid.pid >/dev/null 2>&1` >/dev/null
2>&1");
But I don't like this very dirty solution, so i wanted to ask,
if there could be a better way to execute a command after
acquiring/releasing an ip address.
I can write the system stuff in c, but I would prefer a more
configurable solution.
Thanks.
Kind regards,
Oliver Fänger
_______________________________________________
wackamole-users mailing list
wackamole-users@xxxxxxxxxxxxxxxxxx
http://lists.backhand.org/mailman/listinfo/wackamole-users
--
Ryan W. Caudy
Center for Networking and Distributed Systems
Department of Computer Science
Johns Hopkins University
|
|