ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject git commit: AMBARI-6214. Remove yum/zypper repo check on upgradestack (ncole)
Date Fri, 20 Jun 2014 11:44:29 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.6.1 4011a16c4 -> f23546df1


AMBARI-6214. Remove yum/zypper repo check on upgradestack (ncole)


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

Branch: refs/heads/branch-1.6.1
Commit: f23546df161e85b9b4828aadeb393062d57d5ba7
Parents: 4011a16
Author: Nate Cole <ncole@hortonworks.com>
Authored: Fri Jun 20 07:41:15 2014 -0400
Committer: Nate Cole <ncole@hortonworks.com>
Committed: Fri Jun 20 07:43:22 2014 -0400

----------------------------------------------------------------------
 ambari-server/src/main/python/ambari-server.py    | 15 ---------------
 ambari-server/src/test/python/TestAmbariServer.py |  7 -------
 2 files changed, 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f23546df/ambari-server/src/main/python/ambari-server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py
index eba7d54..e0d3b34 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -2625,20 +2625,6 @@ def upgrade_stack(args, stack_id, repo_url=None, repo_url_os=None):
     raise FatalException(4, err)
   check_database_name_property()
 
-  local_repo_check_commamd = ""
-  if OS_FAMILY == OSConst.DEBIAN_FAMILY:
-    raise FatalException(3, '"upgradestack" command not supported yet for Debian OS\'es family.')
-  elif OS_FAMILY == OSConst.REDHAT_FAMILY:
-    local_repo_check_commamd = 'yum repolist | grep "{0} "'
-  elif OS_FAMILY == OSConst.SUSE_FAMILY:
-    local_repo_check_commamd = 'zypper repos | grep "{0} "'
-
-  command = local_repo_check_commamd.format(stack_id)
-  (retcode, stdout, stderr) = run_in_shell(command)
-
-  if not retcode == 0 and repo_url is None:
-    raise FatalException(retcode, 'Repository for ' + stack_id + " is not existed")
-
   stack_name, stack_version = stack_id.split(STACK_NAME_VER_SEP)
   retcode, stdout, stderr = run_stack_upgrade(stack_name, stack_version, repo_url, repo_url_os)
 
@@ -2646,7 +2632,6 @@ def upgrade_stack(args, stack_id, repo_url=None, repo_url_os=None):
     raise FatalException(retcode, 'Error executing stack upgrade. ' + stderr)
 
 
-
 def load_stack_values(version, filename):
   import xml.etree.ElementTree as ET
   values = {}

http://git-wip-us.apache.org/repos/asf/ambari/blob/f23546df/ambari-server/src/test/python/TestAmbariServer.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/TestAmbariServer.py b/ambari-server/src/test/python/TestAmbariServer.py
index 45f9a12..0c254b9 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -2860,13 +2860,6 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
     # Testing calls if desired stack repo not existed
     run_in_shell_mock.return_value = 1, "", ""
     is_root_mock.return_value = True
-    try:
-      ambari_server.upgrade_stack(args, 'HDP-2.0')
-      self.fail("Should throw exception")
-    except FatalException as fe:
-      # Expected
-      self.assertTrue("Repository for HDP-2.0 is not existed" in fe.reason)
-      pass
 
     run_stack_upgrade_mock.reset_mock()
 


Mime
View raw message