Antonenko Alexander created AMBARI-9128:
-------------------------------------------

             Summary: Bulk Ops on slaves for a service does not work as 
expected when the service is in maintenance mode
                 Key: AMBARI-9128
                 URL: https://issues.apache.org/jira/browse/AMBARI-9128
             Project: Ambari
          Issue Type: Bug
          Components: ambari-web
    Affects Versions: 2.0.0
            Reporter: Antonenko Alexander
            Assignee: Antonenko Alexander
             Fix For: 2.0.0



###

I am observing inconsistency in Ambari’s behavior (1.7.0) and would like to see 
if we should file a bug. My Hbase is in the maintenance mode with 2 RS down.

Next, I go to the service -> click RS link -> explicitly select all hosts with 
RS servers in the Hosts screen -> Actions -> Start RS.

Ambari even pops up a confirmation screen, but then doesn’t initiate any action.

I understand that maintenance mode prevents components from responding to bulk 
requests, but the behavior I described is wrong – we can’t expect an admin go 
an start a component on each host manually.

I’d expect this – components won’t respond to bulk requests, but if I 
explicitly select hosts and perform an action – it should go through. 
Especially if Ambari asks me for a confirmation.

###

This should go thru.  HBase is in Maintenance Mode, but specific operations on 
HBase itself or its slaves should work.

PUT request to '/api/v1/clusters/HDP_2_2/host_components' sets an operation 
level in RequestInfo to CLUSTER. 

{code}
{
        "RequestInfo":{
                "context":"Start RegionServers",
                "operation_level":{"level":"CLUSTER","cluster_name":"HDP_2_2"},
                
"query":"HostRoles/component_name=HBASE_REGIONSERVER&HostRoles/host_name.in(c6403.ambari.apache.org,c6407.ambari.apache.org)&HostRoles/maintenance_state=OFF"
        },
        "Body":{
                "HostRoles":{"state":"STARTED"}
        }
}
{code}

But our host-component maintenance state is IMPLIED_FROM_SERVICE.
So our API rejects state change.
UI should set an operation_level level to SERVICE in this case.
{{(Actions -> Selected/Filtered/All hosts -> RegionServers/DataNodes... etc)}}

So new PUT request should looks like:
{code}
{
        "RequestInfo":{
                "context":"Start RegionServers",
                "operation_level":{"level":"SERVICE","cluster_name":"HDP_2_2"},
        .......
}
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to