Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 e2c92d5f6 -> a71626f67


Revert "AMBARI-20159. Cluster deploy failed as install service failed with 
"Execution of zypper clean --all returned 7. System management is locked by the 
application with pid ..."(vbrodetskyi)"

This reverts commit 1c44053d290346eafd24eae1ae28507252d2d327.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c4ecdeac
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c4ecdeac
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c4ecdeac

Branch: refs/heads/branch-2.5
Commit: c4ecdeac80eac2002362cd92059bacc5dc4347c9
Parents: e2c92d5
Author: Swapan Shridhar <[email protected]>
Authored: Fri Feb 24 01:10:26 2017 -0800
Committer: Swapan Shridhar <[email protected]>
Committed: Fri Feb 24 01:10:26 2017 -0800

----------------------------------------------------------------------
 .../ambari_agent/CustomServiceOrchestrator.py   |  2 -
 .../main/python/ambari_agent/PythonExecutor.py  | 12 +++++-
 .../libraries/functions/__init__.py             |  1 -
 .../functions/log_process_information.py        | 40 --------------------
 4 files changed, 10 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c4ecdeac/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
----------------------------------------------------------------------
diff --git 
a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py 
b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
index ee34685..fd8df01 100644
--- a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
+++ b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
@@ -29,7 +29,6 @@ from FileCache import FileCache
 from AgentException import AgentException
 from PythonExecutor import PythonExecutor
 from PythonReflectiveExecutor import PythonReflectiveExecutor
-from resource_management.libraries.functions.log_process_information import 
log_process_information
 from resource_management.core.utils import PasswordString
 import subprocess
 import Constants
@@ -123,7 +122,6 @@ class CustomServiceOrchestrator():
         logger.info("Canceling command with taskId = {tid}, " \
                     "reason - {reason} . Killing process {pid}"
                     .format(tid=str(task_id), reason=reason, pid=pid))
-        log_process_information(logger)
         shell.kill_process_with_children(pid)
       else: 
         logger.warn("Unable to find process associated with taskId = %s" % 
task_id)

http://git-wip-us.apache.org/repos/asf/ambari/blob/c4ecdeac/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py 
b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
index ea6f895..5a896ff 100644
--- a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
+++ b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
@@ -27,7 +27,6 @@ import platform
 from threading import Thread
 import time
 from BackgroundCommandExecutionHandle import BackgroundCommandExecutionHandle
-from resource_management.libraries.functions.log_process_information import 
log_process_information
 from ambari_commons.os_check import OSConst, OSCheck
 from Grep import Grep
 import sys
@@ -128,7 +127,16 @@ class PythonExecutor(object):
     Log some useful information after task failure.
     """
     logger.info("Command " + pprint.pformat(pythonCommand) + " failed with 
exitcode=" + str(result['exitcode']))
-    log_process_information(logger)
+    if OSCheck.is_windows_family():
+      cmd_list = ["WMIC path win32_process get Caption,Processid,Commandline", 
"netstat -an"]
+    else:
+      cmd_list = ["export COLUMNS=9999 ; ps faux", "netstat -tulpn"]
+
+    shell_runner = shellRunner()
+
+    for cmd in cmd_list:
+      ret = shell_runner.run(cmd)
+      logger.info("Command '{0}' returned {1}. {2}{3}".format(cmd, 
ret["exitCode"], ret["error"], ret["output"]))
 
   def prepare_process_result(self, returncode, tmpoutfile, tmperrfile, 
tmpstructedoutfile, timeout=None):
     out, error, structured_out = self.read_result_from_files(tmpoutfile, 
tmperrfile, tmpstructedoutfile)

http://git-wip-us.apache.org/repos/asf/ambari/blob/c4ecdeac/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
----------------------------------------------------------------------
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
index f144b2d..f0c2e13 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/__init__.py
@@ -45,7 +45,6 @@ from resource_management.libraries.functions.curl_krb_request 
import *
 from resource_management.libraries.functions.get_bare_principal import *
 from resource_management.libraries.functions.get_path_from_url import *
 from resource_management.libraries.functions.show_logs import *
-from resource_management.libraries.functions.log_process_information import *
 
 IS_WINDOWS = platform.system() == "Windows"
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/c4ecdeac/ambari-common/src/main/python/resource_management/libraries/functions/log_process_information.py
----------------------------------------------------------------------
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/log_process_information.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/log_process_information.py
deleted file mode 100644
index dff0474..0000000
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/log_process_information.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python
-"""
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Ambari Agent
-
-"""
-from ambari_commons.shell import shellRunner
-from ambari_commons.os_check import OSCheck
-
-__all__ = ["log_process_information"]
-
-def log_process_information(logger):
-  """
-  Check if certain configuration sent from the server has been received.
-  """
-  if OSCheck.is_windows_family():
-    cmd_list = ["WMIC path win32_process get Caption,Processid,Commandline", 
"netstat -an"]
-  else:
-    cmd_list = ["export COLUMNS=9999 ; ps faux", "netstat -tulpn", "ps auxf"]
-
-  shell_runner = shellRunner()
-
-  for cmd in cmd_list:
-    ret = shell_runner.run(cmd)
-    logger.info("Command '{0}' returned {1}. {2}{3}".format(cmd, 
ret["exitCode"], ret["error"], ret["output"]))

Reply via email to