Allow users to create advance reservations

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

Note:

USER_ADVANCE_RESERVATION in lsb.params is obsolete from LSF Version 8 on. Use the ResourceReservation section configuration in lsb.resources to configure advance reservation policies for your cluster.

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

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.

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 user 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 "user2#2" is created

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

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.

For example:
  1. Define a policy for user: user1:

    Policy Name: dayPolicy
    Users: user1
    Hosts: hostA
    Time Window:  8:00-18:00
  2. User 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 
    user2#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, and -d, but user1 cannot add hosts or modify the time window of the reservation.