ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-10209) ClusterHostMapping table prevents cluster deployment, missing host_id column
Date Wed, 25 Mar 2015 20:22:53 GMT

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

Hudson commented on AMBARI-10209:
---------------------------------

SUCCESS: Integrated in Ambari-trunk-Commit #2113 (See [https://builds.apache.org/job/Ambari-trunk-Commit/2113/])
AMBARI-10209. ClusterHostMapping table prevents cluster deployment, missing host_id column
(alejandro) (afernandez: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=ae9c18141f5d612942bd210e5d64e352e2f23846)
* ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
* ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
* ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
* ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
* ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql


> ClusterHostMapping table prevents cluster deployment, missing host_id column
> ----------------------------------------------------------------------------
>
>                 Key: AMBARI-10209
>                 URL: https://issues.apache.org/jira/browse/AMBARI-10209
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.1.0
>            Reporter: Alejandro Fernandez
>            Assignee: Alejandro Fernandez
>            Priority: Critical
>             Fix For: 2.1.0
>
>         Attachments: AMBARI-10209.patch
>
>
> When deploying a new cluster, the embedded Postgres SQL file has incorrect columns for
the ClusterHostMapping table.
> {code}
> psql:/Users/*/src/hwx/ambari/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql:652:
ERROR:  column "host_id" referenced in foreign key constraint does not exist
> {code}
> {code:title=During deployment...}
> [3/25/15, 1:53:28 PM] Internal Exception: org.postgresql.util.PSQLException: ERROR: column
t0.host_id does not exist
> [3/25/15, 1:54:00 PM] Query: ReadAllQuery(name="hostEntities" referenceClass=HostEntity
sql="SELECT t1.id, t1.cpu_count, t1.cpu_info, t1.discovery_status, t1.host_attributes, t1.host_name,
t1.ipv4, t1.ipv6, t1.last_registration_time, t1.os_arch, t1.os_info, t1.os_type, t1.ph_cpu_count,
t1.public_host_name, t1.rack_info, t1.total_mem FROM ClusterHostMapping t0, hosts t1 WHERE
((t0.cluster_id = ?) AND (t1.id = t0.host_id))")
> {code}
> It looks like the host_id is commented out of the table. Correcting this causes:
> {code}
> Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "host_name"
violates not-null constraint
> {code}
> It looks like the correct table declaration is:
> {code}
> CREATE TABLE ambari.ClusterHostMapping (
>   cluster_id BIGINT NOT NULL,
>   host_id BIGINT NOT NULL,
>   PRIMARY KEY (cluster_id, host_id));
> GRANT ALL PRIVILEGES ON TABLE ambari.ClusterHostMapping TO :username;
> {code}
> It looks like all of the SQL files have this problem...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message