Ability to include requested custom resources in mom hook input file.

Forum link: http://community.pbspro.org/t/new-custom-resource-permission-flag-m/1432

Overview:

  • Currently limited set for resources (ex: ncpus, place) associated with a job can be seen or accessed by a mom hook. There is no direct way to access custom resources at mom hooks. This design explains the addition of a new permission flag "m" for custom resources. Having this new flag will allow the Admin to control what all resources that needs to be sent to MoM.

Interface: Resource flag: "m"

Visibility: Public

Change Control: Stable

Synopsis: Custom resource permission flag "m".

Details:

  • Now admin can create a custom resource with a new permission flag "m".
  • The "m" flag is designed to improve the performance of reading custom resources by execution hooks.

  • The "m" flag allows execution hooks to read custom resources faster via pbs.server().

  • When the "m" flag is set for a custom resource, MoMs cache a copy of the resource. If execution hooks need to read a resource frequently, the "m" flag can improve performance.

  • Resources not having this flag set, will not be sent to MoM.
  • Resources created by exechost_startup hook will have this flag set by default.
  • Admin can set this new flag in combination with flags: q, h, s, r , n, f and i.
  • To unset flag "m", admin can either overwrite the flag value or do a "unset resource <name> flag". Doing the unset operation will remove all the flags set for the resource.

Example:

$ qmgr -c "create resource cres type=long, flag=qm"

$ qmgr -c "create resource cname type=string, flag=h"

$ qmgr -c "set resource cname flag = m"

$ qmgr -c "unset resource cname flag"