You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2014/07/22 18:43:36 UTC

git commit: AMBARI-6564. Rerunning bootstrap on Ubuntu after removing agent fails (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk 1845940c4 -> 340afc1be


AMBARI-6564. Rerunning bootstrap on Ubuntu after removing agent fails (aonishuk)


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

Branch: refs/heads/trunk
Commit: 340afc1be06ea49769fe5ac121e32da748d89abb
Parents: 1845940
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue Jul 22 19:43:29 2014 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Tue Jul 22 19:43:29 2014 +0300

----------------------------------------------------------------------
 ambari-server/src/main/python/setupAgent.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/340afc1b/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 772fc15..7de92ff 100755
--- a/ambari-server/src/main/python/setupAgent.py
+++ b/ambari-server/src/main/python/setupAgent.py
@@ -117,7 +117,7 @@ def findNearestAgentPackageVersion(projectVersion):
 
 def isAgentPackageAlreadyInstalled(projectVersion):
     if OSCheck.is_debian_family():
-      Command = ["bash", "-c", "dpkg -s ambari-agent  2>&1|grep 'Version\:'|grep " + projectVersion]
+      Command = ["bash", "-c", "dpkg-query -W -f='${Status} ${Version}\n' ambari-agent | grep -v deinstall | grep " + projectVersion]
     else:
       Command = ["bash", "-c", "rpm -qa | grep ambari-agent-"+projectVersion]
     ret = execOsCommand(Command)