Return-Path: X-Original-To: apmail-incubator-ambari-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AC4FC10929 for ; Sat, 2 Nov 2013 15:10:39 +0000 (UTC) Received: (qmail 80948 invoked by uid 500); 2 Nov 2013 15:10:37 -0000 Delivered-To: apmail-incubator-ambari-dev-archive@incubator.apache.org Received: (qmail 80497 invoked by uid 500); 2 Nov 2013 15:10:25 -0000 Mailing-List: contact ambari-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-dev@incubator.apache.org Received: (qmail 80449 invoked by uid 99); 2 Nov 2013 15:10:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Nov 2013 15:10:20 +0000 Date: Sat, 2 Nov 2013 15:10:20 +0000 (UTC) From: "Sumit Mohanty (JIRA)" To: ambari-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-3608) Custom Action: Add support for Custom Action Definition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-3608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sumit Mohanty updated AMBARI-3608: ---------------------------------- Attachment: (was: AMBARI-3608.patch) > Custom Action: Add support for Custom Action Definition > ------------------------------------------------------- > > Key: AMBARI-3608 > URL: https://issues.apache.org/jira/browse/AMBARI-3608 > Project: Ambari > Issue Type: Sub-task > Components: controller > Affects Versions: 1.4.2 > Reporter: Sumit Mohanty > Assignee: Sumit Mohanty > Fix For: 1.5.0 > > Attachments: AMBARI-3608.patch > > > A custom action has a name, which must be unique across all actions. The name must be fairly descriptive. It is expected that a script (currently, python) with name .py is also available (e.g. Validate_Kerberos_Setting.py). > Sample *Name*: Validate_Kerberos_Setting > Action is also associated with a description that provides a short summary of what the action does. > Sample *Description*: Validates Kerberos setting to ensure that host-components can communicate with each other. > An action can be of one of the following types: > System: Actions that are available with Ambari. > System_Disabled: Disabled by Ambari due to high failure rate. > User: Actions that are added by the user. > Currently, all actions are system actions. > Sample *Type*: SYSTEM > Action defines the expected inputs by name. When invoking, the inputs are provided as name-value pairs where the name must match allowed input parameter names. > Sample *Inputs*: > principal: The identity whose access is being verified > keytab: The keytab associated with the principal. > Actions can optionally define the target host where it should be executed. If the target is not specified then it is expected as an input when creating an action. If the target is specified then the server finds a single host that matches the requirements and executes the action on that host. > Additionally, Action definition can specify the target Service and Component which constrainst the hosts on which the action can be executed. Essentially, the host must have the Service and Component deployed. It is possible for the action executon to provide a set of target hosts. It is expected that the hosts must have the target component deployed. An empty target means that the action can be executed on an arbitrary host. TargetType refers to whether the action should be executed on all hosts that match the requirement or any one host, etc. > TargetService: > HDFS > TargetComponent: > NAMENODE > TargetType: > ANY > Action can optionally specify a custom value for max timeout. This value, if less than Ambari wide action timeout, overrides the timeout value when executing the action. Timeout is applied on a per host basis and is not an aggregate across execution on all hosts. > DefaultTimeout: > 180 > Sample API calls: > {code} > curl -u admin:admin -i http://c6401.ambari.apache.org:8080/api/v1/action_definitions > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/action_definitions", > "items" : [ > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/action_definitions/hdfs_rebalance_blocks", > "ActionDefinitions" : { > "action_name" : "hdfs_rebalance_blocks" > } > } > ] > } > curl -u admin:admin -i http://c6401.ambari.apache.org:8080/api/v1/action_definitions/hdfs_rebalance_blocks > { > "href" : "http://c6401.ambari.apache.org:8080/api/v1/action_definitions/hdfs_rebalance_blocks", > "ActionDefinitions" : { > "action_name" : "hdfs_rebalance_blocks", > "action_type" : "SYSTEM", > "default_timeout" : "590", > "description" : "HDFS, Rebalance Blocks", > "inputs" : null, > "target_component" : "NAMENODE", > "target_host" : "", > "target_service" : "HDFS" > } > } > {code} -- This message was sent by Atlassian JIRA (v6.1#6144)