Repository: ambari Updated Branches: refs/heads/trunk cf264c6c8 -> af647f81c
AMBARI-18577. Installing ambari agent on Suse fails when zypper has questions (Zsombor Gegesy via adoroszlai) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/af647f81 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/af647f81 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/af647f81 Branch: refs/heads/trunk Commit: af647f81cb4eca5022c81fd31bdd14e7ba75185c Parents: cf264c6 Author: Zsombor Gegesy <gzsom...@gmail.com> Authored: Tue Sep 5 12:18:36 2017 +0200 Committer: Attila Doroszlai <adorosz...@hortonworks.com> Committed: Tue Sep 5 12:18:36 2017 +0200 ---------------------------------------------------------------------- ambari-server/src/main/python/setupAgent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/af647f81/ambari-server/src/main/python/setupAgent.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/python/setupAgent.py b/ambari-server/src/main/python/setupAgent.py index 9a1cae9..efc3d7c 100755 --- a/ambari-server/src/main/python/setupAgent.py +++ b/ambari-server/src/main/python/setupAgent.py @@ -238,7 +238,7 @@ def findNearestAgentPackageVersion(projectVersion): if projectVersion == "": projectVersion = " " if OSCheck.is_suse_family(): - Command = ["bash", "-c", "zypper --no-gpg-checks -q search -s --match-exact ambari-agent | grep '" + projectVersion + + Command = ["bash", "-c", "zypper --no-gpg-checks --non-interactive -q search -s --match-exact ambari-agent | grep '" + projectVersion + "' | cut -d '|' -f 4 | head -n1 | sed -e 's/-\w[^:]*//1' "] elif OSCheck.is_windows_family(): listPackagesCommand = ["cmd", "/c", "choco list ambari-agent --pre --all | findstr " + projectVersion + " > agentPackages.list"] @@ -271,7 +271,7 @@ def isAgentPackageAlreadyInstalled(projectVersion): def getAvailableAgentPackageVersions(): if OSCheck.is_suse_family(): Command = ["bash", "-c", - "zypper --no-gpg-checks -q search -s --match-exact ambari-agent | grep ambari-agent | sed -re 's/\s+/ /g' | cut -d '|' -f 4 | tr '\\n' ', ' | sed -s 's/[-|~][A-Za-z0-9]*//g'"] + "zypper --no-gpg-checks --non-interactive -q search -s --match-exact ambari-agent | grep ambari-agent | sed -re 's/\s+/ /g' | cut -d '|' -f 4 | tr '\\n' ', ' | sed -s 's/[-|~][A-Za-z0-9]*//g'"] elif OSCheck.is_windows_family(): Command = ["cmd", "/c", "choco list ambari-agent --pre --all | findstr ambari-agent"] elif OSCheck.is_ubuntu_family():