Browse Source

AMBARI-1565. Ambari server throws EntityExistsException on transitioning from INIT to INSTALLED state. (swagle)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1453550 13f79535-47bb-0310-9956-ffa450edef68
Siddharth Wagle 12 years ago
parent
commit
e9db441699

+ 3 - 0
CHANGES.txt

@@ -421,6 +421,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-1565. Ambari server throws EntityExistsException on transitioning 
+ from INIT to INSTALLED state. (Sumit Mohanty via swagle)
+
  AMBARI-1564. TestActionManager is failing on master branch. (swagle)
 
  AMBARI-1561. API should return nagios_alerts as a JSON, not a 

+ 1 - 1
ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql

@@ -147,7 +147,7 @@ ALTER TABLE ambari.user_roles ADD CONSTRAINT FK_user_roles_role_name FOREIGN KEY
 ALTER TABLE ambari.hostconfigmapping ADD CONSTRAINT FK_hostconfigmapping_cluster_id FOREIGN KEY (cluster_id) REFERENCES ambari.clusters (cluster_id);
 ALTER TABLE ambari.hostconfigmapping ADD CONSTRAINT FK_hostconfigmapping_host_name FOREIGN KEY (host_name) REFERENCES ambari.hosts (host_name);
 
-CREATE SEQUENCE ambari.host_role_command_task_id_seq START WITH 1;
+CREATE SEQUENCE ambari.host_role_command_task_id_seq INCREMENT BY 50 START WITH 51;
 
 GRANT ALL PRIVILEGES ON TABLE ambari.host_role_command_task_id_seq TO :username;
 

+ 3 - 0
ambari-server/src/main/resources/upgrade/ddl/Ambari-DDL-Postgres-UPGRADE-1.3.0.sql

@@ -28,3 +28,6 @@ CREATE TABLE ambari.hostconfigmapping (cluster_id bigint NOT NULL, host_name VAR
 GRANT ALL PRIVILEGES ON TABLE ambari.hostconfigmapping TO :username;
 ALTER TABLE ambari.hostconfigmapping ADD CONSTRAINT FK_hostconfigmapping_cluster_id FOREIGN KEY (cluster_id) REFERENCES ambari.clusters (cluster_id);
 ALTER TABLE ambari.hostconfigmapping ADD CONSTRAINT FK_hostconfigmapping_host_name FOREIGN KEY (host_name) REFERENCES ambari.hosts (host_name);
+
+ALTER SEQUENCE ambari.host_role_command_task_id_seq INCREMENT BY 50;
+SELECT nextval('ambari.host_role_command_task_id_seq');