You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2014/04/05 02:40:19 UTC
[1/2] git commit: AMBARI-5362. Automatic bootstrap failed on CentOS
6.5 (No module named common_functions). (Andrew Onischuk via swagle)
Repository: ambari
Updated Branches:
refs/heads/trunk 5bc56f364 -> c1ec67356
AMBARI-5362. Automatic bootstrap failed on CentOS 6.5 (No module named common_functions). (Andrew Onischuk via swagle)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f2078a05
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f2078a05
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f2078a05
Branch: refs/heads/trunk
Commit: f2078a0571ccad8bed29f3886e5aa57457c3b755
Parents: 5bc56f3
Author: Siddharth Wagle <sw...@hortonworks.com>
Authored: Fri Apr 4 17:23:31 2014 -0700
Committer: Siddharth Wagle <sw...@hortonworks.com>
Committed: Fri Apr 4 17:23:37 2014 -0700
----------------------------------------------------------------------
ambari-server/src/main/python/bootstrap.py | 24 +++++++++++++++++++--
ambari-server/src/test/python/TestBootstrap.py | 11 +++++-----
2 files changed, 28 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/f2078a05/ambari-server/src/main/python/bootstrap.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/bootstrap.py b/ambari-server/src/main/python/bootstrap.py
index a25a0fe..908451e 100755
--- a/ambari-server/src/main/python/bootstrap.py
+++ b/ambari-server/src/main/python/bootstrap.py
@@ -37,7 +37,7 @@ MAX_PARALLEL_BOOTSTRAPS = 20
# How many seconds to wait between polling parallel bootstraps
POLL_INTERVAL_SEC = 1
DEBUG=False
-PYTHON_ENV="env PYTHONPATH=$PYTHONPATH:/usr/lib/python2.6/site-packages "
+PYTHON_ENV="env PYTHONPATH=$PYTHONPATH:/tmp "
class HostLog:
@@ -75,6 +75,7 @@ class SCP:
def run(self):
scpcommand = ["scp",
+ "-r",
"-o", "ConnectTimeout=60",
"-o", "BatchMode=yes",
"-o", "StrictHostKeyChecking=no",
@@ -140,6 +141,7 @@ class Bootstrap(threading.Thread):
AMBARI_REPO_FILENAME = "ambari.repo"
SETUP_SCRIPT_FILENAME = "setupAgent.py"
PASSWORD_FILENAME = "host_pass"
+ COMMON_FUNCTIONS="/usr/lib/python2.6/site-packages/common_functions"
def __init__(self, host, shared_state):
threading.Thread.__init__(self)
@@ -201,6 +203,9 @@ class Bootstrap(threading.Thread):
def getOsCheckScriptRemoteLocation(self):
return self.getRemoteName(self.OS_CHECK_SCRIPT_FILENAME)
+
+ def getCommonFunctionsRemoteLocation(self):
+ return self.TEMP_FOLDER;
def getUtime(self):
return int(time.time())
@@ -225,6 +230,19 @@ class Bootstrap(threading.Thread):
result = scp.run()
self.host_log.write("\n")
return result
+
+ def copyCommonFunctions(self):
+ # Copying the os check script file
+ fileToCopy = self.COMMON_FUNCTIONS
+ target = self.getCommonFunctionsRemoteLocation()
+ params = self.shared_state
+ self.host_log.write("==========================\n")
+ self.host_log.write("Copying common functions script...")
+ scp = SCP(params.user, params.sshkey_file, self.host, fileToCopy,
+ target, params.bootdir, self.host_log)
+ result = scp.run()
+ self.host_log.write("\n")
+ return result
def getMoveRepoFileWithPasswordCommand(self, targetDir):
@@ -327,6 +345,7 @@ class Bootstrap(threading.Thread):
params = self.shared_state
self.host_log.write("==========================\n")
self.host_log.write("Running OS type check...")
+
command = "chmod a+x %s && %s %s" % \
(self.getOsCheckScriptRemoteLocation(),
PYTHON_ENV + self.getOsCheckScriptRemoteLocation(), params.cluster_os_type)
@@ -436,7 +455,8 @@ class Bootstrap(threading.Thread):
""" Copy files and run commands on remote host """
self.status["start_time"] = time.time()
# Population of action queue
- action_queue = [self.copyOsCheckScript,
+ action_queue = [self.copyCommonFunctions,
+ self.copyOsCheckScript,
self.runOsCheckScript,
self.checkSudoPackage
]
http://git-wip-us.apache.org/repos/asf/ambari/blob/f2078a05/ambari-server/src/test/python/TestBootstrap.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/TestBootstrap.py b/ambari-server/src/test/python/TestBootstrap.py
index f8f05a6..88ff3c2 100644
--- a/ambari-server/src/test/python/TestBootstrap.py
+++ b/ambari-server/src/test/python/TestBootstrap.py
@@ -238,7 +238,7 @@ class TestBootstrap(TestCase):
self.assertTrue(log_sample in log['text'])
self.assertTrue(error_sample in log['text'])
command_str = str(popenMock.call_args[0][0])
- self.assertEquals(command_str, "['scp', '-o', 'ConnectTimeout=60', '-o', "
+ self.assertEquals(command_str, "['scp', '-r', '-o', 'ConnectTimeout=60', '-o', "
"'BatchMode=yes', '-o', 'StrictHostKeyChecking=no', '-i', 'sshkey_file',"
" 'src/file', 'root@dummy-host:dst/file']")
self.assertEqual(retcode["exitstatus"], 0)
@@ -458,8 +458,9 @@ class TestBootstrap(TestCase):
res = bootstrap_obj.runOsCheckScript()
self.assertEquals(res, expected)
command = str(init_mock.call_args[0][3])
- self.assertEqual(command, "chmod a+x OsCheckScriptRemoteLocation &&"
- " env PYTHONPATH=$PYTHONPATH:/usr/lib/python2.6/site-packages OsCheckScriptRemoteLocation centos6")
+ self.assertEqual(command,
+ "chmod a+x OsCheckScriptRemoteLocation && "
+ "env PYTHONPATH=$PYTHONPATH:/tmp OsCheckScriptRemoteLocation centos6")
@patch.object(SSH, "__init__")
@@ -657,7 +658,7 @@ class TestBootstrap(TestCase):
hasPassword_mock.return_value = False
try_to_execute_mock.return_value = {"exitstatus": 0, "log":"log0", "errormsg":"errormsg0"}
bootstrap_obj.run()
- self.assertEqual(try_to_execute_mock.call_count, 5) # <- Adjust if changed
+ self.assertEqual(try_to_execute_mock.call_count, 6) # <- Adjust if changed
self.assertTrue(createDoneFile_mock.called)
self.assertEqual(bootstrap_obj.getStatus()["return_code"], 0)
@@ -668,7 +669,7 @@ class TestBootstrap(TestCase):
hasPassword_mock.return_value = True
try_to_execute_mock.return_value = {"exitstatus": 0, "log":"log0", "errormsg":"errormsg0"}
bootstrap_obj.run()
- self.assertEqual(try_to_execute_mock.call_count, 8) # <- Adjust if changed
+ self.assertEqual(try_to_execute_mock.call_count, 9) # <- Adjust if changed
self.assertTrue(createDoneFile_mock.called)
self.assertEqual(bootstrap_obj.getStatus()["return_code"], 0)
[2/2] git commit: AMBARI-5363. Typo error in container-executor.cfg.
(swagle)
Posted by sw...@apache.org.
AMBARI-5363. Typo error in container-executor.cfg. (swagle)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c1ec6735
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c1ec6735
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c1ec6735
Branch: refs/heads/trunk
Commit: c1ec6735640dce734736d1431a2c7b6d054d1408
Parents: f2078a0
Author: Siddharth Wagle <sw...@hortonworks.com>
Authored: Fri Apr 4 17:31:44 2014 -0700
Committer: Siddharth Wagle <sw...@hortonworks.com>
Committed: Fri Apr 4 17:31:44 2014 -0700
----------------------------------------------------------------------
.../puppet/modules/hdp-yarn/templates/container-executor.cfg.erb | 2 +-
.../2.0.5/services/MAPREDUCE2/configuration/container-executor.cfg | 2 +-
.../HDP/2.0.5/services/YARN/configuration/container-executor.cfg | 2 +-
.../services/MAPREDUCE2/configuration/container-executor.cfg | 2 +-
.../services/YARN/configuration/container-executor.cfg | 2 +-
.../services/YARN/package/templates/container-executor.cfg.j2 | 2 +-
.../2.0.1/services/MAPREDUCE2/configuration/container-executor.cfg | 2 +-
.../HDP/2.0.1/services/YARN/configuration/container-executor.cfg | 2 +-
.../2.0.5/services/MAPREDUCE2/configuration/container-executor.cfg | 2 +-
.../HDP/2.0.5/services/YARN/configuration/container-executor.cfg | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/c1ec6735/ambari-agent/src/main/puppet/modules/hdp-yarn/templates/container-executor.cfg.erb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-yarn/templates/container-executor.cfg.erb b/ambari-agent/src/main/puppet/modules/hdp-yarn/templates/container-executor.cfg.erb
index b14d4eb..c6a2479 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-yarn/templates/container-executor.cfg.erb
+++ b/ambari-agent/src/main/puppet/modules/hdp-yarn/templates/container-executor.cfg.erb
@@ -18,5 +18,5 @@
yarn.nodemanager.local-dirs=<%=scope.function_hdp_default(["yarn-site/yarn.nodemanager.local-dirs","/hadoop/yarn"])%>
yarn.nodemanager.log-dirs=<%=scope.function_hdp_default(["yarn-site/yarn.nodemanager.log-dirs","/var/log/hadoop/yarn"])%>
yarn.nodemanager.linux-container-executor.group=<%=scope.function_hdp_default(["yarn-site/yarn.nodemanager.linux-container-executor.group","hadoop"])%>
-banned.users = hfds,yarn,mapred,bin
+banned.users = hdfs,yarn,mapred,bin
min.user.id=1000
http://git-wip-us.apache.org/repos/asf/ambari/blob/c1ec6735/ambari-server/src/main/resources/stacks/HDP/2.0.5/services/MAPREDUCE2/configuration/container-executor.cfg
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.5/services/MAPREDUCE2/configuration/container-executor.cfg b/ambari-server/src/main/resources/stacks/HDP/2.0.5/services/MAPREDUCE2/configuration/container-executor.cfg
index 502ddaa..d07b3db 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.5/services/MAPREDUCE2/configuration/container-executor.cfg
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.5/services/MAPREDUCE2/configuration/container-executor.cfg
@@ -17,4 +17,4 @@
yarn.nodemanager.local-dirs=TODO-YARN-LOCAL-DIR
yarn.nodemanager.linux-container-executor.group=hadoop
yarn.nodemanager.log-dirs=TODO-YARN-LOG-DIR
-banned.users=hfds,bin,0
+banned.users=hdfs,bin,0
http://git-wip-us.apache.org/repos/asf/ambari/blob/c1ec6735/ambari-server/src/main/resources/stacks/HDP/2.0.5/services/YARN/configuration/container-executor.cfg
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.5/services/YARN/configuration/container-executor.cfg b/ambari-server/src/main/resources/stacks/HDP/2.0.5/services/YARN/configuration/container-executor.cfg
index 502ddaa..d07b3db 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.5/services/YARN/configuration/container-executor.cfg
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.5/services/YARN/configuration/container-executor.cfg
@@ -17,4 +17,4 @@
yarn.nodemanager.local-dirs=TODO-YARN-LOCAL-DIR
yarn.nodemanager.linux-container-executor.group=hadoop
yarn.nodemanager.log-dirs=TODO-YARN-LOG-DIR
-banned.users=hfds,bin,0
+banned.users=hdfs,bin,0
http://git-wip-us.apache.org/repos/asf/ambari/blob/c1ec6735/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/MAPREDUCE2/configuration/container-executor.cfg
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/MAPREDUCE2/configuration/container-executor.cfg b/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/MAPREDUCE2/configuration/container-executor.cfg
index 502ddaa..d07b3db 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/MAPREDUCE2/configuration/container-executor.cfg
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/MAPREDUCE2/configuration/container-executor.cfg
@@ -17,4 +17,4 @@
yarn.nodemanager.local-dirs=TODO-YARN-LOCAL-DIR
yarn.nodemanager.linux-container-executor.group=hadoop
yarn.nodemanager.log-dirs=TODO-YARN-LOG-DIR
-banned.users=hfds,bin,0
+banned.users=hdfs,bin,0
http://git-wip-us.apache.org/repos/asf/ambari/blob/c1ec6735/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/YARN/configuration/container-executor.cfg
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/YARN/configuration/container-executor.cfg b/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/YARN/configuration/container-executor.cfg
index 502ddaa..d07b3db 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/YARN/configuration/container-executor.cfg
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/YARN/configuration/container-executor.cfg
@@ -17,4 +17,4 @@
yarn.nodemanager.local-dirs=TODO-YARN-LOCAL-DIR
yarn.nodemanager.linux-container-executor.group=hadoop
yarn.nodemanager.log-dirs=TODO-YARN-LOG-DIR
-banned.users=hfds,bin,0
+banned.users=hdfs,bin,0
http://git-wip-us.apache.org/repos/asf/ambari/blob/c1ec6735/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/templates/container-executor.cfg.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/templates/container-executor.cfg.j2 b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/templates/container-executor.cfg.j2
index 2ddbead..06143fa 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/templates/container-executor.cfg.j2
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/templates/container-executor.cfg.j2
@@ -36,5 +36,5 @@
yarn.nodemanager.local-dirs={{nm_local_dirs}}
yarn.nodemanager.log-dirs={{nm_log_dirs}}
yarn.nodemanager.linux-container-executor.group={{yarn_executor_container_group}}
-banned.users = hfds,yarn,mapred,bin
+banned.users = hdfs,yarn,mapred,bin
min.user.id=1000
http://git-wip-us.apache.org/repos/asf/ambari/blob/c1ec6735/ambari-server/src/test/resources/stacks/HDP/2.0.1/services/MAPREDUCE2/configuration/container-executor.cfg
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.1/services/MAPREDUCE2/configuration/container-executor.cfg b/ambari-server/src/test/resources/stacks/HDP/2.0.1/services/MAPREDUCE2/configuration/container-executor.cfg
index 502ddaa..d07b3db 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.1/services/MAPREDUCE2/configuration/container-executor.cfg
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.1/services/MAPREDUCE2/configuration/container-executor.cfg
@@ -17,4 +17,4 @@
yarn.nodemanager.local-dirs=TODO-YARN-LOCAL-DIR
yarn.nodemanager.linux-container-executor.group=hadoop
yarn.nodemanager.log-dirs=TODO-YARN-LOG-DIR
-banned.users=hfds,bin,0
+banned.users=hdfs,bin,0
http://git-wip-us.apache.org/repos/asf/ambari/blob/c1ec6735/ambari-server/src/test/resources/stacks/HDP/2.0.1/services/YARN/configuration/container-executor.cfg
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.1/services/YARN/configuration/container-executor.cfg b/ambari-server/src/test/resources/stacks/HDP/2.0.1/services/YARN/configuration/container-executor.cfg
index 502ddaa..d07b3db 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.1/services/YARN/configuration/container-executor.cfg
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.1/services/YARN/configuration/container-executor.cfg
@@ -17,4 +17,4 @@
yarn.nodemanager.local-dirs=TODO-YARN-LOCAL-DIR
yarn.nodemanager.linux-container-executor.group=hadoop
yarn.nodemanager.log-dirs=TODO-YARN-LOG-DIR
-banned.users=hfds,bin,0
+banned.users=hdfs,bin,0
http://git-wip-us.apache.org/repos/asf/ambari/blob/c1ec6735/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/MAPREDUCE2/configuration/container-executor.cfg
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/MAPREDUCE2/configuration/container-executor.cfg b/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/MAPREDUCE2/configuration/container-executor.cfg
index 502ddaa..d07b3db 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/MAPREDUCE2/configuration/container-executor.cfg
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/MAPREDUCE2/configuration/container-executor.cfg
@@ -17,4 +17,4 @@
yarn.nodemanager.local-dirs=TODO-YARN-LOCAL-DIR
yarn.nodemanager.linux-container-executor.group=hadoop
yarn.nodemanager.log-dirs=TODO-YARN-LOG-DIR
-banned.users=hfds,bin,0
+banned.users=hdfs,bin,0
http://git-wip-us.apache.org/repos/asf/ambari/blob/c1ec6735/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/YARN/configuration/container-executor.cfg
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/YARN/configuration/container-executor.cfg b/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/YARN/configuration/container-executor.cfg
index 502ddaa..d07b3db 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/YARN/configuration/container-executor.cfg
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/YARN/configuration/container-executor.cfg
@@ -17,4 +17,4 @@
yarn.nodemanager.local-dirs=TODO-YARN-LOCAL-DIR
yarn.nodemanager.linux-container-executor.group=hadoop
yarn.nodemanager.log-dirs=TODO-YARN-LOG-DIR
-banned.users=hfds,bin,0
+banned.users=hdfs,bin,0