ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject ambari git commit: AMBARI-21287. Cannot install Datanode/AppTimeLine server from ambari 3.0. Fix root mode sudo issue (dlysnichenko)
Date Tue, 27 Jun 2017 12:58:06 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk ebd79e989 -> c1eeafbfe


AMBARI-21287. Cannot install Datanode/AppTimeLine server from ambari 3.0. Fix root mode sudo
issue (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: c1eeafbfebd089496153d5f3e3665e6a3302bd4a
Parents: ebd79e9
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Tue Jun 27 15:56:52 2017 +0300
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Tue Jun 27 15:57:41 2017 +0300

----------------------------------------------------------------------
 .../libraries/functions/packages_analyzer.py         | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c1eeafbf/ambari-common/src/main/python/resource_management/libraries/functions/packages_analyzer.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/packages_analyzer.py
b/ambari-common/src/main/python/resource_management/libraries/functions/packages_analyzer.py
index f4db3d2..5d67654 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/packages_analyzer.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/packages_analyzer.py
@@ -26,6 +26,7 @@ from threading import Thread
 import threading
 from ambari_commons import OSCheck, OSConst
 from ambari_commons import shell
+from ambari_commons.constants import AMBARI_SUDO_BINARY
 from resource_management.core.logger import Logger
 from resource_management.core import shell as rmf_shell
 from resource_management.core.exceptions import Fail
@@ -93,11 +94,11 @@ def allInstalledPackages(allInstalledPackages):
   """
   if OSCheck.is_suse_family():
     return _lookUpZypperPackages(
-      ["sudo", "zypper", "--no-gpg-checks", "search", "--installed-only", "--details"],
+      [AMBARI_SUDO_BINARY, "zypper", "--no-gpg-checks", "search", "--installed-only", "--details"],
       allInstalledPackages)
   elif OSCheck.is_redhat_family():
     return _lookUpYumPackages(
-      ["sudo", "yum", "list", "installed"],
+      [AMBARI_SUDO_BINARY, "yum", "list", "installed"],
       'Installed Packages',
       allInstalledPackages)
   elif OSCheck.is_ubuntu_family():
@@ -133,14 +134,14 @@ def get_available_packages_in_repos(repositories):
       available_packages_in_repos.append(package[0])
   elif OSCheck.is_suse_family():
     for repo in repo_ids:
-      _lookUpZypperPackages(["sudo", "zypper", "--no-gpg-checks", "search", "--details",
"--repo", repo],
+      _lookUpZypperPackages([AMBARI_SUDO_BINARY, "zypper", "--no-gpg-checks", "search", "--details",
"--repo", repo],
                             available_packages)
     available_packages_in_repos += [package[0] for package in available_packages]
   elif OSCheck.is_redhat_family():
     for repo in repo_ids:
-      _lookUpYumPackages(["sudo", "yum", "list", "available", "--disablerepo=*", "--enablerepo="
+ repo],
+      _lookUpYumPackages([AMBARI_SUDO_BINARY, "yum", "list", "available", "--disablerepo=*",
"--enablerepo=" + repo],
                          'Available Packages', available_packages)
-      _lookUpYumPackages(["sudo", "yum", "list", "installed", "--disablerepo=*", "--enablerepo="
+ repo],
+      _lookUpYumPackages([AMBARI_SUDO_BINARY, "yum", "list", "installed", "--disablerepo=*",
"--enablerepo=" + repo],
                          'Installed Packages', installed_packages)
     available_packages_in_repos += [package[0] for package in available_packages + installed_packages]
   return available_packages_in_repos
@@ -149,11 +150,11 @@ def get_available_packages_in_repos(repositories):
 def allAvailablePackages(allAvailablePackages):
   if OSCheck.is_suse_family():
     return _lookUpZypperPackages(
-      ["sudo", "zypper", "--no-gpg-checks", "search", "--uninstalled-only", "--details"],
+      [AMBARI_SUDO_BINARY, "zypper", "--no-gpg-checks", "search", "--uninstalled-only", "--details"],
       allAvailablePackages)
   elif OSCheck.is_redhat_family():
     return _lookUpYumPackages(
-      ["sudo", "yum", "list", "available"],
+      [AMBARI_SUDO_BINARY, "yum", "list", "available"],
       'Available Packages',
       allAvailablePackages)
   elif OSCheck.is_ubuntu_family():


Mime
View raw message