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 5EF2110D77 for ; Thu, 14 Nov 2013 06:29:26 +0000 (UTC) Received: (qmail 81153 invoked by uid 500); 14 Nov 2013 06:29:26 -0000 Delivered-To: apmail-incubator-ambari-dev-archive@incubator.apache.org Received: (qmail 80644 invoked by uid 500); 14 Nov 2013 06:29:22 -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 80510 invoked by uid 99); 14 Nov 2013 06:29:22 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Nov 2013 06:29:22 +0000 Date: Thu, 14 Nov 2013 06:29:22 +0000 (UTC) From: "Sumit Mohanty (JIRA)" To: ambari-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-3731) Add support for custom action execution MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-3731?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D138= 22209#comment-13822209 ]=20 Sumit Mohanty commented on AMBARI-3731: --------------------------------------- {quote} public Stage getAction(String actionId); This should be renamed to getStage or getStageByActionId {quote} Renamed. {quote} if (!requestEntity.getIsCommand()) Is there a possibility for neither action nor command (in future), can this= be simplified to: request.isAction() {quote} Line refactored out. {quote} validateCustomAction Is there a case for checking if a Service belongs to the cluster and not ju= st the stack? {quote} This is done when execution is scheduled. If the service does not belong to= the stack then no hosts are identified as a target which is an error. {quote} AmbariManagementControllerImpl.CLUSTER_DEFAULT_TAG Duplicate definition in ConfigHelper.java {quote} Removed one. {quote} Changes need to be replicated to other DDL scripts at ambari-server/src/mai= n/resources For MySQL, Oracle and Pgsql remote. {quote} Modified the upgrade script. Opened a JIRA for Oracle changes. MySQL is qui= te outdated and so is PgSQL remote. {quote} at ExecutionCommand.java, we already have 'String role' field that stores c= omponent name. Maybe it's better to rename it instead of adding new 'String= componentName' field {quote} Role is being used as the name of the custom action or commands. We may nee= d to revisit the structure after agent side changes are finalized for servi= ce pluggability. > Add support for custom action execution > --------------------------------------- > > Key: AMBARI-3731 > URL: https://issues.apache.org/jira/browse/AMBARI-3731 > Project: Ambari > Issue Type: Sub-task > Components: controller > Affects Versions: 1.4.2 > Reporter: Sumit Mohanty > Assignee: Sumit Mohanty > Fix For: 1.4.2 > > Attachments: AMBARI-3731-II.patch, AMBARI-3731.patch > > > An action is executed on demand. Actions can also be executed as a part = of some other operation being executed by Ambari. For example, =E2=80=98Ver= ify Kerberos Setting=E2=80=99 can be executed while setting up the secured = cluster or at a later point when the admin has a need to verify the setting= while debugging some issue. > Once an action is requested by posting the request to the cluster specifi= c actions collection, the executor can monitor the status to know when the = action has finished execution. The links specific to the hosts can be monit= ored for progress on specific hosts. > Ambari Server may execute the action on all hosts in parallel.=20 > A custom action execution request consists of: > * ActionName: This is a reference to the action being executed > * Inputs: The inputs provided by the action executor to the action > * TargetHosts: The set of hosts where the action should be executed > *API support for Custom Action Execution* > An action is scheduled by posting a request resource. > {code} > curl -u admin:admin -X POST -d'{"RequestInfo":{"context":"Execute an acti= on", "action" : "a1", "service_name" : "HDFS", "component_name":"DATANODE",= "hosts":"h1"}}' http://localhost:8080/api/v1/clusters/c1/requests > {code} > Sub-tasks: > * API support to post action execution > * API support to read executed actions > * DB changes to hold action execution requests -- This message was sent by Atlassian JIRA (v6.1#6144)