Forum Discussion
hooleylist
Jun 18, 2008Cirrostratus
Spark's explanation seems appropriate:
http://devcentral.f5.com/Default.aspx?tabid=53&view=topic&postid=10181&ptarget=23693
spark
I see that the documentation indeed does not list AUTH_SUCCESS as an allowed event for the session command. The lists of allowed events are currently one of the biggest weaknesses of the iRules wiki; I can assure you that we're working on it. Please also know that the session command is allowed in the AUTH_SUCCESS event, as well as most others.
The most common reason for the "Prerequisite operation not in progress" error when using the session or persist commands is that you don't have a default pool defined. By default, persist and session records are tied to a pool, so if you don't currently have one then you get that error (but it may happen in other ways too; this is just the most common). So, either assign a default pool, or specify that the record should not be tied to a pool (via the "any virtual" option), and that should fix the error.
The session wiki page has details on the any virtual option:
http://devcentral.f5.com/Wiki/default.aspx/iRules/session
When using the latter key specification above (e.g. = { any virtual }), the session command expects the key (the data and associated "any virtual" commands) to be a single argument; in other words, a list. Often, users will want to specify some variable data in such a command. However, the usual way of creating a list (via braces, as shown above) will inhibit variable and command expansion. See http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=120 for more information on this. To use variables and commands with these key specifications, users should either use the list command to construct a list, or use double quotes, which Tcl will interpret as a list. See the last two examples below.
Aaron