Forum Discussion
TMcGov_92811
Nimbostratus
Sep 07, 2010Setting Cookie Persistence in iRule
Hello,
I'm trying to create a Universal Persistence profile that calls a iRule to determine which persistence method to use based on the HTTP URI.
In the Resources section of the Virtual Server under Default Persistence Profile, I select my universal persistence profile which references the following IRule:
when HTTP_REQUEST {
Check the requested URI
switch -glob [HTTP::uri] {
"*/BPELConsole/*" -
"*/BPELAdmin/*" {
persist cookie insert
}
default {
persist none
}
}
}
However, I get the following error message: Persistence mode (Cookie) called out in rule (rule-persist-b2bib) requires a corresponding persistence profile for virtual server (vs-b2bib.xa.cccis.com-http).
I dont understand how to correct this issue. If I slightly modify the IRule to say "persist source_addr", there are no error messages but of course I do not get my intended result.
Any ideas on how to correct this ?
- DeVon_Jarvis
Altostratus
What this means is that you need an http profile associated with the virtual server in order for LTM to be able to inject the cookie required for the persistence. If the virtual is not marked as http (via the profile), then LTM doesn't know the traffic is http and won't allow cookie persistence to be associated with the virtual server. - TMcGov_92811
Nimbostratus
I do have an HTTP Profile enabled for the virtual server. In the Default Persistence Profile section, I have the universal profile which calls the iRule: virtual vs-b2bib.xa.cccis.com-http { snat automap pool pool-http-b2bib.xa.cccis.com destination 10.77.188.218:http ip protocol tcp persist persist-bpel-console profiles { CCC-HTTP {} tcp {} } - jpvrenen_46954
Nimbostratus
Should anyone be wondering, it means that you need to create and set a Cookie persistence profile and set this as the Default persistence profile. Then set your iRule as the iRule to be used on that virtual server.
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