Forum Discussion
Getting errors while upgrading from 10.x to 11.x
Issue:
We were getting errors with the existing configuration, after migrating to 11.2.1 some syntax errors, probably in the irules. The one I noticed is the keyword "na1esbapppool".
The configuration in 10.2 is
class na1webpppool{
network 10.22.0.0/16
}
Snippet of the iRule in HTTP_REQUEST
--------------------------------------------------------
if { not [matchclass [IP::client_addr] equals $::na1webpppool] } {
if { [URI::decode [string tolower [HTTP::uri]]] matches_regex "^/webdilb*" } {
log local0. "URI requested = [HTTP::uri] by [IP::client_addr] blocked"
HTTP::respond 404 content "ERROR 404Not Found
The requested URL was not found on this server." noserver
}
}
Upgrade Requirement
H/w - BIG-IP 6900
Please suggest what can be done. Is there any utility for converting the 10.2 config to 11.2 in advance?
Thanks in advance
8 Replies
- Ajmal_2608
Nimbostratus
Looks like the $:: was creating a problem
https://devcentral.f5.com/wiki/iRules.class.ashxHowever I still have a question:
Existing Code snippet of iRule
------------------------------------------
when RULE_INIT {
set safe_http_methods [list "GET" "PUT" "DELETE" "POST" "HEAD" "OPTIONS"]
}
when HTTP_REQUEST {
if { ![matchclass [HTTP::method] equals $::safe_http_methods] } {
set trafficLog "$trafficLog REJECTED:badMethod"
HTTP::respond 302 noserver Location "https://[HTTP::host]/error/error.html"
}
}
Modified for 11.x
----------------------------
when RULE_INIT {
set safe_http_methods [list "GET" "PUT" "DELETE" "POST" "HEAD" "OPTIONS"]
}
when HTTP_REQUEST {
if { ![class match -- [HTTP::method] equals $safe_http_methods] } {
set trafficLog "$trafficLog REJECTED:badMethod"
HTTP::respond 302 noserver Location "https://[HTTP::host]/error/error.html"
}
}
Will this work in 11.x as it is working fine in 10.2 ?
Also can I change the variable "safe_http_methods" to a "Data-Group" of some type like a "list" or "array" (if that is available in LTM) and use the same code? i.e.
if { ![class match -- [HTTP::method] equals $safe_http_methods] } {
set trafficLog "$trafficLog REJECTED:badMethod"
HTTP::respond 302 noserver Location "https://[HTTP::host]/error/error.html"
}
Please suggest
-Ajmal - Jnon
Nimbostratus
You should upload your 10.2 code it iHealth, I think you'll find that it would warn you about the use of $:: that changed from version 9 to version 10, as you won't be able to take advantage of CMP with the use of the $:: - however the irule will work. Sounds like v11 might not allow it at all...
Yes you can use the variable as a string and create a class out of it, that is the better way to go for sure. - Ajmal_2608
Nimbostratus
I don't have any idea about iHealth, it looks like an Enterprise manager component. If it is the we do not have that.
Any other options? - Hamish
Cirrocumulus
iHealth is a web interface as well as being used by EM. Just upload your qkview to it and away you go.
H - Ajmal_2608
Nimbostratus
We do not have EM in our environment, also all the HA pairs are on 10.2.
Where can I find the iHealth option, is it a free control ? Please suggest - Hamish
Cirrocumulus
https://ihealth.f5.com/qkview-analyzer/
You probably need an active support contract, but apart from that it's free.
H - Ajmal_2608
Nimbostratus
Thanks a lot, that what I was looking at. I'll check the same and try finding the issue.
P.S: Yes we do have active support contract for the said HA pair
- Ajmal_2608
Nimbostratus
I did use the qkview-analyzer, but looks like it doesnn't look in the iRULEs' code.
Is there any way I can use my 10.2 config and verify what errors/incompatibility it has for getting migrated to 11.x ? (I don't have any box running 11.x all are 10.x)
Recent Discussions
Related Content
* 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