> On April 27, 2015, 6:23 p.m., Jonathan Hurley wrote: > > ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql, line 294 > > <https://reviews.apache.org/r/33592/diff/1/?file=943112#file943112line294> > > > > I'm guessing this is a new column. On upgrade, shouldn't > > UpgradeCatalog210 also ensure this is created as NULLABLE?
UpgradeCatalog210 creates almost all columns as NULLable, then tries to populate them with values, then sets them as NOT NULLable. The exception is requestoperationlevel table. https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java line 296 - Alejandro ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33592/#review81706 ----------------------------------------------------------- On April 27, 2015, 6:23 p.m., Alejandro Fernandez wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/33592/ > ----------------------------------------------------------- > > (Updated April 27, 2015, 6:23 p.m.) > > > Review request for Ambari, Jaimin Jetly, Jonathan Hurley, Sumit Mohanty, and > Sid Wagle. > > > Bugs: AMBARI-10774 > https://issues.apache.org/jira/browse/AMBARI-10774 > > > Repository: ambari > > > Description > ------- > > Error: > > ``` > Error message: Exception [EclipseLink-4002] (Eclipse Persistence Services - > 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException > Internal Exception: org.postgresql.util.PSQLException: ERROR: null value in > column "host_id" violates not-null constraint > Error Code: 0 > Call: INSERT INTO requestoperationlevel (operation_level_id, cluster_name, > host_component_name, host_id, level_name, request_id, service_name) VALUES > (?, ?, ?, ?, ?, ?, ?) > bind => [7 parameters bound] > Query: > InsertObjectQuery(org.apache.ambari.server.orm.entities.RequestResourceFilterEntity@7fc800da) > ``` > > > Diffs > ----- > > ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql d9e546f > ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 37aaf7d > ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 8b1aaad > ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql > f0686a9 > ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql f5433f1 > > Diff: https://reviews.apache.org/r/33592/diff/ > > > Testing > ------- > > Applied changes to sql scripts after installing RPMs for ambari-server, but > before running ambari-server setup -s. > Verified that the schema was created with host_id allowing NULLs in > requestoperationlevel, and that after deploying a cluster was able to issue a > RESTART command. > > ``` > ambari=> select * from requestoperationlevel; > operation_level_id | request_id | level_name | cluster_name | service_name | > host_component_name | host_id > --------------------+------------+------------+--------------+--------------+---------------------+--------- > 2 | 5 | Service | c1 | ZOOKEEPER | > | > (1 row) > ``` > > > Thanks, > > Alejandro Fernandez > >
