Forum Discussion

boneyard's avatar
Aug 27, 2013

iRule: effect of updating subtable lifetime

if i create a subtable with a certain timeout and lifetime and then later on change the timeout and lifetime it seems that the timeout is correctly updated with the new value which starts counting down again. but the lifetime seems to remember the moment it was created and only calculates the new lifetime value based on the moment of creation.

 

is this expected behavior?, is there an easy way to change that moment of creation? (except for delete and recreate).

 

  • thank you nitass, was a little lazy and not that sharp yesterday, i now see how it functions, pretty useful.

     

  • but is that irule fully correct? cant really match the output with the irule.

     

    the irule is used to execute command (table command in this case). yes, the log is generated by the irule.

     

  • thanks, but is that irule fully correct? cant really match the output with the irule.

     

  • i cannot find document where i read. anyway, yes i believe it is expected behavior. the lifetime is counted from when entry is added into table.

    // config
    
    [root@ve11a:Active:In Sync] config  tmsh list ltm rule qux
    ltm rule qux {
        when HTTP_REQUEST {
      set cmd [string map {/ " "} [HTTP::path]]
      log local0. "$cmd = [eval $cmd]"
      HTTP::respond 200
    }
    }
    
    // test
    
    [root@ve11a:Active:In Sync] config  tail -f /var/log/ltm
    Aug 16 03:35:50 ve11a info tmm[29362]: Rule /Common/qux :  table set -subtable test abc 123 indef 300 = 123
    Aug 16 03:36:06 ve11a info tmm1[29362]: Rule /Common/qux :  table lifetime -subtable test -remaining abc = 284
    Aug 16 03:36:12 ve11a info tmm[29362]: Rule /Common/qux :  table lifetime -subtable test abc 300 = 300
    Aug 16 03:36:17 ve11a info tmm1[29362]: Rule /Common/qux :  table lifetime -subtable test -remaining abc = 273
    Aug 16 03:36:24 ve11a info tmm[29362]: Rule /Common/qux :  table lifetime -subtable test abc 300 = 300
    Aug 16 03:36:26 ve11a info tmm1[29362]: Rule /Common/qux :  table lifetime -subtable test -remaining abc = 264
    Aug 16 03:36:31 ve11a info tmm[29362]: Rule /Common/qux :  table lifetime -subtable test abc 600 = 600
    Aug 16 03:36:33 ve11a info tmm1[29362]: Rule /Common/qux :  table lifetime -subtable test -remaining abc = 557
    
    
  • is this expected behavior?

     

    i think it is expected but i do not remember where i got it. let me check if i can find. :-)