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/30 00:39:25 UTC
svn commit: r1487667 - in /incubator/ambari/trunk: ./
ambari-agent/src/main/puppet/modules/hdp-kerberos/manifests/
ambari-agent/src/main/puppet/modules/hdp-kerberos/manifests/bigtop/
ambari-agent/src/main/puppet/modules/hdp/manifests/ ambari-agent/src/...
Author: smohanty
Date: Wed May 29 22:39:24 2013
New Revision: 1487667
URL: http://svn.apache.org/r1487667
Log:
AMBARI-2198. Avoid using $::fqdn in puppet which uses the fqdn value from puppet/facter, instead pass in the hostname from python socket.getfqdn().. (smohanty)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-kerberos/manifests/bigtop/init.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-kerberos/manifests/params.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/download_keytabs.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/manifestGenerator.py
Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1487667&r1=1487666&r2=1487667&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed May 29 22:39:24 2013
@@ -904,6 +904,10 @@ Trunk (unreleased changes):
BUG FIXES
+ AMBARI-2198. Avoid using $::fqdn in puppet which uses the fqdn value from
+ puppet/facter, instead pass in the hostname from
+ python socket.getfqdn(). (smohanty)
+
AMBARI-2223. Using an external MySQL / Oracle database for Oozie does not
work. (swagle)
Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-kerberos/manifests/bigtop/init.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-kerberos/manifests/bigtop/init.pp?rev=1487667&r1=1487666&r2=1487667&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-kerberos/manifests/bigtop/init.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-kerberos/manifests/bigtop/init.pp Wed May 29 22:39:24 2013
@@ -161,7 +161,7 @@ class kerberos {
realize(File[$kerberos::site::keytab_export_dir])
- $principal = "$title/$::fqdn"
+ $principal = "$title/$hdp::params::hostname"
$keytab = "$kerberos::site::keytab_export_dir/$title.keytab"
exec { "addprinc.$title":
Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-kerberos/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-kerberos/manifests/params.pp?rev=1487667&r1=1487666&r2=1487667&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-kerberos/manifests/params.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-kerberos/manifests/params.pp Wed May 29 22:39:24 2013
@@ -24,7 +24,7 @@ class hdp-kerberos::params(
{
$domain = 'hadoop.com'
$realm = inline_template('<%= @domain.upcase %>')
- $kdc_server = $::fqdn
+ $kdc_server = $hdp::params::hostname
$kdc_port = 88
$keytab_export_base_dir = '/etc/security/'
$keytab_export_dir = "${keytab_export_base_dir}/keytabs"
Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/download_keytabs.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/download_keytabs.pp?rev=1487667&r1=1487666&r2=1487667&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/download_keytabs.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/download_keytabs.pp Wed May 29 22:39:24 2013
@@ -27,7 +27,7 @@ define hdp::download_keytab(
$hostnameInPrincipals = 'yes'
)
{
- $hostname = $::fqdn
+ $hostname = $hdp::params::hostname
if ($hostnameInPrincipals == 'yes') {
$keytabsrc = "puppet://${masterhost}/modules/keytabs/${hostname}.${keytabfile}"
} else {
Modified: incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp?rev=1487667&r1=1487666&r2=1487667&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp Wed May 29 22:39:24 2013
@@ -696,9 +696,9 @@ class hdp::params()
$component_exists = {}
$service_exists = {}
- $is_namenode_master = $::fqdn in $namenode_host
- $is_jtnode_master = $::fqdn in $jtnode_host
- $is_rmnode_master = $::fqdn in $rm_host
- $is_hsnode_master = $::fqdn in $hs_host
- $is_hbase_master = $::fqdn in $hbase_master_hosts
+ $is_namenode_master = $hdp::params::hostname in $namenode_host
+ $is_jtnode_master = $hdp::params::hostname in $jtnode_host
+ $is_rmnode_master = $hdp::params::hostname in $rm_host
+ $is_hsnode_master = $hdp::params::hostname in $hs_host
+ $is_hbase_master = $hdp::params::hostname in $hbase_master_hosts
}
Modified: incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/manifestGenerator.py
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/manifestGenerator.py?rev=1487667&r1=1487666&r2=1487667&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/manifestGenerator.py (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/manifestGenerator.py Wed May 29 22:39:24 2013
@@ -82,7 +82,10 @@ def generateManifest(parsedJson, fileNam
#writing imports from external static file
writeImports(outputFile=manifest, modulesdir=modulesdir, importsList=AmbariConfig.imports)
-
+
+ #writing hostname
+ writeHostnames(manifest)
+
#writing nodes
writeNodes(manifest, clusterHostInfo)
@@ -114,6 +117,12 @@ def generateManifest(parsedJson, fileNam
manifest.close()
+def writeHostnames(outputFile):
+ fqdn = hostname.hostname()
+ public_fqdn = hostname.public_hostname()
+ outputFile.write('$myhostname' + " = '" + fqdn + "'" + os.linesep)
+ outputFile.write('$public_hostname' + " = '" + public_fqdn + "'" + os.linesep)
+
#write nodes
def writeNodes(outputFile, clusterHostInfo):
if clusterHostInfo.has_key('zookeeper_hosts'):
@@ -167,16 +176,12 @@ def writeHostAttributes(outputFile, host
#write flat configurations
def writeFlatConfigurations(outputFile, flatConfigs):
flatDict = {}
- fqdn = hostname.hostname()
- public_fqdn = hostname.public_hostname()
logger.debug("Generating global configurations =>\n" + pprint.pformat(flatConfigs))
for flatConfigName in flatConfigs.iterkeys():
for flatConfig in flatConfigs[flatConfigName].iterkeys():
flatDict[flatConfig] = flatConfigs[flatConfigName][flatConfig]
for gconfigKey in flatDict.iterkeys():
outputFile.write('$' + gconfigKey + " = '" + flatDict[gconfigKey] + "'" + os.linesep)
- outputFile.write('$myhostname' + " = '" + fqdn + "'" + os.linesep)
- outputFile.write('$public_hostname' + " = '" + public_fqdn + "'" + os.linesep)
#write xml configurations
def writeNonGlobalConfigurations(outputFile, xmlConfigs):