Repository: ambari Updated Branches: refs/heads/branch-2.5 0045e30cd -> c737bb5ef
AMBARI-19712. Cluster creation fails due to database exception. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c737bb5e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c737bb5e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c737bb5e Branch: refs/heads/branch-2.5 Commit: c737bb5ef3499dd6909fa8bc0e5eb533904c5a06 Parents: 0045e30 Author: Attila Doroszlai <adorosz...@hortonworks.com> Authored: Thu Jan 26 19:00:25 2017 +0100 Committer: Toader, Sebastian <stoa...@hortonworks.com> Committed: Thu Jan 26 19:03:45 2017 +0100 ---------------------------------------------------------------------- .../ambari/server/controller/AmbariManagementControllerImpl.java | 1 + .../java/org/apache/ambari/server/state/ServiceComponentImpl.java | 1 + 2 files changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/c737bb5e/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index cb4fdbe..e991e1d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -1447,6 +1447,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle } @Override + @Transactional public synchronized RequestStatusResponse updateClusters(Set<ClusterRequest> requests, Map<String, String> requestProperties) throws AmbariException, AuthorizationException { http://git-wip-us.apache.org/repos/asf/ambari/blob/c737bb5e/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java index 236091b..cbf0ff9 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java @@ -466,6 +466,7 @@ public class ServiceComponentImpl implements ServiceComponent { desiredStateEntity.setClusterServiceEntity(serviceEntity); serviceComponentDesiredStateDAO.create(desiredStateEntity); + serviceEntity.getServiceComponentDesiredStateEntities().add(desiredStateEntity); serviceEntity = clusterServiceDAO.merge(serviceEntity); }