Forum Discussion
Hi AlexBCT,
I really appreciate it and thank you for your quick reply .
Your description and linked article explains partially to me and make me knowledge about possibility to reference in iRule between partitions .
I tried your advice and I can confirm that it works of course - prefixing by partition name chooses the right pool,
The same effect may be achived by renamig of pools ( for example prep-test-case-pool )
But still it is strange that decision is made randomly, choosing pool from the same partition ( prep ) and sometimes from another partition ( fix ).
I thought if irule and pool resides in the same partition ( prep ), will have its partition context and will refer to right object in the same partition - this is what I would expect .
In my experience with iRule's ( over the years ), I have never used name of the partition as prefix before any object . But also I have never had case with the same names of pools , irules , virtuals in different partitions .
I understand all about referencing from iRule to objects in different partitions , but still I thing it is wrong and I thing that partition context should be used by code of iRule .
I suspect that when I have two irules in different partition with the same name i and code inside , this code has been compiled and used by CPUs randomly - something like that.
Anyway , again I would like to thank you to your answer .
Best regards,
Przemek
Hi Przemek,
Great to hear it's working at least!
Yeah, it's strange indeed that iRules don't seem to stay within its own partition when referencing objects, so you are not the only one who was surprised by the behaviour ;)
Maybe it's looking for a first match in alphabetical order (i.e. the pool name in the "fix" partition being before the object in the "prep" partition, and just picking the first match it finds. But I'm not an expert in the internal workings of iRules, so can't comment more on that - maybe there is another expert around here who knows more about that.
Whenever I'm working with iRules and partitions (...I try to avoid partitions whenever I can to be honest... ;), I make sure to always reference the full path and name, rather than the name alone to avoid any potential issues.
If you're happy with the answer, would be great if you can flag it as "answered" so the rest of the community may benefit from it.