Forum Discussion
DNS caching
I have created my first irule but get an error when RULE_INIT {
Hostname to resolve to IP - Production
set ::EBSProductionHost "edt-online.ebs.nationalgrid.com"
Time in ms after which to re-query DNS server
set ::QueryTime 30000
table add -subtable "DNS" "Production" "[RESOLV::lookup @10.165.128.41 $::EBSProductionHost]" indef
after $::QueryTime - periodic { table replace -subtable "DNS" "Production" "[RESOLV::lookup @10.165.128.41 $::EBSProductionHost]" indef }
}
when CLIENT_ACCEPTED {
Retrieve VIP address from table and define variable
set ::VIP [table lookup -subtable "DNS" "Prodution"]
Select the IP
log local0. "IP resolved! - [lindex $::VIP 0]"
node [lindex ::VIP 0] 21
}
error as
01070151:3: Rule [/Common/ebs_dns_edt] error: /Common/ebs_dns_edt:9: error: [command is not valid in current event context (RULE_INIT)][RESOLV::lookup @10.165.128.41 $::EBSProductionHost] /Common/ebs_dns_edt:9: error: [command is not valid in current event context (RULE_INIT)][table add -subtable "DNS" "Production" "[RESOLV::lookup @10.165.128.41 $::EBSProductionHost]" indef]
1 Reply
- nitass
Employee
sol14320: Some Tcl commands that park the Tcl interpreter are not supported for non-flow events
http://support.f5.com/kb/en-us/solutions/public/14000/300/sol14320
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com