[ 
https://issues.apache.org/jira/browse/AMBARI-12429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14630951#comment-14630951
 ] 

Hudson commented on AMBARI-12429:
---------------------------------

SUCCESS: Integrated in Ambari-trunk-Commit #3128 (See 
[https://builds.apache.org/job/Ambari-trunk-Commit/3128/])
AMBARI-12429. Deleting a host using the API causes NPE (alejandro) (afernandez: 
http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=358dc1d8eb361480932380d8546d58b264a25c38)
* 
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
* 
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
* 
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
* 
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestOperationLevelDAO.java
* 
ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
* 
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestOperationLevelTest.java
* 
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
* 
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestOperationLevelEntity.java
* 
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestOperationLevel.java
* 
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java


> Deleting a host using the API causes NPE
> ----------------------------------------
>
>                 Key: AMBARI-12429
>                 URL: https://issues.apache.org/jira/browse/AMBARI-12429
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.1.0
>            Reporter: Alejandro Fernandez
>            Assignee: Alejandro Fernandez
>            Priority: Blocker
>             Fix For: 2.1.1
>
>         Attachments: AMBARI-12429.branch-2.1.1.patch, AMBARI-12429.patch, 
> ambari-server.log
>
>
> There are 3 issues while deleting hosts.
> 1. Created a cluster with multiple hosts, then stopped all of the services on 
> 1 host (preferably one with only clients so it has nothing to stop). Then 
> deleted the host using the API.
> E.g., curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE 
> http://c6401.ambari.apache.org:8080/api/v1/hosts/c6404.ambari.apache.org
> This led to Null Pointer Exceptions in ambari-server because the UI is still 
> generating requests to get the ServiceComponentHost response, which isn't 
> locking code, and makes request to get the HostState (this record has been 
> deleted), so a NPE is thrown. This needs to be more robust; adding locks 
> around here may have other repercussions, so I decided to just check for != 
> null.
> 2. If a Host with DataNode  becomes decommissioned, it will have a record in 
> the requestoperationlevel table, whose records are not currently being 
> deleted when a Host is deleted.
> 3. There are differences between deleting a Host using the /hosts/name and 
> /clusters/name/hosts/name API. In the former, since no cluster is provided, 
> it blindly deletes the host without checking if it has any masters/slaves on 
> it, which need to be stopped and deleted first.
> ambari-server-2.1.0-2480.x86_64
> ambari-server --hash
> 7d0fd97cc697b22357f4c499b80b8baf9a1c1dbc



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

Reply via email to