Created 11-24-2015 07:16 PM
Created 11-24-2015 07:27 PM
@kkane - this is the Ambari JIRA that introduced the change: https://issues.apache.org/jira/browse/AMBARI-10270
A method was introduced that checks if the JDK name (jdk.name) and JDBC database (server.jdbc.database) properties are set to determine if setup has already been run:
+def check_setup_already_done(): + properties = get_ambari_properties() + if properties == -1: + print_error_msg("Error getting ambari properties") + return -1 + + return properties.get_property(JDK_NAME_PROPERTY) and properties.get_property(JDBC_DATABASE_PROPERTY) +
Created 11-24-2015 07:18 PM
Please see this from my env
[root@phdns01 ~]# ambari-server setup -s
Using python /usr/bin/python2.6
Setup ambari-server
Nothing was done. Ambari Setup already performed and cannot re-run setup in silent mode. Use "ambari-server setup" command without -s option to change Ambari setup.
[root@phdns01 ~]#
Created 11-24-2015 07:19 PM
Created 11-24-2015 07:24 PM
This is a result, not the reason why. The question is: What is setup using to determine this.
Created 11-24-2015 07:31 PM
I see.. @Paul Codding answered it
Created 11-24-2015 07:27 PM
@kkane - this is the Ambari JIRA that introduced the change: https://issues.apache.org/jira/browse/AMBARI-10270
A method was introduced that checks if the JDK name (jdk.name) and JDBC database (server.jdbc.database) properties are set to determine if setup has already been run:
+def check_setup_already_done(): + properties = get_ambari_properties() + if properties == -1: + print_error_msg("Error getting ambari properties") + return -1 + + return properties.get_property(JDK_NAME_PROPERTY) and properties.get_property(JDBC_DATABASE_PROPERTY) +
Created 11-24-2015 07:42 PM
Thanks Paul. These are read out of the /etc/ambari-server/conf/ambari.properties?
If so, I'll have to rearrange my Chef recipe.
Created 11-24-2015 07:43 PM
Correct Kris