Forum Discussion

TMcGov_92811's avatar
TMcGov_92811
Icon for Nimbostratus rankNimbostratus
Sep 07, 2010

Setting 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 ?

3 Replies

  • 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.

     

     

    DeVon

     

  • 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 {} }
  • 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.