ambari git commit: AMBARI-12979. Devdeploy:Start Services fails at enabling security (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 3e9e182d6 -> 189beebd3 AMBARI-12979. Devdeploy:Start Services fails at enabling security (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/189beebd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/189beebd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/189beebd Branch: refs/heads/branch-2.1 Commit: 189beebd34476f392c39a7e02e7df40c0f46ab6e Parents: 3e9e182 Author: Andrew OnishukAuthored: Wed Sep 2 18:52:55 2015 +0300 Committer: Andrew Onishuk Committed: Wed Sep 2 18:52:55 2015 +0300 -- .../0.5.0.2.2/package/scripts/params_linux.py | 12 .../python/stacks/2.2/KNOX/test_knox_gateway.py | 20 ++-- 2 files changed, 18 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/189beebd/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py index 5917cda..27a71a2 100644 --- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py @@ -40,6 +40,10 @@ knox_master_secret_path = '/var/lib/knox/data/security/master' knox_cert_store_path = '/var/lib/knox/data/security/keystores/gateway.jks' knox_user = default("/configurations/knox-env/knox_user", "knox") +# server configurations +knox_data_dir = '/var/lib/knox/data' +knox_logs_dir = '/var/log/knox' + # default parameters knox_bin = '/usr/bin/gateway' knox_conf_dir = '/etc/knox/conf' @@ -53,13 +57,13 @@ if Script.is_hdp_stack_greater_or_equal("2.2"): ldap_bin = '/usr/hdp/current/knox-server/bin/ldap.sh' knox_client_bin = '/usr/hdp/current/knox-server/bin/knoxcli.sh' + knox_master_secret_path = '/usr/hdp/current/knox-server/data/security/master' + knox_cert_store_path = '/usr/hdp/current/knox-server/data/security/keystores/gateway.jks' + knox_data_dir = '/usr/hdp/current/knox-server/data' + knox_group = default("/configurations/knox-env/knox_group", "knox") mode = 0644 -# server configurations -knox_data_dir = '/var/lib/knox/data' -knox_logs_dir = '/var/log/knox' - stack_version_unformatted = str(config['hostLevelParams']['stack_version']) hdp_stack_version = format_hdp_stack_version(stack_version_unformatted) http://git-wip-us.apache.org/repos/asf/ambari/blob/189beebd/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py -- diff --git a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py index 11f476e..2acd4053 100644 --- a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py +++ b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py @@ -39,7 +39,7 @@ class TestKnoxGateway(RMFTestCase): target = RMFTestCase.TARGET_COMMON_SERVICES ) -self.assertResourceCalled('Directory', '/var/lib/knox/data', +self.assertResourceCalled('Directory', '/usr/hdp/current/knox-server/data', owner = 'knox', group = 'knox', recursive = True @@ -87,7 +87,7 @@ class TestKnoxGateway(RMFTestCase): self.assertResourceCalled('Execute', ('chown', '-R', 'knox:knox', - '/var/lib/knox/data', + '/usr/hdp/current/knox-server/data', '/var/log/knox', '/var/run/knox', '/usr/hdp/current/knox-server/conf', @@ -96,12 +96,12 @@ class TestKnoxGateway(RMFTestCase): ) self.assertResourceCalled('Execute', '/usr/hdp/current/knox-server/bin/knoxcli.sh create-master --master sa', environment = {'JAVA_HOME': u'/usr/jdk64/jdk1.7.0_45'}, -not_if = "ambari-sudo.sh su knox -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]test -f /var/lib/knox/data/security/master'", +not_if = "ambari-sudo.sh su knox -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]test -f /usr/hdp/current/knox-server/data/security/master'", user = 'knox', ) self.assertResourceCalled('Execute', '/usr/hdp/current/knox-server/bin/knoxcli.sh create-cert --hostname c6401.ambari.apache.org', environment = {'JAVA_HOME': u'/usr/jdk64/jdk1.7.0_45'}, -not_if = "ambari-sudo.sh su knox -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]test -f
ambari git commit: AMBARI-12979. Devdeploy:Start Services fails at enabling security (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 133535e6e -> d2e92bbdd AMBARI-12979. Devdeploy:Start Services fails at enabling security (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d2e92bbd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d2e92bbd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d2e92bbd Branch: refs/heads/trunk Commit: d2e92bbdd6b99ba26a3e5da92359df6da85586c6 Parents: 133535e Author: Andrew OnishukAuthored: Wed Sep 2 18:52:02 2015 +0300 Committer: Andrew Onishuk Committed: Wed Sep 2 18:52:02 2015 +0300 -- .../0.5.0.2.2/package/scripts/params_linux.py | 12 .../python/stacks/2.2/KNOX/test_knox_gateway.py | 20 ++-- 2 files changed, 18 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d2e92bbd/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py index b39e780..ad7f672 100644 --- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py @@ -40,6 +40,10 @@ knox_master_secret_path = '/var/lib/knox/data/security/master' knox_cert_store_path = '/var/lib/knox/data/security/keystores/gateway.jks' knox_user = default("/configurations/knox-env/knox_user", "knox") +# server configurations +knox_data_dir = '/var/lib/knox/data' +knox_logs_dir = '/var/log/knox' + # default parameters knox_bin = '/usr/bin/gateway' knox_conf_dir = '/etc/knox/conf' @@ -53,13 +57,13 @@ if Script.is_hdp_stack_greater_or_equal("2.2"): ldap_bin = '/usr/hdp/current/knox-server/bin/ldap.sh' knox_client_bin = '/usr/hdp/current/knox-server/bin/knoxcli.sh' + knox_master_secret_path = '/usr/hdp/current/knox-server/data/security/master' + knox_cert_store_path = '/usr/hdp/current/knox-server/data/security/keystores/gateway.jks' + knox_data_dir = '/usr/hdp/current/knox-server/data' + knox_group = default("/configurations/knox-env/knox_group", "knox") mode = 0644 -# server configurations -knox_data_dir = '/var/lib/knox/data' -knox_logs_dir = '/var/log/knox' - stack_version_unformatted = str(config['hostLevelParams']['stack_version']) hdp_stack_version = format_hdp_stack_version(stack_version_unformatted) http://git-wip-us.apache.org/repos/asf/ambari/blob/d2e92bbd/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py -- diff --git a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py index 11f476e..2acd4053 100644 --- a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py +++ b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py @@ -39,7 +39,7 @@ class TestKnoxGateway(RMFTestCase): target = RMFTestCase.TARGET_COMMON_SERVICES ) -self.assertResourceCalled('Directory', '/var/lib/knox/data', +self.assertResourceCalled('Directory', '/usr/hdp/current/knox-server/data', owner = 'knox', group = 'knox', recursive = True @@ -87,7 +87,7 @@ class TestKnoxGateway(RMFTestCase): self.assertResourceCalled('Execute', ('chown', '-R', 'knox:knox', - '/var/lib/knox/data', + '/usr/hdp/current/knox-server/data', '/var/log/knox', '/var/run/knox', '/usr/hdp/current/knox-server/conf', @@ -96,12 +96,12 @@ class TestKnoxGateway(RMFTestCase): ) self.assertResourceCalled('Execute', '/usr/hdp/current/knox-server/bin/knoxcli.sh create-master --master sa', environment = {'JAVA_HOME': u'/usr/jdk64/jdk1.7.0_45'}, -not_if = "ambari-sudo.sh su knox -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]test -f /var/lib/knox/data/security/master'", +not_if = "ambari-sudo.sh su knox -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]test -f /usr/hdp/current/knox-server/data/security/master'", user = 'knox', ) self.assertResourceCalled('Execute', '/usr/hdp/current/knox-server/bin/knoxcli.sh create-cert --hostname c6401.ambari.apache.org', environment = {'JAVA_HOME': u'/usr/jdk64/jdk1.7.0_45'}, -not_if = "ambari-sudo.sh su knox -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]test -f