issue with global variable in a simple irule

hi, first of all, excuse my english. i’ve implemented this simple irule:

when RULE_INIT {
  set test 1  
}
when CACHE_REQUEST timing on {
 set httppath [string tolower [HTTP::path]]
  log local0. "mycache $httppath" 
 if { $httppath ends_with ".jpg" } {
  set TTL 240
 }
 elseif { $httppath ends_with ".swf" } {
set TTL 660 
 }
 else {
 este valor debe ser menor o igual que el maximum age de el profile de cache 
set TTL 3610
 }

 if { [CACHE::age] > $TTL } {
    CACHE::expire
if { $TTL == 3610 } {
log "mycache ttl $TTL expired $httppath "
}
  } 
}

the issue appears when i uncomment the line “set test 1” in the RULE_INIT event. I get a lot of this messages in ltm logs

Jul  9 15:09:36 local/ASM1 err mcpd[4473]: 01020066:3: The requested rule (cachesetup) already exists in partition Common.
Jul  9 15:10:28 local/tmm warning tmm[5951]: 011e0002:4: sweeper_update: aggressive mode activated. (376549/442880 pages)
Jul  9 15:10:47 local/tmm warning tmm[5951]: 011e0001:4: Limiting open port RST response from 251 to 250 packets/sec
.......
Jul  9 15:11:36 local/tmm1 warning tmm1[5952]: 011e0002:4: sweeper_update: aggressive mode activated. (376732/442880 pages)
Jul  9 15:11:44 local/tmm1 notice tmm1[5952]: 01010029:5: Clock advanced by 171 ticks
Jul  9 15:11:44 local/tmm1 warning tmm1[5952]: 011e0002:4: sweeper_update: aggressive mode deactivated. (361861/442880 pages)
Jul  9 15:11:51 local/tmm1 warning tmm1[5952]: 011e0002:4: sweeper_update: aggressive mode activated. (379372/442880 pages)
Jul  9 15:16:14 local/ASM1 err bcm56xxd[4498]: 012c0010:3: Failover event detected.  Marking external interfaces down. bsx.c(3276)
Jul  9 15:16:15 local/ASM1 info bcm56xxd[4498]: 012c0015:6: Link: 1.1 is DOWN
Jul  9 15:16:15 local/ASM1 info bcm56xxd[4498]: 012c0015:6: Link: 1.2 is DOWN
Jul  9 15:16:15 local/ASM1 info bcm56xxd[4498]: 012c0015:6: Link: 1.3 is DOWN
Jul  9 15:16:15 local/ASM1 info bcm56xxd[4498]: 012c0015:6: Link: 1.4 is DOWN
Jul  9 15:16:15 local/ASM1 info bcm56xxd[4498]: 012c0015:6: Link: 1.5 is DOWN
Jul  9 15:16:15 local/ASM1 info bcm56xxd[4498]: 012c0015:6: Link: 1.6 is DOWN
Jul  9 15:16:15 local/ASM1 info bcm56xxd[4498]: 012c0015:6: Link: 1.7 is DOWN
Jul  9 15:16:15 local/ASM1 info bcm56xxd[4498]: 012c0015:6: Link: 1.11 is DOWN
Jul  9 15:16:15 local/ASM1 info bcm56xxd[4498]: 012c0015:6: Link: 1.12 is DOWN
Jul  9 15:16:25 local/ASM1 info bcm56xxd[4498]: 012c0012:6: Connected to failover service.

when i disable the line “set test 1” the messages stop and the vserver and pool back to UP state.

the LTM software version is 10.2.0.1707.0

any ideas about this?

thanks

If the only change you’re making is to declare a global variable in RULE_INIT and TMM crashes, I think you’ve found a bug. I’d suggest opening a case with F5 Support.

For 10.x, if you want to maintain CMP compatibility, and you’re wanting to use a variable that doesn’t change and is accessible across all connections you can use ‘set static::test 1’ instead. See the CMP wiki page for details:

http://devcentral.f5.com/wiki/default.aspx/iRules/cmpcompatibility

Aaron

thanks Aaron, i’m opening a ticket with our provider right now.

When you get an answer, would you mind posting the response here for future reference?

Thanks, Aaron