Forum Discussion

brian_anderson1's avatar
brian_anderson1
Icon for Nimbostratus rankNimbostratus
Sep 09, 2013

New addition to the 'switch -glob' isn't taking effect - please help

Other services in the iRule seem to be working, but when we add a new entry, it doesn't seem to be sending traffic to the same pool as others are using... for example...

 

when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/drsservice/" { pool UAT_RC_DRS_Web } "/eventservice/" { pool UAT_RC_DRS_Web } "/addressservice/*" { pool UAT_RC_DRS_Web } "/AuthenticationService/" { pool UAT_RC_DRS_Web } "/AuthService/" { pool UAT_RC_DRS_Web } <<<< THIS NEW AuthService ENTRY IS NOT WORKING, ALL OTHERS ARE WORKING } }

 

1 Reply

  • Hi Brian,

    Changes to an existing iRule will only take effect for new connections. Existing connections will use the original version of the iRule.

    That said, the issue I see with your iRule is you're setting the URI to lower case to check it, but using mixed case switch cases.

    Try setting AuthenticationService to authenticationservice and AuthService to authservice.

    when HTTP_REQUEST {
       switch -glob [string tolower [HTTP::uri]] {
          "/drsservice/" -
          "/eventservice/" -
          "/addressservice/*" -
          "/authenticationservice/" -
          "/authservice/" {
             pool UAT_RC_DRS_Web
          }
       }
    }
    

    Aaron