Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Correcting RESV_CONFIRM and RESV_BEGIN

...

Overview

While there is an event for reservation ends (RESV_END) there is not one for when a reservation starts or is confirmed. And while there is a hook that can modify reservations at submission time, there isn't one that logs or can make modifications to reservation alteration requests. For tying into real-time accounting systems as well as tracking and reporting the progress of ongoing reservations, this set of changes adds the events RESV_CONFIRM, RESV_BEGIN, and MODIFYRESV that allows the site to easily enhance logging and tracking about advance reservations. The last hook, MODIFYRESV also allows hooks to run against pbs_ralter invocations and apply changes like one would for the RESVSUB hook, in a similar fashion to the relationship between the hooks run for qsub and qalter invocations. All three of these are being completed together due to how closely related these hooks are.  A reverse lookup dictionary has also been added to ease translation of reservation states for hook writers.

...

  • resv_begin hooks are read-only
  • The type for the resv_begin event is pbs.RESVBEGINRESV_BEGIN
  • RESV_BEGIN hooks run at the server
  • Hooks registered to the resv_begin event will be run after the queue has been started and enabled but before email notifications and the 'B' accounting record are written.
  • pbs.event().accept() and pbs.event().reject() both allow the reservation to proceed. This hook is read-only.
  • pbs.event().reject() should allow for a message to be sent to standard logging mechanisms.
  • Fields in the pbs.event().resv() object are the same as for the "resv_end" event.
  • A rejection in the resv_begin hook will not affect the start of the reservation at this time, as the scheduler will treat the reservation as begun independent of the reservation's status in the server, provided that the reservation is otherwise runnable.

...

  • resv_confirm hooks are read-only.
  • The type for the resv_confirm event is pbs.RESVCONFIRMRESV_CONFIRM.
  • resv_confirm hooks run at the server.
  • Hooks registered to the resv_confirm event will be run immediately before the "reservation confirmed" accounting record is written in req_confirmresv().
  • pbs.event().accept() and pbs.event().reject() both allow the reservation to proceed. This hook is read-only.
  • pbs.event().reject() should allow for a message to be sent to standard logging mechanisms.
  • Fields in the pbs.event().resv() object are the same as for the "resv_end" event.
  • A rejection in the resv_confirm hook will not affect reservation confirmation at this time.
  • resv_confirm hooks will be run on reservation re-confirmation.

...