Allow users to create advance reservations

About this task

By default, only LSF administrators or root can add or delete advance reservations. To allow other users to create and delete advance reservations, you need to configure advance reservation user policies.


USER_ADVANCE_RESERVATION in lsb.params is obsolete from LSF 9 on.


Use the ResourceReservation section of lsb.resources to configure advance reservation policies for users in your cluster.

A ResourceReservation section specifies:

  • 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 lsb.resources.

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

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


For 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 options rmhost, -u, -o, -on, -d, and subcommands adduser and rmuser. However, user1 cannot add hosts or modify the time window of the reservation.