I have two ways that I know of to enable maintenance mode on a host, but it 
seems like neither one returns a request id, where pretty much every other API 
call that generates a request does return an id.  Is this a bug?

I'm testing against ambari 1.6.1

PUT http://c6401.ambari.apache.org:8080/api/v1/clusters/testcluster/hosts
{"RequestInfo": {"query": "Hosts/host_name.in(c6404.ambari.apache.org)", 
"context": "Start Maintenance Mode"}, "Body": {"Hosts": {"maintenance_state": 
"ON"}}}

Response is a 200 with an empty response body.

Alternatively:

PUT 
http://c6401.ambari.apache.org:8080/api/v1/clusters/testcluster/hosts/c6404.ambari.apache.org/host_components?fields=HostRoles/state
{"RequestInfo": {"context": "Start Maintenance Mode"}, "Body": {"HostRoles": 
{"maintenance_state": "ON"}}}

Same response.  200 OK, no body.

Thanks in advance for any help.

Greg

Reply via email to