Sandeep Kumar created AMBARI-24660:
--------------------------------------

             Summary: Request Schedule proceeds with next task despite 
tolerance being 0
                 Key: AMBARI-24660
                 URL: https://issues.apache.org/jira/browse/AMBARI-24660
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: 2.6.1
         Environment: centos
            Reporter: Sandeep Kumar
         Attachments: test.json

Request Schedule does not honor  task_failure_tolerance value of 0, when 
service component isn't present on host and moves to the next task.

*STEPS TO REPRO*

Download attached test.json file, create a cluster with a custom service and 
run these command.

AMBARI_SERVER_HOST=c7001.ambari.apache.org
CLUSTER_NAME=test-cluster

USERNAME=admin
PASSWORD=admin
AMBARI_SERVER_PORT=8080
AMBARI_SERVER_PROTOCOL=http

curl -u $USERNAME:$PASSWORD -H "X-Requested-By: ambari" -X POST -d @test.json 
$AMBARI_SERVER_PROTOCOL://$AMBARI_SERVER_HOST:$AMBARI_SERVER_PORT/api/v1/clusters/$CLUSTER_NAME/request_schedules

 

SERVER LOGS EXCEPTION

19 Sep 2018 06:56:24,841 INFO [ambari-client-thread-812] 
AmbariManagementControllerImpl:4174 - Received action execution request, 
clusterName=test-cluster, request=isCommand :true, action :null, command 
:STOP_KRB_MASTER_USING_CC, inputs :\{HAS_RESOURCE_FILTERS=true}, 
resourceFilters: [RequestResourceFilter\{serviceName='MY_CUSTOM_SERVICE', 
componentName='MY_CUSTOM_SERVICE_COMPONENT', 
hostNames=[c7001.ambari.apache.org]}], exclusive: false, clusterName 
:test-cluster 
19 Sep 2018 06:56:24,846 ERROR [ambari-client-thread-812] 
AbstractResourceProvider:285 - Caught AmbariException when creating a resource 
org.apache.ambari.server.ServiceComponentHostNotFoundException: 
ServiceComponentHost not found, clusterName=test-cluster, 
serviceName=MY_CUSTOM_SERVICE, 
serviceComponentName=MY_CUSTOM_SERVICE_COMPONENT, 
hostName=c7001.ambari.apache.org 
 at 
org.apache.ambari.server.state.ServiceComponentImpl.getServiceComponentHost(ServiceComponentImpl.java:322)
 
 at 
org.apache.ambari.server.controller.MaintenanceStateHelper.isOperationAllowed(MaintenanceStateHelper.java:112)
 
 at 
org.apache.ambari.server.controller.MaintenanceStateHelper.isOperationAllowed(MaintenanceStateHelper.java:88)
 
 at 
org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper$1.shouldHostBeRemoved(AmbariCustomCommandExecutionHelper.java:290)
 
 at 
org.apache.ambari.server.controller.MaintenanceStateHelper.filterHostsInMaintenanceState(MaintenanceStateHelper.java:424)
 
 at 
org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper.addCustomCommandAction(AmbariCustomCommandExecutionHelper.java:285)
 
 at 
org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper.addExecutionCommandsToStage(AmbariCustomCommandExecutionHelper.java:1192)
 
 at 
org.apache.ambari.server.controller.AmbariManagementControllerImpl.createAction(AmbariManagementControllerImpl.java:4229)
 
 at 
org.apache.ambari.server.controller.internal.RequestResourceProvider$1.invoke(RequestResourceProvider.java:264)
 
 at 
org.apache.ambari.server.controller.internal.RequestResourceProvider$1.invoke(RequestResourceProvider.java:193)
 
 at 
org.apache.ambari.server.controller.internal.AbstractResourceProvider.invokeWithRetry(AbstractResourceProvider.java:455)
 
 at 
org.apache.ambari.server.controller.internal.AbstractResourceProvider.createResources(AbstractResourceProvider.java:278)
 
 at 
org.apache.ambari.server.controller.internal.RequestResourceProvider.createResources(RequestResourceProvider.java:193)
 
 at 
org.apache.ambari.server.controller.internal.ClusterControllerImpl.createResources(ClusterControllerImpl.java:298)
 
 at 
org.apache.ambari.server.api.services.persistence.PersistenceManagerImpl.create(PersistenceManagerImpl.java:97)
 
 at 
org.apache.ambari.server.api.handlers.CreateHandler.persist(CreateHandler.java:37)
 
 at 
org.apache.ambari.server.api.handlers.BaseManagementHandler.handleRequest(BaseManagementHandler.java:73)
 
 at 
org.apache.ambari.server.api.services.BaseRequest.process(BaseRequest.java:144) 
 at 
org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:126)
 
 at 
org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:90)
 
 at 
org.apache.ambari.server.api.services.RequestService.createRequests(RequestService.java:145)
 
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 
 at java.lang.reflect.Method.invoke(Method.java:498)

 

 

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to