You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ambari.apache.org by Pei Heng Zeng <wa...@gmail.com> on 2016/03/22 19:32:21 UTC

Run Service Check on a certain node

 Hi,

I am trying to implement a Service Check feature for a custom service in
Ambari. I am running into a problem where I have no control over which node
the Service Check is run on. This is a problem because the Service Check is
only designed to run on the node where the Master of the service resides.
If the Master happens to be on the node that Ambari picks to run the
Service Check, then the Service Check will run properly. Otherwise, it will
basically be a no-op.

Did anyone else run into similar issues?

Your response is greatly appreciated.

Sincerely,

Pei Heng Zeng

Re: Run Service Check on a certain node

Posted by Jayush Luniya <jl...@hortonworks.com>.
Is there a specific reason that the Service Check needs to run on the Master. It is actually better if the service check runs on a random host that has the Client component for the service installed so that you know that the service can be reached from non-master node.

Thanks
Jayush

From: Sumit Mohanty <sm...@hortonworks.com>>
Reply-To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Date: Tuesday, March 22, 2016 at 12:45 PM
To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Subject: Re: Run Service Check on a certain node


I believe this is the logic - https://github.com/apache/ambari/blob/d2ccdcaa44350000c15c6559c405383c12aac5ae/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java#L461​

________________________________
From: Pei Heng Zeng <wa...@gmail.com>>
Sent: Tuesday, March 22, 2016 11:42 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: Re: Run Service Check on a certain node

Hi Sumit,

Thanks for replying.

My service has both Master and Client. The Master itself is also a client. Is there some logic behind which node Ambari picks to run the Service Check?

Thanks

On Tue, Mar 22, 2016 at 11:36 AM, Sumit Mohanty <sm...@hortonworks.com>> wrote:

I thought the Service Check is only run on CLIENT components associated with the Service. However, if there are no CLIENT components then it may be picking up any host that has any component. Does your service only has a MASTER component?

________________________________
From: Pei Heng Zeng <wa...@gmail.com>>
Sent: Tuesday, March 22, 2016 11:32 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: Run Service Check on a certain node

Hi,

I am trying to implement a Service Check feature for a custom service in Ambari. I am running into a problem where I have no control over which node the Service Check is run on. This is a problem because the Service Check is only designed to run on the node where the Master of the service resides. If the Master happens to be on the node that Ambari picks to run the Service Check, then the Service Check will run properly. Otherwise, it will basically be a no-op.

Did anyone else run into similar issues?

Your response is greatly appreciated.

Sincerely,

Pei Heng Zeng


Re: Run Service Check on a certain node

Posted by Sumit Mohanty <sm...@hortonworks.com>.
I believe this is the logic - https://github.com/apache/ambari/blob/d2ccdcaa44350000c15c6559c405383c12aac5ae/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java#L461?

________________________________
From: Pei Heng Zeng <wa...@gmail.com>
Sent: Tuesday, March 22, 2016 11:42 AM
To: user@ambari.apache.org
Subject: Re: Run Service Check on a certain node

Hi Sumit,

Thanks for replying.

My service has both Master and Client. The Master itself is also a client. Is there some logic behind which node Ambari picks to run the Service Check?

Thanks

On Tue, Mar 22, 2016 at 11:36 AM, Sumit Mohanty <sm...@hortonworks.com>> wrote:

I thought the Service Check is only run on CLIENT components associated with the Service. However, if there are no CLIENT components then it may be picking up any host that has any component. Does your service only has a MASTER component?

________________________________
From: Pei Heng Zeng <wa...@gmail.com>>
Sent: Tuesday, March 22, 2016 11:32 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: Run Service Check on a certain node

Hi,

I am trying to implement a Service Check feature for a custom service in Ambari. I am running into a problem where I have no control over which node the Service Check is run on. This is a problem because the Service Check is only designed to run on the node where the Master of the service resides. If the Master happens to be on the node that Ambari picks to run the Service Check, then the Service Check will run properly. Otherwise, it will basically be a no-op.

Did anyone else run into similar issues?

Your response is greatly appreciated.

Sincerely,

Pei Heng Zeng


Re: Run Service Check on a certain node

Posted by Pei Heng Zeng <wa...@gmail.com>.
Hi Sumit,

Thanks for replying.

My service has both Master and Client. The Master itself is also a client.
Is there some logic behind which node Ambari picks to run the Service Check?

Thanks

On Tue, Mar 22, 2016 at 11:36 AM, Sumit Mohanty <sm...@hortonworks.com>
wrote:

> I thought the Service Check is only run on CLIENT components associated
> with the Service. However, if there are no CLIENT components then it may be
> picking up any host that has any component. Does your service only has a
> MASTER component?
> ------------------------------
> *From:* Pei Heng Zeng <wa...@gmail.com>
> *Sent:* Tuesday, March 22, 2016 11:32 AM
> *To:* user@ambari.apache.org
> *Subject:* Run Service Check on a certain node
>
> Hi,
>
> I am trying to implement a Service Check feature for a custom service in
> Ambari. I am running into a problem where I have no control over which node
> the Service Check is run on. This is a problem because the Service Check is
> only designed to run on the node where the Master of the service resides.
> If the Master happens to be on the node that Ambari picks to run the
> Service Check, then the Service Check will run properly. Otherwise, it will
> basically be a no-op.
>
> Did anyone else run into similar issues?
>
> Your response is greatly appreciated.
>
> Sincerely,
>
> Pei Heng Zeng
>

Re: Run Service Check on a certain node

Posted by Sumit Mohanty <sm...@hortonworks.com>.
I thought the Service Check is only run on CLIENT components associated with the Service. However, if there are no CLIENT components then it may be picking up any host that has any component. Does your service only has a MASTER component?

________________________________
From: Pei Heng Zeng <wa...@gmail.com>
Sent: Tuesday, March 22, 2016 11:32 AM
To: user@ambari.apache.org
Subject: Run Service Check on a certain node

Hi,

I am trying to implement a Service Check feature for a custom service in Ambari. I am running into a problem where I have no control over which node the Service Check is run on. This is a problem because the Service Check is only designed to run on the node where the Master of the service resides. If the Master happens to be on the node that Ambari picks to run the Service Check, then the Service Check will run properly. Otherwise, it will basically be a no-op.

Did anyone else run into similar issues?

Your response is greatly appreciated.

Sincerely,

Pei Heng Zeng