You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vb...@apache.org on 2015/04/10 13:23:53 UTC

ambari git commit: AMBARI-10431. Do not do anything when ambari-server setup executed ONLY with -s.(vbrodetskyi)

Repository: ambari
Updated Branches:
  refs/heads/trunk f126bec03 -> ff2f00614


AMBARI-10431. Do not do anything when ambari-server setup executed ONLY with -s.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: ff2f00614ba1389d450aba8ba5d96e778fdad735
Parents: f126bec
Author: Vitaly Brodetskyi <vb...@hortonworks.com>
Authored: Thu Apr 9 02:11:59 2015 +0300
Committer: Vitaly Brodetskyi <vb...@hortonworks.com>
Committed: Thu Apr 9 02:11:59 2015 +0300

----------------------------------------------------------------------
 ambari-server/src/main/python/ambari-server.py            | 10 ++++++++++
 .../src/main/python/ambari_server/serverSetup.py          |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ff2f0061/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 0824268..70c4232 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -591,6 +591,16 @@ def mainBody():
   init_parser_options(parser)
   (options, args) = parser.parse_args()
 
+  # check if only silent key set
+  default_options = parser.get_default_values()
+  silent_options = default_options
+  silent_options.silent = True
+
+  if options == silent_options:
+    options.only_silent = True
+  else:
+    options.only_silent = False
+
   # set verbose
   set_verbose(options.verbose)
   if options.verbose:

http://git-wip-us.apache.org/repos/asf/ambari/blob/ff2f0061/ambari-server/src/main/python/ambari_server/serverSetup.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/serverSetup.py b/ambari-server/src/main/python/ambari_server/serverSetup.py
index 4f700ed..d1e9a35 100644
--- a/ambari-server/src/main/python/ambari_server/serverSetup.py
+++ b/ambari-server/src/main/python/ambari_server/serverSetup.py
@@ -946,7 +946,7 @@ def check_setup_already_done():
 # Setup the Ambari Server.
 #
 def setup(options):
-  if get_silent():
+  if options.only_silent:
     if check_setup_already_done():
       print "Nothing was done. Please, use ambari-server setup command without [-s] key, to change configuration."
       sys.exit(0)