You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Sumit Mohanty (JIRA)" <ji...@apache.org> on 2013/09/18 22:25:55 UTC

[jira] [Comment Edited] (AMBARI-1426) Create cluster level Custom Action support

    [ https://issues.apache.org/jira/browse/AMBARI-1426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13771200#comment-13771200 ] 

Sumit Mohanty edited comment on AMBARI-1426 at 9/18/13 8:24 PM:
----------------------------------------------------------------

h2. High-level Tasks
h3. 1. Action definition
Add support to define an action.
* API Support for CRUD
* DB changes
* Python script template (default parameters, structure result, progress report)
* Support to add scripts (@ambari-server:/var/lib/ambari-server/resources/custom-actions @ambari-agent:/var/lib/ambari-agent/custom-actions
* Actions can be added dynamically without requiring ambari-server restart

h3. 2. Execute Action
Add support for executing actions.
* API support for requesting action execution
* ActionScheduler changes for executing actions
* Heartbeat handler changes to handle action execution report
* Agent changes to execute actions - python execution
* Reporting success/failure of action execution (also progress report)
* Logging support for action execution
* Debugging support when developing custom action

h3. 3. Manage action execution result
Add support to consolidate action execution result.
* API to get action execution result across all hosts
* Rolled up result across hosts
* Filter based on action metadata (e.g. name), host, start time, end time, result etc.

h3. 4. Action definition is downloaded from ambari-server (on demand)
* Action definition (scripts) are stored at the server as a resource
* Action definition is downloaded by agent when needed

h3. 5. Define recurring tasks
* Details TBD

h3. 6. Cancel tasks
* Details TBD

h3. 7. Develop custom actions based on the above
* TBD (Check kerberos setting across all nodes)
* TBD
                
      was (Author: sumitmohanty):
    h2. High-level Tasks
h3. 1. Action definition
Add support to define an action.
* API Support for CRUD
* DB changes
* Python script template (default parameters, structure result, progress report)
* Support to add scripts (@ambari-server:/var/lib/ambari-server/resources/custom-actions @ambari-agent:/var/lib/ambari-agent/custom-actions
* Actions can be added dynamically without requiring ambari-server restart

h3. 2. Execute Action
Add support for executing actions.
* API support for requesting action execution
* ActionScheduler changes for executing actions
* Heartbeat handler changes to handle action execution report
* Agent changes to execute actions - python execution
* Reporting success/failure of action execution (also progress report)
* Logging support for action execution
* Debugging support when developing custom action

h3. 3. Manage action execution result
Add support to consolidate action execution result.
* API to get action execution result across all hosts
* Rolled up result across hosts
* Filter based on action metadata (e.g. name), host, start time, end time, result etc.

h3. 4. Action definition is downloaded from ambari-server (on demand)
* Action definition (scripts) are stored at the server as a resource
* Action definition is downloaded by agent when needed

h3. 5. Define recurring tasks
* Details TBD

h3. 6. Develop custom actions based on the above
* TBD (Check kerberos setting across all nodes)
* TBD
                  
> Create cluster level Custom Action support
> ------------------------------------------
>
>                 Key: AMBARI-1426
>                 URL: https://issues.apache.org/jira/browse/AMBARI-1426
>             Project: Ambari
>          Issue Type: Bug
>    Affects Versions: 1.2.3
>            Reporter: Sumit Mohanty
>            Assignee: Sumit Mohanty
>             Fix For: 1.3.0
>
>
> While managing an HDP cluster, the admin may need to execute custom scripts etc. to perform house-keeping operations. Ambari support for smoke test can be viewed as one such operation, which has a first class support in Ambari. It is conceivable that in future releases several such operations need to be supported by Ambari. Some such requirements are:
> * Validate Kerberos settings
> * Perform metadata check/backup (e.g. fsck) prior to upgrade
> * Dump the list of datanodes
> Rather than designing each of these capabilities in a one-off fashion, it is useful to develop an infrastructure to execute such operations and then define new operations based on the infrastructure. 
> h3. Custom Action Definition
> A custom action is a python (_can be extended to other scripting language including puppet_) script that can be executed to perform any management activity on a cluster. The relevant aspects of a custom action are:
> *Alias*: A friendly name of a custom action. E.g. “Validate_Kerberos_Setting”
> *Definition*: The definition of the custom action. This is essentially a script that will get executed.
> *Input*: A set of name-value pairs that are the input to the script. E.g. “principal=abc@abc.com”.
> *Context*: The default context that is available to all custom actions. The context will include.
> * Cluster name
> * Host name
> * Service name
> * Component name
> *Target*: The target node(s)/host(s), where the custom action will be executed. Optionally, an action may explicitly specify the component on which it can be executed – e.g. NAMENODE, in which case a host that has the component mapped will be randomly selected. 
> *MaxExecutionTime*: The maximum execution time allowed for these class of custom actions. Ambari will enforce an absolution maximum time limit for all custom actions

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira