You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2013/05/29 16:17:10 UTC

svn commit: r1487496 - in /incubator/ambari/trunk: CHANGES.txt ambari-server/src/main/resources/upgrade/ddl/Ambari-DDL-Postgres-UPGRADE-1.3.0.sql

Author: smohanty
Date: Wed May 29 14:17:10 2013
New Revision: 1487496

URL: http://svn.apache.org/r1487496
Log:
AMBARI-2159. After upgrading ambari from 1.2.2.5 to 1.2.3.6 the server throws 500 error when starting/stopping any service. part-II. (smohanty)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-server/src/main/resources/upgrade/ddl/Ambari-DDL-Postgres-UPGRADE-1.3.0.sql

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1487496&r1=1487495&r2=1487496&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed May 29 14:17:10 2013
@@ -2170,6 +2170,9 @@ AMBARI-1.2.0 branch:
 
  BUG FIXES
 
+ AMBARI-2159. After upgrading ambari from 1.2.2.5 to 1.2.3.6 the server
+ throws 500 error when starting/stopping any service. part-II (smohanty)
+
  AMBARI-2057. Gmond left in init after install, part-II. (smohanty)
 
  AMBARI-1613.  ConfigurationResourceProvider doesn't properly handle OR

Modified: incubator/ambari/trunk/ambari-server/src/main/resources/upgrade/ddl/Ambari-DDL-Postgres-UPGRADE-1.3.0.sql
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/resources/upgrade/ddl/Ambari-DDL-Postgres-UPGRADE-1.3.0.sql?rev=1487496&r1=1487495&r2=1487496&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/resources/upgrade/ddl/Ambari-DDL-Postgres-UPGRADE-1.3.0.sql (original)
+++ incubator/ambari/trunk/ambari-server/src/main/resources/upgrade/ddl/Ambari-DDL-Postgres-UPGRADE-1.3.0.sql Wed May 29 14:17:10 2013
@@ -29,18 +29,14 @@ ALTER TABLE ambari.clusterstate
 CREATE TABLE ambari.metainfo ("metainfo_key" VARCHAR(255), "metainfo_value" VARCHAR, PRIMARY KEY("metainfo_key"));
 GRANT ALL PRIVILEGES ON TABLE ambari.metainfo TO :username;
 
-CREATE TABLE ambari.hostconfigmapping (cluster_id bigint NOT NULL, host_name VARCHAR(255) NOT NULL, type_name VARCHAR(255) NOT NULL, version_tag VARCHAR(255) NOT NULL, service_name VARCHAR(255), create_timestamp BIGINT NOT NULL, selected INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (cluster_id, host_name, type_name, create_timestamp));
+CREATE TABLE ambari.hostconfigmapping (cluster_id bigint NOT NULL, host_name VARCHAR(255) NOT NULL, type_name VARCHAR(255) NOT NULL, version_tag VARCHAR(255) NOT NULL, service_name VARCHAR(255), create_timestamp BIGINT NOT NULL, selected INTEGER NOT NULL DEFAULT 0, user_name VARCHAR(255) NOT NULL DEFAULT '_db', PRIMARY KEY (cluster_id, host_name, type_name, create_timestamp));
 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 ROLE :username SET search_path to 'ambari';
 
-ALTER SEQUENCE ambari.host_role_command_task_id_seq INCREMENT BY 50;
-SELECT nextval('ambari.host_role_command_task_id_seq');
-
-ALTER TABLE ambari.stage ADD COLUMN request_context VARCHAR(255);SELECT nextval('ambari.host_role_command_task_id_seq');
-
+ALTER TABLE ambari.stage ADD COLUMN request_context VARCHAR(255);
 
 -- portability changes for MySQL/Oracle support
 alter table ambari.hostcomponentdesiredconfigmapping rename to hcdesiredconfigmapping;
@@ -55,7 +51,7 @@ insert into ambari.ambari_sequences(sequ
   union all
   select 'user_id_seq', nextval('ambari.users_user_id_seq')
   union all
-  select 'host_role_command_id_seq', nextval('ambari.host_role_command_task_id_seq');
+  select 'host_role_command_id_seq', (select max(task_id) from ambari.host_role_command) + 51;
 
 drop sequence ambari.host_role_command_task_id_seq;
 drop sequence ambari.users_user_id_seq;