Forum Discussion

5 Replies

  • Arie's avatar
    Arie
    Icon for Altostratus rankAltostratus

    I assume you're looking for a way to allow someone who has admin rights to the web server to take down a node.

     

    Suggestions:

     

    1. Have the web admin stop the web site instance. Assuming that you have configured monitors for the pool this will mark the node down.
    2. If the web server relies on its own file repository (vs. a file server that's used for multiple nodes) you can create a monitor that verifies specific content on the web server. For instance, the web admin could rename a specific file, or change its content and the monitor could mark the node accordingly.
  • Arie's avatar
    Arie
    Icon for Altostratus rankAltostratus

    Either suggestion would accomplish your goal, I think.

     

  • As Arie suggests, an HTTP monitor looking for a specific resource on the webserver, /upordown.txt for example, would suffice. You build your HTTP monitor to perform a get for /upordown.txt, and mark the node up (200) or down (404) based on the response code.

     

    Just have the web server admin put the file upordown.txt wherever it can be checked. If the admin wants to take down the node, then they just remove the file. When they want to turn it back up, just put the file back. No need to complicate this with iRules.

     

  • Arie's avatar
    Arie
    Icon for Altostratus rankAltostratus

    I agree with Cory (of course :-) ) - you don't want to use iRules for this.

     

    You could make it easier for the admin by having him (or her) rename the file instead of creating/deleting the file. For a more elegant solution you could have the web resource return a specific HTTP response code (e.g. 200, 500). Even more elegant would be to do this in a CMS or via an admin app.

     

    Or you could just have the admin disable the instance on the server (e.g. Apache, IIS).

     

  • Agree with all comments above, however to answer the question regarding an iRule to perform this function, there a command LB::DOWN which marks the currently selected pool member down, however the result of this is that the monitor is immediately fired and if all is well will bring the node back up again immediately.

    We do what Arie suggested above, and change the contents of a file /platform/mode.jsp from "normal" to "maintenance" (for a hard shutdown) and "transition" (for a soft shutdown);-

    ltm monitor http bpweb_http_mode.jsp {
        defaults-from http
        interval 5
        recv "normal"
        recv-disable "transition"
        send "GET /platform/mode.jsp\r\n\r\n"
        time-until-up 0
        timeout 16
    }