Forum Discussion
Dave_20275
Nimbostratus
Nov 21, 2007Config 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
- hoolio
Cirrostratus
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 - hoolio
Cirrostratus
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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects