ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siddharth Wagle <>
Subject Re: Adding install priority to custom services
Date Sat, 07 Mar 2015 02:18:31 GMT
Hi Brian,

Make sure to define the rules separately for install from start, since ambari creates separate
stages for these commands. This should resolve the issue, do let us know the outcome.


Sent by Outlook<> for Android
From:Brian de la Motte
Subject:Re: Adding install priority to custom services
Cc:Ben Barnett


I believe we are having the same issue as Satya. We have a service that is dependent on HDFS
being started and have declared it in our role_command_order.json, but Ambari is installing
the custom service before HDFS has started and erring out. It does install HDFS before the
custom service, just not start HDFS, even though I have this in my role_command_order.json:


When reviewing the ambari-agent.log, it installs the namenode and datanode, but doesn't start
the namenode at all. It gets the status of the namenode, and shows it's not running, but doesn't
start it. Is the role_command_order.json need anything else inside it to force a service to
be in a started state before installing another service?


On Thu, Mar 5, 2015 at 3:36 AM, Satyanarayana Jampa <<>>
Hi Sid,
                Below are the steps I followed to keep the service installation in an order.

1.       I have modified the below file and restarted ambari-server:
                                vi /var/lib/ambari-server/resources/stacks/HDP/2.0.6/role_command_order.json
                                #added below lines
                                "A_HANDLER-INSTALL" : ["B_HANDLER-INSTALL", "C_HANDLER-INSTALL"],
                                "A_HANDLER-START": ["B_HANDLER-START", "C_HANDLER-START"],

2.       But, while installing the services the installation order was happening in Alphabetical

3.       I want the order to be C, B and A.

Am I missing something here.

From: Siddharth Wagle [<>]
Sent: 05 March 2015 01:58
Subject: Re: Adding install priority to custom services

Hi Satya,

Take a look at the


This json structure is used to build the dependency graph between components.

Every stack overrides this file to add order between new components that the stack introduces,
so that the base copy of this file remains unchanged.

In your case, if you add INSTALL time or START time dependencies between service2 to service1
components, Ambari will re-order the commands automatically.

Note: Format of the keys in the json is "ComponentName"-"Command" (Commands: START, INSTALL,



From: Satyanarayana Jampa <<>>
Sent: Wednesday, March 04, 2015 3:08 AM
Subject: Adding install priority to custom services

I have created some custom services, and in my case the "service2" needs "service1" to be
installed first as it is needed for service2 to function properly.
How can I specify the dependency or order in which the services should be installed.


View raw message