Re: stopping host components via API

2014-07-23 Thread Greg Hill
er@ambari.apache.org>> Date: Tuesday, July 22, 2014 4:40 PM To: "user@ambari.apache.org<mailto:user@ambari.apache.org>" mailto:user@ambari.apache.org>> Subject: Re: stopping host components via API Hi Greg, I would recommend putting the host in maintenance mode as shown in

Re: stopping host components via API

2014-07-22 Thread Srimanth Gunturi
HostRoles": {"state": "INSTALLED"}, > }, > } > > From: Srimanth Gunturi > Reply-To: "user@ambari.apache.org" > Date: Monday, July 21, 2014 3:03 PM > To: "user@ambari.apache.org" > Subject: Re: stopping hos

Re: stopping host components via API

2014-07-22 Thread Greg Hill
...@hortonworks.com>> Reply-To: "user@ambari.apache.org<mailto:user@ambari.apache.org>" mailto:user@ambari.apache.org>> Date: Monday, July 21, 2014 3:03 PM To: "user@ambari.apache.org<mailto:user@ambari.apache.org>" mailto:user@ambari.apache.org>

Re: stopping host components via API

2014-07-21 Thread Srimanth Gunturi
Hi Greg, Was wondering which version of Ambari you were using? When maintenance mode is enabled on service, bulk host operations are ignored. When maintenance mode is enabled on hosts, service level operations are ignored on host. So was wondering if you enabled maintenance mode in one level, and

Re: stopping host components via API

2014-07-21 Thread Greg Hill
Anyone know if this is intentional or not? It seems to ignore setting the HostRole/state if the host_component is in maintenance mode. I was able to work around it by immediately setting maintenance mode after changing the state. But that leads to a race condition as to whether nagios notices the

Re: stopping host components via API

2014-07-21 Thread Greg Hill
I did some debugging and it turns out that the problem is that I set maintenance mode prior to stopping the components. Unfortunately, this makes it so nagios starts alerting me. My script is attempting to remove a slave node from a cluster by doing the following: 1. Set maintenance mode on all

Re: stopping host components via API

2014-07-18 Thread Yusaku Sako
Greg, That should not be broken. What is the exact call you are trying to make (can you post the equivalent curl call)? Yusaku On Fri, Jul 18, 2014 at 2:13 PM, Greg Hill wrote: > This used to be accomplished by doing a PUT with this message to the host > resource: > > {"RequestInfo": {"context"

stopping host components via API

2014-07-18 Thread Greg Hill
This used to be accomplished by doing a PUT with this message to the host resource: {"RequestInfo": {"context" :"Stop All Components"}, "Body": {"HostRoles": {"state": "INSTALLED"}}} But that doesn't appear to work any more. It worked a few weeks ago. Is there somewhere where changes like th