Forum Discussion

Casey_Lucas_167's avatar
Casey_Lucas_167
Icon for Nimbostratus rankNimbostratus
Mar 26, 2014

How long should an old version of an iRule hang around?

I'm doing some iRule development/testing (11.3) and noticed that my log statements (via

log local0. "msg..."
) were continuing to be executed even after I had changed or removed them (by updating the iRule definition in the iRuler GUI). I assume that the old iRule definition is still associated with a connection, but I'm guessing on this one. How can I reliably test an iRule if I can't be confident that my new changes are even being used? Any other thoughts on how to make sure my new iRule version will be used? Maybe the iRule version remains with a client connection forever.

Note, I tried disabling the virt and even removing the iRule altogether but still the original log message remained.

  • Ah, I apologize I had been assuming your traffic was HTTP traffic which is short lived. Changes like this are applied to all new connections. It sounds like as you discovered you can either stop the application or clear the current connection table to ensure the change applies to all connections.

     

9 Replies

  • What is the "iRuler GUI".

     

    Do you mean the TMUI?

     

    If so updates should be immediate. I would check to see that this or other irules are not applied in other places causing these messages to occur.

     

    • Casey_Lucas_167's avatar
      Casey_Lucas_167
      Icon for Nimbostratus rankNimbostratus
      Sorry, i meant the iRule Editor. As i mentioned, I _deleted_ the irule altogether and still saw the messages.
  • Look directly on the box and check if the iRule is still there. You shouldn't be able to delete an iRule that is currently applied to a Virtual Server, so something is not computing.

     

    • Casey_Lucas_167's avatar
      Casey_Lucas_167
      Icon for Nimbostratus rankNimbostratus
      I removed it from all virtual servers and then deleted it...yet still saw log messages. Only when I stopped the applications that had outstanding (client side) connections (which were making periodic requests) did the log messages stop.
  • Ah, I apologize I had been assuming your traffic was HTTP traffic which is short lived. Changes like this are applied to all new connections. It sounds like as you discovered you can either stop the application or clear the current connection table to ensure the change applies to all connections.

     

    • Casey_Lucas_167's avatar
      Casey_Lucas_167
      Icon for Nimbostratus rankNimbostratus
      It was HTTP traffic but the connections were persistent (keep-alive, etc.). Good to know about the "new connections". Do you know if there is a way within the LTM to "clear the current connection table"? I'm just looking for a reliable and fast irule development cycle. Ex: make changes to irule, clear connection table, retest. Thanks BTW.
    • safeinst_110941's avatar
      safeinst_110941
      Icon for Cirrus rankCirrus
      Do not confuse persistent connections with active connections. An easy way to distinguish the two. View connection table: tmsh show sys connection View persistence table tmsh show ltm persistence persist-records Either can be deleted by doing a: tmsh delete sys connection or tmsh delete ltm persistence persist-records Please keep in mind that this will impact client traffic.
    • Casey_Lucas_167's avatar
      Casey_Lucas_167
      Icon for Nimbostratus rankNimbostratus
      Thanks. I found that when developing / testing irules these persistent browser connections can be annoying because the persistent connections will not be using my latest irule changes. So, in case someone else is interested in the specific commands that will clear connections to a specific virtual, here's what I used for clearing connections. I have two virtual servers (port 80 and 443) for ip 10.15.43.41 and want to drop all the client connections to both of them. ~~~ tmsh show sys connection cs-server-addr 10.15.43.41 Sys::Connections 10.15.16.149:63250 10.15.43.41:80 any6.any any6.any tcp 7 (tmm: 1) none 10.15.16.149:63077 10.15.43.41:80 any6.any any6.any tcp 31 (tmm: 0) none 10.15.16.149:63252 10.15.43.41:80 any6.any any6.any tcp 37 (tmm: 1) none ~~~ These are my test browser connections. I want them to go away so I can test my irule changes. This command will get rid of them: ~~~ tmsh delete sys connection cs-server-addr 10.15.43.41 tmsh show sys connection cs-server-addr 10.15.43.41 Sys::Connections Total records returned: 0 ~~~ If you only want to kill connections to a specific virtual, you might include the port using the cs-server-port option.