-
Leigh B Stoller authored
idea). New script and table to manage node pre reservations. Lets just look at the script. To create a reservation: myboss> wap prereserve -t pc850 testbed 2 Node reservation request for 2 nodes has been created. To see the reservation status for testbed myboss> wap prereserve -i testbed Project Cnt (Cur) Creator When Pri Types ------------------------------------------------------------- testbed 1 (1) stoller 2011-08-12 12:39:07 0 pc850 which says 1 node is pending and 1 node has already been pre-reserved. To clear the above reservation request (and optionally, clean reserved_pid from the nodes table). myboss> wap prereserve -c -r testbed The -r is optional, otherwise just the reservation request is cleared, and nodes continue to be pre-reserved to the project. To see a list of all reservation requests: myboss> wap prereserve -l So, when a node is released in nfree, we look at the reservation status for the node and any pending reservation requests. 1. If the node has a reserved_pid and that request is still pending (still in the table), nothing is changed. 2. If the node has a reserved_pid, but the request has been cleared from the pending table, then clear reserved_pid. 3. If reserved_pid is null, and there are pending requests, then pick the highest priority, most recent dated, request, and set reserved_pid to that project. Options: * -n <pri> - is how you set a priority. Lowest is zero, choose a higher number if you want this reservation request to be considered before others. In a tie, look at the date of creation, and use the oldest. * -t <typelist> - a comma separated list of types you want to consider. Types are considered in order, but not in the fancy way you might imagine.
5c998ffc