Allowing users to create advance reservations

By default, only LSF administrators or root can add or delete advance reservations. To allow other users to create and delete advance reservations, configure advance reservation user policies. Use the ResourceReservation section of the lsb.resources file.

About this task

Note: The USER_ADVANCE_RESERVATION in the lsb.params file is obsolete from LSF Version 9 and later.

Procedure

Use the ResourceReservation section of the lsb.resources file to configure advance reservation policies for users in your cluster.
A ResourceReservation section contains the following information:
  • Users or user groups that can create reservations
  • Hosts that can be used for the reservation
  • Time window when reservations can be created.

Each advance reservation policy is defined in a separate ResourceReservation section, so it is normal to have multiple ResourceReservation sections in a lsb.resources file.

In the following policy, only user1 and user2 can make advance reservations on hostA and hostB. The reservation time window is between 8:00 a.m. and 6:00 p.m. every day:
Begin ResourceReservation
NAME        = dayPolicy
USERS       = user1 user2    # optional
HOSTS       = hostA hostB    # optional
TIME_WINDOW = 8:00-18:00     # weekly recurring reservation
End ResourceReservation 
user1 can add the following reservation for user2 to use on hostA every Friday between 9:00 a.m. and 11:00 a.m.:
brsvadd -m "hostA" -n 1 -u "user2" -t "5:9:0-5:11:0"
Reservation "user1#2" is created

Users can only delete reservations that they created themselves. In the example, only user user1 can delete the reservation; user2 cannot. Administrators can delete any reservations that are created by users.

In the following policy, all users in user group ugroup1 except user1 can make advance reservations on any host in hgroup1, except hostB, between 10:00 p.m. and 6:00 a.m. every day.
Begin ResourceReservation
NAME        = nightPolicy
USERS       = ugroup1 ~user1
HOSTS       = hgroup1 ~hostB
TIME_WINDOW = 20:00-8:00 
End ResourceReservation
Important:

The not operator (~) does not exclude LSF administrators from the policy.

Example

  1. Define a policy for user1:
    Policy Name: dayPolicy
    Users: user1
    Hosts: hostA
    Time Window:  8:00-18:00
    
  2. user1 creates a reservation matching the policy (the creator is user1, the user is user2):
    brsvadd -n 1 -m hostA -u user2 -b 10:00 -e 12:00 
    user1#0 is created. 
    
  3. User user1 modifies the policy to remove user1 from the users list:
    Policy Name: dayPolicy
    Users: user3
    Hosts: hostA
    Time Window:  8:00-18:00
    
  4. As the creator, user1 can modify the reservation with the brsvmod command options rmhost, -u, -o, -on, -d, and the subcommands adduser and rmuser. However, user1 cannot add hosts or change the time window of the reservation.