You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2019/02/26 17:55:02 UTC

[jira] [Commented] (AMBARI-25084) Delete identities fails when removing service in reverse order

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

Hudson commented on AMBARI-25084:
---------------------------------

SUCCESS: Integrated in Jenkins build Ambari-trunk-Commit #10471 (See [https://builds.apache.org/job/Ambari-trunk-Commit/10471/])
AMBARI-25084. Delete identities fails when removing service in reverse (vishalsuvagia: [https://gitbox.apache.org/repos/asf?p=ambari.git&a=commit&h=1f8ba861e7182731b7389562e662df002e3c71f4])
* (edit) ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java


> Delete identities fails when removing service in reverse order
> --------------------------------------------------------------
>
>                 Key: AMBARI-25084
>                 URL: https://issues.apache.org/jira/browse/AMBARI-25084
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-server
>    Affects Versions: 2.7.0
>            Reporter: Attila Magyar
>            Assignee: Attila Magyar
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.8.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> (reverse order = host components first, then components, then service)
> STR:
> Install ZooKeeper + Kafka + Kerberos
> Stop Kafka
> curl -X DELETE http://c7401.ambari.apache.org:8080/api/v1/clusters/TEST/hosts/c7401.ambari.apache.org/host_components/KAFKA_BROKER
> curl -X DELETE http://c7401.ambari.apache.org:8080/api/v1/clusters/TEST/services/KAFKA/components/KAFKA_BROKER
> => identities are removed
> curl -X DELETE http://c7401.ambari.apache.org:8080/api/v1/clusters/TEST/services/KAFKA
> => identity removal fails with PersistenceException
> {code}
> Internal Exception: org.postgresql.util.PSQLException: ERROR: syntax error at or near ")"
>   Position: 210
> Error Code: 0
> Call: SELECT t0.config_id, t0.cluster_id, t0.selected, t0.selected_timestamp, t0.version_tag, t0.create_timestamp, t0.type_name, t0.unmapped, t0.version, t0.stack_id FROM clusterconfig t0 WHERE ((((t0.type_name IN ()) AND (t0.cluster_id = ?)) AND (t0.stack_id = ?)) AND (t0.selected_timestamp = (SELECT MAX(t1.selected_timestamp) FROM clusterconfig t1 WHERE (((t1.cluster_id = ?) AND (t1.stack_id = ?)) AND (t1.type_name = t0.type_name)))))
>         bind => [4 parameters bound]
> Query: ReadAllQuery(name="ClusterConfigEntity.findLatestConfigsByStackWithTypes" referenceClass=ClusterConfigEntity sql="SELECT t0.config_id, t0.cluster_id, t0.selected, t0.selected_timestamp, t0.version_tag, t0.create_timestamp, t0.type_name, t0.unmapped, t0.version, t0.stack_id FROM clusterconfig t0 WHERE ((((t0.type_name IN ?) AND (t0.cluster_id = ?)) AND (t0.stack_id = ?)) AND (t0.selected_timestamp = (SELECT MAX(t1.selected_timestamp) FROM clusterconfig t1 WHERE (((t1.cluster_id = ?) AND (t1.stack_id = ?)) AND (t1.type_name = t0.type_name)))))")
> FetchGroup(){serviceConfigEntities, stack, selectedTimestamp, clusterId, type, version, unmapped, configId, configGroupConfigMappingEntities, tag, selected, timestamp, clusterEntity}
> javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: org.postgresql.util.PSQLException: ERROR: syntax error at or near ")"
>   Position: 210
> Error Code: 0
> Call: SELECT t0.config_id, t0.cluster_id, t0.selected, t0.selected_timestamp, t0.version_tag, t0.create_timestamp, t0.type_name, t0.unmapped, t0.version, t0.stack_id FROM clusterconfig t0 WHERE ((((t0.type_name IN ()) AND (t0.cluster_id = ?)) AND (t0.stack_id = ?)) AND (t0.selected_timestamp = (SELECT MAX(t1.selected_timestamp) FROM clusterconfig t1 WHERE (((t1.cluster_id = ?) AND (t1.stack_id = ?)) AND (t1.type_name = t0.type_name)))))
>         bind => [4 parameters bound]
> Query: ReadAllQuery(name="ClusterConfigEntity.findLatestConfigsByStackWithTypes" referenceClass=ClusterConfigEntity sql="SELECT t0.config_id, t0.cluster_id, t0.selected, t0.selected_timestamp, t0.version_tag, t0.create_timestamp, t0.type_name, t0.unmapped, t0.version, t0.stack_id FROM clusterconfig t0 WHERE ((((t0.type_name IN ?) AND (t0.cluster_id = ?)) AND (t0.stack_id = ?)) AND (t0.selected_timestamp = (SELECT MAX(t1.selected_timestamp) FROM clusterconfig t1 WHERE (((t1.cluster_id = ?) AND (t1.stack_id = ?)) AND (t1.type_name = t0.type_name)))))")
> FetchGroup(){serviceConfigEntities, stack, selectedTimestamp, clusterId, type, version, unmapped, configId, configGroupConfigMappingEntities, tag, selected, timestamp, clusterEntity}
>         at org.eclipse.persistence.internal.jpa.QueryImpl.getDetailedException(QueryImpl.java:382)
>         at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:260)
>         at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:473)
>         at org.apache.ambari.server.orm.dao.DaoUtils.selectList(DaoUtils.java:53)
>         at org.apache.ambari.server.orm.dao.ClusterDAO.getLatestConfigurationsWithTypes(ClusterDAO.java:226)
>         at org.apache.ambari.server.orm.AmbariLocalSessionInterceptor.invoke(AmbariLocalSessionInterceptor.java:44)
>         at org.apache.ambari.server.state.cluster.ClusterImpl.getLatestConfigsWithTypes(ClusterImpl.java:1185)
>         at org.apache.ambari.server.controller.DeleteIdentityHandler$PrepareDeleteIdentityServerAction.extendWithDeletedConfigOfService(DeleteIdentityHandler.java:304)
>         at org.apache.ambari.server.controller.DeleteIdentityHandler$PrepareDeleteIdentityServerAction.calculateConfig(DeleteIdentityHandler.java:296)
>         at org.apache.ambari.server.controller.DeleteIdentityHandler$PrepareDeleteIdentityServerAction.execute(DeleteIdentityHandler.java:273)
>         at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.execute(ServerActionExecutor.java:550)
>         at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.run(ServerActionExecutor.java:466)
>         at java.lang.Thread.run(Thread.java:745)
> {code}



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