You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2017/11/30 19:27:43 UTC

ambari git commit: AMBARI-22555. Update server setup to deny GPL as default. Fixed for silent setup. (swagle)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 2b49f4582 -> b89a94b22


AMBARI-22555. Update server setup to deny GPL as default. Fixed for silent setup. (swagle)


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

Branch: refs/heads/branch-2.6
Commit: b89a94b221b27148f36bc0b6a31c8610eed97996
Parents: 2b49f45
Author: Siddharth Wagle <sw...@hortonworks.com>
Authored: Thu Nov 30 10:43:00 2017 -0800
Committer: Siddharth Wagle <sw...@hortonworks.com>
Committed: Thu Nov 30 11:27:30 2017 -0800

----------------------------------------------------------------------
 .../src/main/python/ambari_server/serverConfiguration.py        | 4 ++--
 ambari-server/src/main/python/ambari_server/serverSetup.py      | 5 ++---
 ambari-server/src/main/python/ambari_server/serverUpgrade.py    | 2 +-
 3 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b89a94b2/ambari-server/src/main/python/ambari_server/serverConfiguration.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/serverConfiguration.py b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
index 2ab2484..5658f67 100644
--- a/ambari-server/src/main/python/ambari_server/serverConfiguration.py
+++ b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
@@ -1144,7 +1144,7 @@ def update_ambari_env():
   return 0
 
 # default should be false / not accepted
-def write_gpl_license_accepted(text = GPL_LICENSE_PROMPT_TEXT):
+def write_gpl_license_accepted(default_prompt_value = False, text = GPL_LICENSE_PROMPT_TEXT):
   properties = get_ambari_properties()
   if properties == -1:
     err = "Error getting ambari properties"
@@ -1154,7 +1154,7 @@ def write_gpl_license_accepted(text = GPL_LICENSE_PROMPT_TEXT):
   if GPL_LICENSE_ACCEPTED_PROPERTY in properties.keys() and properties.get_property(GPL_LICENSE_ACCEPTED_PROPERTY).lower() == "true":
     return True
 
-  result = get_YN_input(text, False)
+  result = get_YN_input(text, default_prompt_value)
 
   properties.process_pair(GPL_LICENSE_ACCEPTED_PROPERTY, str(result).lower())
   update_properties(properties)

http://git-wip-us.apache.org/repos/asf/ambari/blob/b89a94b2/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 50992d1..909497f 100644
--- a/ambari-server/src/main/python/ambari_server/serverSetup.py
+++ b/ambari-server/src/main/python/ambari_server/serverSetup.py
@@ -1128,9 +1128,8 @@ def setup(options):
     err = 'Downloading or installing JDK failed: {0}. Exiting.'.format(e)
     raise FatalException(e.code, err)
 
-  if not get_silent() or options.accept_gpl:
-    print 'Checking GPL software agreement...'
-    write_gpl_license_accepted()
+  print 'Checking GPL software agreement...'
+  write_gpl_license_accepted(default_prompt_value=options.accept_gpl)
 
   print 'Completing setup...'
   retcode = configure_os_settings()

http://git-wip-us.apache.org/repos/asf/ambari/blob/b89a94b2/ambari-server/src/main/python/ambari_server/serverUpgrade.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/serverUpgrade.py b/ambari-server/src/main/python/ambari_server/serverUpgrade.py
index 06443d3..d5c7c7f 100644
--- a/ambari-server/src/main/python/ambari_server/serverUpgrade.py
+++ b/ambari-server/src/main/python/ambari_server/serverUpgrade.py
@@ -179,7 +179,7 @@ def check_gpl_license_approved(upgrade_response):
   if 'lzo_enabled' not in upgrade_response or upgrade_response['lzo_enabled'].lower() != "true":
     return
 
-  while not write_gpl_license_accepted(LZO_ENABLED_GPL_TEXT) and not get_YN_input(INSTALLED_LZO_WITHOUT_GPL_TEXT, False):
+  while not write_gpl_license_accepted(text = LZO_ENABLED_GPL_TEXT) and not get_YN_input(INSTALLED_LZO_WITHOUT_GPL_TEXT, False):
     pass
 
 #