Forum Discussion

Sridhar_111831's avatar
Sridhar_111831
Icon for Nimbostratus rankNimbostratus
Jun 14, 2017

Help with irule using eval and RESOLV

Help with irule using eval and RESOLV

 

I've an iapp and im trying to cache dns server response. The irule works on standalone F5 running 11.5.3 but fails on HA pair (no mirror, active/standby).

 

Section of the irule which is not working:

 

when RULE_INIT {
set static::ext1 { RESOLV::lookup @$::dns__ip1 -a $::main__dns__name }

   after 10000 -periodic {
    set srv_ips \[ eval \$static::ext1 \]
    set dest \[ lindex \$srv_ips 0 \]
    }
  }

This is not complete irule but a section of it. Pls note that irule does works with standalone box and only with HA pair running same sw code it doesnt work. on HA pair either the RESOLV or eval doesnt work and returns blank response.

 

Following are the things tried

 

a. Reboot of F5 (guest and host) b. tried inputing %0 indicating default route domain in the iapp where it takes DNS as input. c. Unable to use RESOLV without since event is RULE_INIT. However, the same irule works on host which is standalone. d. did pcap and could not find any DNS queries made out. e. Suspected rule_init is not triggered and made modifications to that section. Later noticed that every time iapp is applied, rule_init is invoked.

 

Any suggestions/advise would be helpful.

 

  • Could you post the error you are getting from /var/log/ltm when you reproduce the issue.

     

    Thanks

     

  • there are no errors.. its just that DNS Resolv is not working and it returns blank. If i added a log statement to print the variable value, it returns nothing. Same log on standalone box returns DNS IP.