Skip to content. | Skip to navigation

Personal tools


You are here: Home / Wiki / Kb245


Emulab FAQ: Testbed Operations: How do I reserve nodes for an experiment in bulk?

Emulab FAQ: Testbed Operations: How do I reserve nodes for an experiment in bulk?

There is a "Pre-Reserve Node" option on the red-dot shownode page to cause a node to be allocatable only to a given project. But to reserve a large number of nodes this way would be painful.

We have provided a utility script to allow nodes to be pre-reserved in large quantities as they are freed:

Usage: prereserve [-t typelist] [-n priority] pid count
       prereserve -c [-r] pid
       prereserve -i pid
       prereserve -l
   -h   This message
   -t   Comma separated list of node types
   -n   Priority. Defaults to zero (least priority)
   -c   Clear pending prereserve for project
   -r   Revoke current prereserve for project (use with -c)
   -i   Show pending prereserve for project
   -l   List all pending prereserves

Prereserve must be invoked using wap:

/usr/testbed/sbin/wap /usr/testbed/sbin/prereserve

prereserve attempts to ensure that at least count nodes are allocated to project pid. If more than count nodes are already prereserved to a project, it does nothing. If the additional nodes it needs are available but not prereserved, it will prereserve them. If additional nodes are not available currently, it will prereserve them as they are nfree'd.

To see all pending prereserves and their status, use the -l option to get a chart like the following:

Project         Cnt (Cur)  Creator    When               Pri Types
emulab-ops      0 (1)      stoller    2011-08-12 13:13:57 0   
geni            0 (5)      stoller    2011-08-12 13:14:15 0   
tbres           0 (2)      duerig     2011-08-15 12:19:20 0   pc3000
testbed         0 (3)      stoller    2011-08-12 13:14:37 0   

Cnt is the number of pending nodes which will be prereserved when they are next nfree'd. Cur is the current number of nodes prereserved.

Only one pending prereserve can be active on a project at any given time. In order to prereserve additional nodes for a project, you should first wait until all pending preserves on that project are complete (wait for Cnt to be 0). Then you should run the following:

/usr/testbed/sbin/wap /usr/testbed/sbin/prereserve -c myproj
/usr/testbed/sbin/wap /usr/testbed/sbin/prereserve myproj total

Where total is the total number of prereserve nodes you want: the number of new prereserved nodes you want plus the number of previously prereserved nodes.

You must also use this technique if you want some prereserved nodes to be of a different type than another. First prereserve enough nodes of one type, then run the above commands to get additional nodes of another type.

What is the incantation to undo the reservation?

You can use the web interface to remove the pre-reserve attached to a single node. If you want to remove the pre-reserve attached to an entire project, use the '-r' option on the prereserve command described above.