Forum Discussion

Nicolas_MENOUX_'s avatar
Nicolas_MENOUX_
Icon for Nimbostratus rankNimbostratus
Dec 03, 2007

Why my stream IRules does not work anymore...!

Hi,

 

 

I've designed a really basic IRule into our BigIP1500 BIG-IP 9.2.3 Build 34.8 which replaces strings by another as below :

 

 

irule_stream

 

============

 

when HTTP_RESPONSE {

 

if {[HTTP::status] ==200} {

 

STREAM::enable

 

STREAM::expression "@/v2/images@/images@"

 

}

 

}

 

 

It worked well 'till I've moved to our new BigIP 6400 BIG-IP 9.3.1 Build 37.1 with the same conf. Now each time I attach the above IRule to one of my virtual server, I got this message on the ltm log :

 

 

Dec 3 09:51:45 tmm tmm[953]: 01220001:3: TCL error: Rule irule_stream - Operation not supported (line 1) invoked from within "STREAM::enable"

 

 

It seems that enable function is not working as if I comment this line, no more TCL error but IRule is doing nothing, no replacement.

 

 

Is there any incompability with the 9.3 release ? Where I am wrong please ?

 

 

Thanks for your help,

 

 

Regards,

 

 

Nicolas
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Hi Nicolas,

     

     

    Your rule worked fine on 9.3.0. I doubt there was a change in 9.3.1 that would break the stream commands completely.

     

     

    Do you have a stream profile associated with the virtual server? If you remove the rule and add it back with the STREAM::enable command uncommented, do you see any errors? Do you see the errors on every 200 response?

     

     

    By the way, you might want to filter on the Content-Type header in the response so you only apply the stream to text-based responses:

     

     

    if {[HTTP::status] == 200 and [HTTP::header value "Content-Type"] contains text} {

     

     

    Aaron
  • Hi Aaron,

     

     

    thanks for your reply, my virtual server is based on a http profile with Rechunk mode enabled and it uses a Stream Profile = stream. I then defined my Irule and attached it to my virtual server. Each time I put the STREAM::enable line I got the TCL error :

     

     

    Dec 3 15:10:30 tmm tmm[953]: 01220001:3: TCL error: Rule irule_stream - Operation not supported (line 1) invoked from within "STREAM::enable"

     

     

    If I uncomment the STREAM::enable no more error but no effect on the response stream, text is not replaced ...

     

     

    Compared to my previous 1500 box with 9.2 release, I did not have compression module activated and then http profile without any Compression section. Anyway, on the current 6400 box with 9.3 release, I've disabled any compression parameters on the http profile thinking that it may come from that....but nothing change...

     

     

    I try to understand exactly what does this error message means...is enable function unknown ? or something not allowed before of after that command...

     

     

    Thanks for your help,

     

     

    Nicolas

     

  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Hi Nicolas,

     

     

    The 'operation not supported' error might be caused by a conflict within the rule or another rule associated with the virtual server. Are you issuing a redirect in this or another rule on the same VIP? If you have multiple rules associated with the VIP, can you post the code for them?

     

     

    Aaron
  • Hi Aaron,

     

     

    I've removed all the Irules attached to my VIP and only keep the stream one. I got the same result..."Operation not supported". I really do not understand why it stopped working after moving my IRule to the new 6400 box with the same conf.. As I said, the only difference is the compression module which seems to be activated but I'm disabled all compression references in the http profile :

     

     

    Compression

     

    Compression : Disabled

     

    URI Compression : Not Configured

     

    Content Compression : Not Configured

     

     

    Have you any idea....thanks

     

     

    Nicolas
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    You got me... if no one else has an idea, you could open a case with F5 support on this.

     

     

    Aaron
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Good to hear it's working for you, but that's quite odd. I tested your rule with STREAM::enable before STREAM::expression and it worked on 9.3.0. Looking at a production 9.2.4 installation, I know it's working that way. I'm pretty sure I haven't modified the default stream profile in either version.

     

     

    Did you get this from F5 support? If so, did they give you any explanation on whether this is a change in behavior and if so, why?

     

     

    Thanks,

     

    Aaron
  • I get this information from people from F5 France but not directly from my support case. I will try to get more information on that odd issue. Thanks for your help anyway,

     

     

    Regards,

     

     

    Nicolas
  • Nathan_Bultman_'s avatar
    Nathan_Bultman_
    Historic F5 Account
    Aaron/Nicolas-

     

     

    This was changed in 9.3 with the inclusion of CR79374.

     

     

    From PD: As part of CR79374, the stream filter has been changed to raise an error if STREAM::enable is called when there is no expression configured. STREAM::enable should be called only after calling STREAM::expression. Reversing the order in the iRule should solve the problem.

     

     

     

    -nmb
  • Yes, I've received the same answer from the support :

     

     

    =============

     

    As part of a change to the STREAM profile to make it safer to use, STREAM::enable cannot be called before STREAM::expression.

     

     

    This change was a result of a known issue that was fixed in 9.3.

     

     

    The fix is to reverse the order, and your rule will function.

     

     

    I hope this case will help some of you with that odd issue ! ;-)

     

     

    Nicolas