Speaking of upgrade - is there any documentation on upgrading from 1.7 to 2.0?
From: Jonathan Hurley <[email protected]>
To: "[email protected]" <[email protected]>
Sent: Thursday, April 30, 2015 11:28 AM
Subject: Re: Ambari 2.0 - Blueprint with configuration fails
Is this an upgrade from Ambari 1.7.0? If so, you might be hitting
https://issues.apache.org/jira/browse/AMBARI-10665
Seems like the config_attributes column was missed on a few tables. If that’s
the case, then you can shut down Ambari Server and add the missing column
manually to your database.
On Apr 30, 2015, at 12:01 PM, Romain <[email protected]> wrote:
Hi all,
I have a strange error when I POST a Blueprint with configuration inside.
For example, I choose this blueprint
$ curl
'https://cwiki.apache.org/confluence/download/attachments/55151584/hdfs_ha_blueprint.json?version=3&modificationDate=1430388955000&api=v2'
> /tmp/blueprint
When I send it it fails.
$ curl -u admin:admin -X POST -H 'X-Requested-By: scalr'
http://localhost:8080/api/v1/blueprints/blueprint-$cluster -d @/tmp/blueprint
{
"status": 500,
"message": "javax.persistence.RollbackException: Exception [EclipseLink-4002]
(Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd):
org.eclipse.persistence.exceptions.DatabaseException\nInternal Exception:
java.sql.BatchUpdateException: Batch entry 0 INSERT INTO
blueprint_configuration (type_name, config_attributes, config_data,
blueprint_name) VALUES (\u0027hdfs-site\u0027, \u0027{}\u0027,
\u0027{\"dfs.namenode.https-address\":\"%HOSTGROUP::master_1%:50470\",\"dfs.ha.namenodes.mycluster\":\"nn1,nn2\",\"dfs.namenode.http-address\":\"%HOSTGROUP::master_1%:50070\",\"dfs.nameservices\":\"mycluster\",\"dfs.namenode.https-address.mycluster.nn2\":\"%HOSTGROUP::master_3%:50470\",\"dfs.namenode.https-address.mycluster.nn1\":\"%HOSTGROUP::master_1%:50470\",\"dfs.ha.fencing.methods\":\"shell(/bin/true)\",\"dfs.ha.automatic-failover.enabled\":\"true\",\"dfs.client.failover.proxy.provider.mycluster\":\"org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider\",\"dfs.namenode.http-address.mycluster.nn2\":\"%HOSTGROUP::master_3%:50070\",\"dfs.namenode.http-address.mycluster.nn1\":\"%HOSTGROUP::master_1%:50070\",\"dfs.namenode.rpc-address.mycluster.nn2\":\"%HOSTGROUP::master_3%:8020\",\"dfs.namenode.shared.edits.dir\":\"qjournal://%HOSTGROUP::master_1%:8485;%HOSTGROUP::master_2%:8485;%HOSTGROUP::master_3%:8485/mycluster\",\"dfs.namenode.rpc-address.mycluster.nn1\":\"%HOSTGROUP::master_1%:8020\"}\u0027,
\u0027blueprint-\u0027) was aborted. Call getNextException to see the
cause.\nError Code: 0\nCall: INSERT INTO blueprint_configuration (type_name,
config_attributes, config_data, blueprint_name) VALUES (?, ?, ?, ?)\n\tbind
\u003d\u003e [4 parameters bound]\nQuery:
InsertObjectQuery(org.apache.ambari.server.orm.entities.HostGroupEntity@1782a3fd)
And if I remove the configuration part it works.
In the pg logs files I can see this:
==> /var/lib/pgsql/data/pg_log/postgresql-Thu.log <==
ERROR: column "config_attributes" of relation "blueprint_configuration" does
not exist at character 49
STATEMENT: INSERT INTO blueprint_configuration (type_name, config_attributes,
config_data, blueprint_name) VALUES ($1, $2, $3, $4)
ERROR: current transaction is aborted, commands ignored until end of
transaction block
STATEMENT: SELECT 1
# rpm -qa |grep ambari
ambari-server-2.0.0-151.noarch
Any idea ?
Cheers
Romain