Use brsvmod to modify advance reservations

Use brsvmod to make the following changes to an existing advance reservation:
  • Modify start time (postpone or move closer)

  • Modify the duration of the reservation window (and thus the end time)

  • Modify the slot numbers required by the reservation (add or remove slots with hosts)

  • Modify the host or host group list (add or remove hosts or host groups)

  • Start of change

    Replace the user or user group list or add or remove users or user groups

    End of change
  • Add hosts by resource requirement (-R)

  • Modify the reservation type (open or closed)

  • Disable the specified occurrences of a recurring reservation

For example, assume an advance reservation is the box between the time t1 and t2, as shown in the following figure:
In this figure:
  • The shadowed box shows the original reservation

  • Time means the time window of the reservation

  • t1 is the begin time of the reservation

  • t2 is the end time of the reservation

  • The reservation size means the resources that are reserved, such as hosts (slots) or host groups

Use brsvmod to shift, extend, or reduce the time window horizontally; grow or shrink the size vertically.

Extend the duration

The following command creates a one-time advance reservation for 1024 job slots on host hostA for user user1 between 6:00 a.m. and 8:00 a.m. today:
brsvadd -n 1024 -m hostA -u user1 -b "6:0" -e "8:0"
Reservation "user1#0" is created 
Run the following command to extend the duration from 6:00 a.m. to 9:00 a.m.:
brsvmod -e "+60" user1#0
Reservation "user1#0" is modified 

Add hosts to a reservation allocation

Use brsvmod to add hosts and slots on hosts into the original advance reservation allocation. The hosts can be local to the cluster or hosts leased from remote clusters.

Start of change Adding a host without -n reserves all available hosts or slots on the host that are not already reserved by other reservations. You can specify the number of slots to be added from the host list specified with -n, but -n cannot be used alone. -m can be used alone if no host group is specified in the list. You cannot specify -R without with -n. End of change

Start of change The specified number of units (slots or hosts) must be less than or equal to the available number of slots for the hosts or hosts themselves. End of change

Start of change Only hosts can be added (-m) to a system reservation. Slots cannot be added (-n) to a system reservation. End of change

For example:
  • Reserve 2 more slots from hostA:

    brsvmod addhost -n2 -m "hostA"   
  • Reserve 4 slots in total from hostA and hostB:

    brsvmod addhost -n4 -m "hostA hostB"
  • Reserve 4 more slots from any Linux hosts:

    brsvmod addhost -n4 -R"type==linux"
  • Reserve 4 more slots from any Linux hosts in the host group hostgroup1:

    brsvmod addhost -n4 -m "hostgroup1" -R "type==linux"
  • Reserve all available slots from hostA and hostB:

    brsvmod addhost -m "hostA hostB"
The following command creates an advance reservation for 1024 slots on two hosts hostA and hostB for user group groupA every Wednesday from 12:00 midnight to 3:00 a.m.:
brsvadd -n 1024 -m "hostA hostB" -g groupA -t "3:0:0-3:3:0"
Reservation "groupA#0" is created 
brsvs
RSVID      TYPE    USER     NCPUS      RSV_HOSTS       TIME_WINDOW
groupA#0   user    groupA   0/1024     hostA:0/256     3:3:0-3:3:0 *
                                    hostB:0/768
The following commands reserve 512 slots from each host for the reservation:
brsvmod addhost -n 256 -m "hostA" groupA#0
Reservation "groupA#0" is modified 
brsvmod rmhost -n 256 -m "hostB" groupA#0
Reservation "groupA#0" is modified

Remove hosts from a reservation allocation

Use brsvmod rmhost to remove hosts or slots on hosts from the original reservation allocation. You must specify either -n or -m. Use -n to specify the number of slots to be released from the host. Removing a host without -n releases all reserved slots on the host. The slot specification must be less than or equal to the actual reserved slot number of the host.

For example:
  • Remove 4 reserved slots from hostA

    brsvmod rmhost -n 4 -m "hostA"
  • Remove 4 slots in total from hostA and hostB.

    brsvmod rmhost -n 4 -m "hostA hostB" 
  • Release reserved hostA and hostB.

    brsvmod rmhost -m "hostA hostB" 
  • Remove 4 slots from current reservation allocation.

    brsvmod rmhost -n 4 
