ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [13/17] ambari git commit: AMBARI-12701. Addendum for patch. Stop-and-Start Upgrade: Handle Core Services (alejandro)
Date Mon, 26 Oct 2015 14:19:22 GMT
AMBARI-12701. Addendum for patch. Stop-and-Start Upgrade: Handle Core Services (alejandro)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 16a457543208fd54329de9f4f42f445965f787a0
Parents: 0a1bb11
Author: Alejandro Fernandez <afernandez@hortonworks.com>
Authored: Sat Oct 24 23:04:23 2015 -0700
Committer: Alejandro Fernandez <afernandez@hortonworks.com>
Committed: Sat Oct 24 23:05:25 2015 -0700

----------------------------------------------------------------------
 .../resource_management/libraries/script/script.py    | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/16a45754/ambari-common/src/main/python/resource_management/libraries/script/script.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py
b/ambari-common/src/main/python/resource_management/libraries/script/script.py
index e3bae5d..79bc535 100644
--- a/ambari-common/src/main/python/resource_management/libraries/script/script.py
+++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py
@@ -487,10 +487,13 @@ class Script(object):
     else:
       # To remain backward compatible with older stacks, only pass upgrade_type if available.
       # TODO, remove checking the argspec for "upgrade_type" once all of the services support
that optional param.
-      if is_stack_upgrade and "upgrade_type" in inspect.getargspec(self.stop).args:
+      if "upgrade_type" in inspect.getargspec(self.stop).args:
         self.stop(env, upgrade_type=upgrade_type)
       else:
-        self.stop(env, rolling_restart=(restart_type == "rolling_upgrade"))
+        if is_stack_upgrade:
+          self.stop(env, rolling_restart=(restart_type == "rolling_upgrade"))
+        else:
+          self.stop(env)
 
       if is_stack_upgrade:
         # Remain backward compatible with the rest of the services that haven't switched
to using
@@ -502,10 +505,13 @@ class Script(object):
 
       # To remain backward compatible with older stacks, only pass upgrade_type if available.
       # TODO, remove checking the argspec for "upgrade_type" once all of the services support
that optional param.
-      if is_stack_upgrade and "upgrade_type" in inspect.getargspec(self.start).args:
+      if "upgrade_type" in inspect.getargspec(self.start).args:
         self.start(env, upgrade_type=upgrade_type)
       else:
-        self.start(env, rolling_restart=(restart_type == "rolling_upgrade"))
+        if is_stack_upgrade:
+          self.start(env, rolling_restart=(restart_type == "rolling_upgrade"))
+        else:
+          self.start(env)
 
       if is_stack_upgrade:
         # Remain backward compatible with the rest of the services that haven't switched
to using


Mime
View raw message