Forum Discussion
Ulf_Zimmermann_
Sep 15, 2009Nimbostratus
Ok, I think this is working as I intend it to work:
when HTTP_REQUEST {
set downtimepool "Downtime-NonSSL"
set downtimemember "10.21.67.103"
set downtimeport "16080"
set downtime 0
if { ([LB::status pool $downtimepool member $downtimemember $downtimeport] eq "up") and (![IP::addr [IP::client_addr]/16 equals 10.21.0.0]) } {
pool $downtimepool
log local0. "Sending request to pool $downtimepool"
set downtime 1
}
}
when SERVER_CONNECTED {
if { $downtime == 1 and [PROFILE::exists serverssl] == 1 } {
set disable "SSL::disable serverside"
catch {eval $disable}
log local0. "Disabled server side SSL"
}
}
Now I will let the people, who take applications up/down, set the node enable/disable via SOAP/XML and that should allow them to control the direction to another pool. I probably will expand the IP::addr match up there to a class, as we use not only 10.0.0.0/8 inside the company but one office still uses 100.0.0.0/8 (not my call). Plus there might be the need for some real IP addresses used for people sitting at home during our software releases.