You cannot remove slots from a system reservation. The following modification to the system reservation System#1 is rejected:
brsvmod rmhost -n 2 -m "hostA"  system#1
How many slots or hosts can be removed also depends on the number of slots free while the reservation is active. brsvmod rmhost cannot remove more slots than free amount on a host. For example:
brsvs
RSVID    TYPE USER    NCPUS         RSV_HOSTS    TIME_WINDOW
user1_1  user  user1  3/4           hostA:2/2    1/24/12/2-1/24/13/0
                                    hostB:1/2
The following modifications are accepted, and one slot is removed from hostB:
brsvmod rmhost -m hostB user1_1
brsvmod rmhost -n 1 -m hostB user1_1
The following modifications are rejected:
brsvmod rmhost -n 2 user1_1
brsvmod rmhost -m hostA user1_1
brsvmod rmhost -n 1 -m hostA user1_1
brsvmod rmhost -n 2 -m hostB user1_1

Modify closed reservations

The following command creates an open advance reservation for 1024 job slots on host hostA for user user1 between 6:00 a.m. and 8:00 a.m. today.
brsvadd -o -n 1024 -m hostA -u user1 -b 6:0 -e 8:0 
Reservation "user1#0" is created 
Run the following command to close the reservation when it expires.
brsvmod -on user1#0
Reservation "user1#0" is modified 

Disable specified occurrences for recurring reservations

Use brsvmod disable to disable specified periods, or instances, of a recurring advance reservation.

Recurring reservations may repeat either on a daily cycle or a weekly cycle. For daily reservations, the instances of the reservation that occur on disabled days will be inactive. Jobs using the reservation are not dispatched during on those disabled days. Other reservations are permitted to use slots of the reservation on those days. For overnight reservations (active from 11 p.m. to 9 a.m. daily), if the reservation is disabled on the starting day of an instance, the reservation is disabled for the whole of that instance.

For a weekly reservation, if the reservation is disabled on the start date of an instance of the reservation then the reservation is disabled for the entire instance. For example, for a weekly reservation with time window from 9 a.m. Wednesday to 10 p.m. Friday, in one particular week, the reservation is disabled on Thursday, then the instance of the reservation remains active for that week. However, if the same reservation is disabled for the Wednesday of the week, then the reservation is disabled for the week.

The following figure illustrates how the disable options apply to the weekly occurrences of a recurring advance reservation.

Once a reservation is disabled for a period, it cannot be enabled again; that is, the disabled periods remain fixed. Before a reservation is disabled, you are prompted to confirm whether to continue disabling the reservation. Use the -f option to silently force the command to run without prompting for confirmation, for example, to allow for automating disabling reservations from a script.

For example, the following command creates a recurring advance reservation for 4 slots on host hostA for user user1 between 6:00 a.m. and 8:00 a.m. every day.
Reservation "user1#0" is created 
brsvadd -n 4 -m hostA -u user1 -t "6:0-8:0" 
Run the following command to disable the reservation instance that is active between Dec 1 to Dec 10, 2007.
brsvmod -disable -td "2007:12:1-2007:12:10" user1#0
Reservation "user1#0" is modified 
Then the administrator can use host hostA for other reservations during the duration
brsvadd -n 4 -m hostA -u user1 -b "2007:12:1:6:0" -e "2007:12:1:8:0" 
Reservation "user1#2" is created 

Change users and user groups

Use brsvmod -u, brsvmod adduser, or brsvmod rmuser to change the users or user groups that are able to submit jobs with the advance reservation.

Jobs submitted by the original user or user group to the reservation still belong to the reservation and scheduled as advance reservation jobs, but new submitted jobs from the removed user or user group cannot use the reservation any longer.

brun

An advance reservation job dispatched with brun is still subject to run windows and suspending conditions of the advance reservation for the job. The job must finish running before the time window of a closed reservation expires. Extending or shrinking a closed advance reservation duration prolongs or shortens lifetime of a brun job.

bslots

bslots displays a snapshot of the slots currently not in use by parallel jobs or advance reservations. If the hosts or duration of an advance reservation is modified, bslots recalculates and displays the available slots and available run time accordingly.

How advance reservation modifications interact

The following table summarizes how advance reservation modification applies to various advance reservation instances.

Modification...

Disable

Begin time

End Time

Add Hosts

Rm Hosts

User/

Usergroup

open/

closed

Pre cmd

Post cmd

One-time

Active

No

No

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Inactive

No

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Recurring

Occurrences

All

No

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Specified

Yes

No

No

No

No

No

No

No

No

Active instance

No

No

No

No

No

No

No

No

No

Where: "Yes" means the modification is supported; otherwise, "No" is marked. For example, all modifications are acceptable in the case that the advance reservation is inactive (and not disabled).