[ 
https://issues.apache.org/jira/browse/HADOOP-4145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630081#action_12630081
 ] 

Hemanth Yamijala commented on HADOOP-4145:
------------------------------------------

The attached patch implements the following changes in HOD. There are slight 
differences from the proposal listed above, which are also described below.

Changes:

- Hod client looks for a specific file in the {{install-directory/bin}} folder 
called {{verify-account}}. If this file is found, before cluster allocation is 
begun,  it executes the file passing in {{resource_manager.pbs-account}} as a 
parameter to the script.
- If the script's exit code is non-zero, Hod client fails allocation. Any 
output generated by the script (either on stdout or stderr) is printed to the 
Hod client.
- Hod exits the allocation process with a return value of 5, standing for job 
execution failure.
- If the verify-account script is not found, or if the script returns a zero 
exit code, Hod client proceeds allocation as is.
- A dummy script file verify-account is added in the patch which sites can 
modify with their custom verification script. The dummy script file just exits 
with 0.
- Documentation changes are done in the Hod admin guide and user guide.

Changes from the proposal:

- There are no configuration options introduced in this patch. This is 
essentially because Hod cannot control users overriding configuration set up by 
administrators. And the account script file should not be overridden.
- No support for passing parameters to the account verification script. Again 
the reason is roughly the same as for the first point above. Also, we don't 
have enough use cases to see if this additional feature is essential. It should 
be possible to workaround by generating verification scripts that directly have 
these arguments.
- All output from the script is displayed to the user, not just stderr output. 
This is because HOD currently has no good way of capturing only stderr output.


> [HOD] Support an accounting plugin script for HOD
> -------------------------------------------------
>
>                 Key: HADOOP-4145
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4145
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: contrib/hod
>            Reporter: Hemanth Yamijala
>            Assignee: Hemanth Yamijala
>            Priority: Blocker
>             Fix For: 0.18.1, 0.19.0
>
>         Attachments: HADOOP-4145.patch
>
>
> Production environments have accounting packages to track usage of a cluster. 
> HOD should provide a mechanism to plug-in an accounting related script that 
> can be used to verify if the user is using a valid account or not.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to