Forum Discussion

Jeff_Jones_4404's avatar
Jeff_Jones_4404
Icon for Nimbostratus rankNimbostratus
Jul 25, 2012

iRule switching when one site is in maintance mode

is it possible via a script or a cron job to allow for switching iRules on and off based on a maintance schedule from one site to another.

 

 

JJ

 

5 Replies

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    Yeah. You can do what you like externally and the use an iControl connection to alter the iRules on a VS... That will only affect new connections though, not established ones.

     

     

    Failing that, you could use an in-memory table (Or an iFile probably in v11) to hold the status and use a quick check at the beginning of the iRule event to decide whether to run or just return...

     

     

    H
  • Thanks, now the fun part figure out how to do it, not yet running v11,

     

     

    basically have a site that has a maintance window, so want to remove it , let maintance happen, then put it back.

     

     

    JJ
  • you can also assign and remove iRules with 'tmsh modify ltm virtual rules'
  • bah. content scrubber ate part of my post. in between "virtual" and "rules" you would put the VIP name.
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Hamish's suggestion for using an iControl script would probably be the most efficient method. Else, you could also track the current time in the iRule itself and only take a maintenance action during the specific time window(s). Here's an article with examples:

     

     

    Scheduled Maintenance Window

     

    https://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/50/aft/29608/showtab/groupforums/Default.aspx1250581

     

     

    And for the full gory detail:

     

     

    Scheduled Maintenance Window

     

    https://devcentral.f5.com/Forums/tabid/53/aft/29608/Default.aspx

     

     

    Aaron