Forum Discussion

Dave_20275's avatar
Dave_20275
Icon for Nimbostratus rankNimbostratus
Nov 21, 2007

Config Sync issues surrounding iRule

HELP

 

I come form a Nortel/Alteon background and am very new to the use of iRules and am experiencing some issue when using a canned 404 file not found handler from the Devcentral iRule code share

 

 

We are currently running LTM6400's on BIG-IP 9.4.2 Build 228.19 Final

 

 

The iRULE:

 

 

 

File Not Found Handler

 

 

 

when RULE_INIT {

 

set error_404 {

 

 

 

404 Not Found

 

 

 

 

 

 

 

iR ul es Ru le

 

[HTTP::status] Error

 

 

 

 

Not Found

 

The requested URL
$HTTP_URI
was not found on this server.

 

 

 

 

 

 

 

 

}

 

}

 

 

when HTTP_REQUEST {

 

set HTTP_URI [HTTP::uri]

 

}

 

 

when HTTP_RESPONSE {

 

if { [HTTP::status] == 404 } {

 

HTTP::respond 404 content [subst $::error_404]

 

}

 

}

 

 

 

 

 

The Issue

 

 

 

When load this irule onto my active BIGIP and attempt to sync the configs everything appears to sysnc however the iRULE dose not sync. This is effecting more than just the irul as any new node, pool, or virtual server that I add will not sync either. If I remove the code from the irule or delete the irule alltogether everything syncs just fine. I have used F5's iRULE validate the code and it says that all is fine.....

 

 

Please Help

 

 

Thanks

 

Dave

2 Replies

  • Hi Dave,

    This looks like an issue described in CR73005, where un-escaped metacharacters in a rule are allowed per GUI or iRuler validation, but break the parsing of the bigip.conf file when it is loaded (as during a config sync). You should get an error or experience the same issue on the BIG-IP you're synching from, if you try to reload the config.

    To get your rule to work on 9.4.3, I escaped the double quotes with a backslash and then wrapped the HTML in two un-escaped doublequotes:

    
    set error_404 {"
    "}

    This allowed me to save and reload the rule. Don't ask why the outside double quotes worked... I haven't a clue.

    I'd suggest you open a case with support on this, as the validation done when adding rules should match what the parser can handle.

    Thanks,

    Aaron
  • Actually, per SOL7988 Click here), it looks like this is an issue with including data within curly braces on the same line:

    This errs:

    
    set ::test {some_value}

    While this should work:

    
    set ::test {
       some_value
    }

    Can you give this a shot?

    Thanks,

    Aaron