ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ajit Kumar (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMBARI-15726) Removing unknown host from cluster throws NPE
Date Thu, 07 Apr 2016 00:44:25 GMT

     [ https://issues.apache.org/jira/browse/AMBARI-15726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ajit Kumar updated AMBARI-15726:
--------------------------------
       Resolution: Fixed
    Fix Version/s: 2.4.0
           Status: Resolved  (was: Patch Available)

Submitted to trunk

> Removing unknown host from cluster throws NPE
> ---------------------------------------------
>
>                 Key: AMBARI-15726
>                 URL: https://issues.apache.org/jira/browse/AMBARI-15726
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.4.0
>            Reporter: Ajit Kumar
>            Assignee: Ajit Kumar
>             Fix For: 2.4.0
>
>         Attachments: rb45785.patch
>
>
> Removing unknown host from cluster throws NPE exception:
> API call:
> {code}
> curl -u admin:admin  -H 'X-Requested-By: ambari' -X DELETE  http://c6401.ambari.apache.org:8080/api/v1/clusters/a/hosts/c6402.ambari.apache.org
> {
>   "status": 500,
>   "message": "Server Error"
> }
> {code}
> stack trace:
> {code}
> 06 Apr 2016 01:12:34,724  WARN [qtp-ambari-client-95] ServletHandler:628 - /api/v1/clusters/a/hosts/c6402.ambari.apache.org
> java.lang.NullPointerException
>         at java.util.HashSet.<init>(HashSet.java:118)
>         at org.apache.ambari.server.state.cluster.ClustersImpl.deleteHost(ClustersImpl.java:843)
>         at org.apache.ambari.server.controller.internal.HostResourceProvider.deleteHosts(HostResourceProvider.java:889)
>         at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:128)
>         at org.apache.ambari.server.controller.internal.HostResourceProvider$4.invoke(HostResourceProvider.java:344)
>         at org.apache.ambari.server.controller.internal.HostResourceProvider$4.invoke(HostResourceProvider.java:341)
>         at org.apache.ambari.server.controller.internal.AbstractResourceProvider.invokeWithRetry(AbstractResourceProvider.java:451)
>         at org.apache.ambari.server.controller.internal.AbstractResourceProvider.modifyResources(AbstractResourceProvider.java:332)
>         at org.apache.ambari.server.controller.internal.HostResourceProvider.deleteResourcesAuthorized(HostResourceProvider.java:341)
>         at org.apache.ambari.server.controller.internal.AbstractAuthorizedResourceProvider.deleteResources(AbstractAuthorizedResourceProvider.java:332)
>         at org.apache.ambari.server.controller.internal.ClusterControllerImpl.deleteResources(ClusterControllerImpl.java:330)
>         at org.apache.ambari.server.api.services.persistence.PersistenceManagerImpl.delete(PersistenceManagerImpl.java:132)
>         at org.apache.ambari.server.api.handlers.DeleteHandler.persist(DeleteHandler.java:45)
>         at org.apache.ambari.server.api.handlers.BaseManagementHandler.handleRequest(BaseManagementHandler.java:72)
>         at org.apache.ambari.server.api.services.BaseRequest.process(BaseRequest.java:145)
>         at org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:119)
>         at org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:83)
>         at org.apache.ambari.server.api.services.HostService.deleteHost(HostService.java:194)
> {code}
> API should return 404 NoSuchResourceException.



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

Mime
View raw message