In order to track server management operations, such as adding a new node, importing a hook script, etc., a new management hook event has been added to the PBS server. Registered management hook scripts are executed once the management operation has completed. Each script is provided information about the requested operation, any associated attributes, and the status of the completed operation.
pbs.event().management - A pbs.management object representing the PBS server management operation that was executed. The management object and thus operation cannot be modified with this hook event.
pbs.event().management.attribs - A list of pbs.server_attribute objects representing the attributes associated with server management operation. The server attribute objects are read-only.
- pbs.event().management: _management
- cmd: integer value of the server management operation, constants defined in pbs.MGR_CMD_*, translation to text is found in pbs.REVERSE_MGR_CMDS
- objname: name of the object, such as the hook name.
- objtype: integer value of the server management operation type, constants defined in pbs.MGR_OBJ_*, translation to text is found in pbs.REVERSE_MGR_OBJS
- request_time: time of the request in seconds since epoch
- reply_text: text returned to the user via the server management operation
- reply_code: code returned to the user via the server management operation
- reply_choice: request choice, constants defined in pbs.BRP_CHOICE_*, translation to text is found in pbs.REVERSE_BRP_CHOICES
- reply_auxcode: Auxiliary error code
- attribs: List of server_attribute class objects
- pbs.event().management.rq_attrs: List[_server_attribute]
- name: name of the attribute
- resource: resource of the attribute
- value: value of the attribute
- op: integer value of the attribute operation, constants defined in pbs.BATCH_OP_*, translation to text is found in pbs.REVERSE_BATCH_OPS
- flags: integer value of the attribute flags, constants defined in pbs.ATR_VFLAG_*, translation to text is found in pbs.REVERSE_ATR_VFLAGS
- sisters: list of co-resources for the attribute
A management hook script is executed by the server after a server management operation is completed.
The event will contain data if the server management operation succeeded or failed.
- Keeping with the hook design, if one management hook is rejected, the other management hooks with a higher order value will not run. A reject, will not revert the change.
If the management hook script encounters an unexpected error causing an unhandled exception, or times out due to the hook's alarm setting, the hook will act similar to a pbs.event().reject().
- All management hooks are executed after the server management operation is completed by the req_manager function in req_manager.c.
- Other than adding a step to run the hooks, this hook event does not change the flow of the server management operations.
- Metadata collection by an outside system.
OSS Site Map
Project Documentation Main Page
Developer Guide Pages