[ambari] branch branch-2.7 updated: AMBARI-25183 Need a stack feature constant for add zoneName field in collection used for Ranger plugin audit (#2852)

2019-03-07 Thread mugdha
This is an automated email from the ASF dual-hosted git repository.

mugdha pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
 new 3f903f2  AMBARI-25183 Need a stack feature constant for add zoneName 
field in collection used for Ranger plugin audit (#2852)
3f903f2 is described below

commit 3f903f2cf9f1d38d9940ea6d138f5226a7a5157d
Author: Mugdha Varadkar 
AuthorDate: Fri Mar 8 11:08:39 2019 +0530

AMBARI-25183 Need a stack feature constant for add zoneName field in 
collection used for Ranger plugin audit (#2852)
---
 .../src/main/python/resource_management/libraries/functions/constants.py | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
index 82efddb..661b3f7 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
@@ -126,3 +126,4 @@ class StackFeature:
   AMS_LEGACY_HADOOP_SINK = "ams_legacy_hadoop_sink"
   RANGER_ALL_ADMIN_CHANGE_DEFAULT_PASSWORD = 
'ranger_all_admin_change_default_password'
   KAFKA_ENV_INCLUDE_RANGER_SCRIPT='kafka_env_include_ranger_script'
+  RANGER_SUPPORT_SECURITY_ZONE_FEATURE = 'ranger_support_security_zone_feature'
\ No newline at end of file



[ambari] branch trunk updated: AMBARI-25183 Need a stack feature constant for add zoneName field in collection used for Ranger plugin audit (#2853)

2019-03-07 Thread mugdha
This is an automated email from the ASF dual-hosted git repository.

mugdha pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 5cc3594  AMBARI-25183 Need a stack feature constant for add zoneName 
field in collection used for Ranger plugin audit (#2853)
5cc3594 is described below

commit 5cc3594560d60792c390e141227c8112a5212d4b
Author: Mugdha Varadkar 
AuthorDate: Fri Mar 8 11:07:51 2019 +0530

AMBARI-25183 Need a stack feature constant for add zoneName field in 
collection used for Ranger plugin audit (#2853)
---
 .../src/main/python/resource_management/libraries/functions/constants.py | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
index 82efddb..661b3f7 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
@@ -126,3 +126,4 @@ class StackFeature:
   AMS_LEGACY_HADOOP_SINK = "ams_legacy_hadoop_sink"
   RANGER_ALL_ADMIN_CHANGE_DEFAULT_PASSWORD = 
'ranger_all_admin_change_default_password'
   KAFKA_ENV_INCLUDE_RANGER_SCRIPT='kafka_env_include_ranger_script'
+  RANGER_SUPPORT_SECURITY_ZONE_FEATURE = 'ranger_support_security_zone_feature'
\ No newline at end of file



[ambari] branch branch-2.7 updated: AMBARI-24794 Adding Ranger Password configs in Admin Settings section under Advanced config (mugdha) (#2498)

2018-10-23 Thread mugdha
This is an automated email from the ASF dual-hosted git repository.

mugdha pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
 new 499bdc0  AMBARI-24794 Adding Ranger Password configs in Admin Settings 
section under Advanced config (mugdha) (#2498)
499bdc0 is described below

commit 499bdc0aeadbc4b5a1223e8c9ae9bc4f38edc447
Author: Mugdha Varadkar 
AuthorDate: Tue Oct 23 15:03:26 2018 +0530

AMBARI-24794 Adding Ranger Password configs in Admin Settings section under 
Advanced config (mugdha) (#2498)
---
 .../app/data/configs/services/ranger_properties.js | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/ambari-web/app/data/configs/services/ranger_properties.js 
b/ambari-web/app/data/configs/services/ranger_properties.js
index fa89e70..65f8ff3 100644
--- a/ambari-web/app/data/configs/services/ranger_properties.js
+++ b/ambari-web/app/data/configs/services/ranger_properties.js
@@ -33,9 +33,23 @@ module.exports = [
   },
   {
 "category": "RANGER_ADMIN",
-"filename": "admin-properties.xml",
+"filename": "ranger-env.xml",
 "index": 2,
-"name": "SQL_CONNECTOR_JAR",
+"name": "rangerusersync_user_password",
+"serviceName": "RANGER"
+  },
+  {
+"category": "RANGER_ADMIN",
+"filename": "ranger-env.xml",
+"index": 3,
+"name": "rangertagsync_user_password",
+"serviceName": "RANGER"
+  },
+  {
+"category": "RANGER_ADMIN",
+"filename": "ranger-env.xml",
+"index": 4,
+"name": "keyadmin_user_password",
 "serviceName": "RANGER"
   },
   {



[ambari] branch trunk updated: AMBARI-24794 Adding Ranger Password configs in Admin Settings section under Advanced config (mugdha) (#2481)

2018-10-18 Thread mugdha
This is an automated email from the ASF dual-hosted git repository.

mugdha pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 1db69d3  AMBARI-24794 Adding Ranger Password configs in Admin Settings 
section under Advanced config (mugdha) (#2481)
1db69d3 is described below

commit 1db69d3c7ca0ae52d243350391b64dea37246a81
Author: Mugdha Varadkar 
AuthorDate: Fri Oct 19 10:30:16 2018 +0530

AMBARI-24794 Adding Ranger Password configs in Admin Settings section under 
Advanced config (mugdha) (#2481)
---
 .../app/data/configs/services/ranger_properties.js | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/ambari-web/app/data/configs/services/ranger_properties.js 
b/ambari-web/app/data/configs/services/ranger_properties.js
index fa89e70..65f8ff3 100644
--- a/ambari-web/app/data/configs/services/ranger_properties.js
+++ b/ambari-web/app/data/configs/services/ranger_properties.js
@@ -33,9 +33,23 @@ module.exports = [
   },
   {
 "category": "RANGER_ADMIN",
-"filename": "admin-properties.xml",
+"filename": "ranger-env.xml",
 "index": 2,
-"name": "SQL_CONNECTOR_JAR",
+"name": "rangerusersync_user_password",
+"serviceName": "RANGER"
+  },
+  {
+"category": "RANGER_ADMIN",
+"filename": "ranger-env.xml",
+"index": 3,
+"name": "rangertagsync_user_password",
+"serviceName": "RANGER"
+  },
+  {
+"category": "RANGER_ADMIN",
+"filename": "ranger-env.xml",
+"index": 4,
+"name": "keyadmin_user_password",
 "serviceName": "RANGER"
   },
   {



[ambari] branch branch-2.7 updated: AMBARI-22951 Export JAVA_HOME env variable in shell script for Ranger (mugdha) (#2023)

2018-08-10 Thread mugdha
This is an automated email from the ASF dual-hosted git repository.

mugdha pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
 new 9be0593  AMBARI-22951 Export JAVA_HOME env variable in shell script 
for Ranger (mugdha) (#2023)
9be0593 is described below

commit 9be05937acf2fa57c1d562793a668ad7552d80fb
Author: Mugdha Varadkar 
AuthorDate: Fri Aug 10 18:44:33 2018 +0530

AMBARI-22951 Export JAVA_HOME env variable in shell script for Ranger 
(mugdha) (#2023)
---
 .../RANGER/0.4.0/package/scripts/setup_ranger_xml.py   |  7 +++
 .../RANGER_KMS/0.5.0.2.3/package/scripts/kms.py|  7 +++
 .../src/test/python/stacks/2.5/RANGER/test_ranger_admin.py | 14 ++
 .../test/python/stacks/2.5/RANGER_KMS/test_kms_server.py   | 14 ++
 .../src/test/python/stacks/2.6/RANGER/test_ranger_admin.py | 14 ++
 5 files changed, 56 insertions(+)

diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
index 815e647..398ecf9 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
@@ -120,6 +120,13 @@ def setup_ranger_admin(upgrade_type=None):
 create_parents=True
   )
 
+  File(format('{ranger_conf}/ranger-admin-env.sh'),
+content = format("export JAVA_HOME={java_home}"),
+owner = params.unix_user,
+group = params.unix_group,
+mode = 0755
+  )
+
   if params.stack_supports_pid:
 File(format('{ranger_conf}/ranger-admin-env-piddir.sh'),
   content = format("export RANGER_PID_DIR_PATH={ranger_pid_dir}\nexport 
RANGER_USER={unix_user}"),
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
index c0d5aa1..60a51f4 100755
--- 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
@@ -235,6 +235,13 @@ def kms(upgrade_type=None):
   create_parents=True
 )
 
+File(format('{kms_conf_dir}/ranger-kms-env.sh'),
+  content = format("export JAVA_HOME={java_home}"),
+  owner = params.kms_user,
+  group = params.kms_group,
+  mode = 0755
+)
+
 if params.stack_supports_pid:
   File(format('{kms_conf_dir}/ranger-kms-env-piddir.sh'),
 content = format("export 
RANGER_KMS_PID_DIR_PATH={ranger_kms_pid_dir}\nexport KMS_USER={kms_user}"),
diff --git 
a/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_admin.py 
b/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_admin.py
index ed97493..ba56b34 100644
--- a/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_admin.py
+++ b/ambari-server/src/test/python/stacks/2.5/RANGER/test_ranger_admin.py
@@ -265,6 +265,13 @@ class TestRangerAdmin(RMFTestCase):
   create_parents=True
 )
 
+self.assertResourceCalled('File', 
'/usr/hdp/current/ranger-admin/conf/ranger-admin-env.sh',
+  content = 'export JAVA_HOME=/usr/jdk64/jdk1.7.0_45',
+  owner = 'ranger',
+  group = 'ranger',
+  mode = 0755
+)
+
 self.assertResourceCalled('File', 
'/usr/hdp/current/ranger-admin/conf/ranger-admin-env-piddir.sh',
   content = 'export RANGER_PID_DIR_PATH=/var/run/ranger\nexport 
RANGER_USER=ranger',
   owner = 'ranger',
@@ -429,6 +436,13 @@ class TestRangerAdmin(RMFTestCase):
   create_parents=True
 )
 
+self.assertResourceCalled('File', 
'/usr/hdp/current/ranger-admin/conf/ranger-admin-env.sh',
+  content = 'export JAVA_HOME=/usr/jdk64/jdk1.7.0_45',
+  owner = 'ranger',
+  group = 'ranger',
+  mode = 0755
+)
+
 self.assertResourceCalled('File', 
'/usr/hdp/current/ranger-admin/conf/ranger-admin-env-piddir.sh',
   content = 'export RANGER_PID_DIR_PATH=/var/run/ranger\nexport 
RANGER_USER=ranger',
   owner = 'ranger',
diff --git 
a/ambari-server/src/test/python/stacks/2.5/RANGER_KMS/test_kms_server.py 
b/ambari-server/src/test/python/stacks/2.5/RANGER_KMS/test_kms_server.py
index 201a303..8517785 100644
--- a/ambari-server/src/test/python/stacks/2.5/RANGER_KMS/test_kms_server.py
+++ b/ambari-server/src/test/python/stacks/2.5/RANGER_KMS/test_kms_server.py
@@ -368,6 +368,13 @@ class TestRangerKMS(RMFTestCase):
   create_parents=True
 )
 
+self.assertResourceCalled('File', 
'/usr/hdp/current/ranger-kms/conf/ranger-kms-env.sh',
+  content = 'export JAVA_HOME=/usr/jdk64/jdk1.7.0_45',
+  owner = 'kms',

[ambari] branch trunk updated: AMBARI-24378 Updating LDAPSettings section for Ranger in Advanced config section. (mugdha) (#1916)

2018-07-30 Thread mugdha
This is an automated email from the ASF dual-hosted git repository.

mugdha pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new b38bb9f  AMBARI-24378 Updating LDAPSettings section for Ranger in 
Advanced config section. (mugdha) (#1916)
b38bb9f is described below

commit b38bb9f6ecb9116a251d17c083d286a63d3f47ec
Author: Mugdha Varadkar 
AuthorDate: Tue Jul 31 11:21:42 2018 +0530

AMBARI-24378 Updating LDAPSettings section for Ranger in Advanced config 
section. (mugdha) (#1916)
---
 .../app/data/configs/services/ranger_properties.js | 50 +++---
 ambari-web/app/models/stack_service.js |  3 +-
 2 files changed, 8 insertions(+), 45 deletions(-)

diff --git a/ambari-web/app/data/configs/services/ranger_properties.js 
b/ambari-web/app/data/configs/services/ranger_properties.js
index 754e4d4..fa89e70 100644
--- a/ambari-web/app/data/configs/services/ranger_properties.js
+++ b/ambari-web/app/data/configs/services/ranger_properties.js
@@ -18,48 +18,6 @@
 
 module.exports = [
   {
-"category": "SolrKerberosSettings",
-"filename": "ranger-admin-site.xml",
-"name": "xasecure.audit.jaas.Client.option.principal",
-"serviceName": "RANGER"
-  },
-  {
-"category": "SolrKerberosSettings",
-"filename": "ranger-admin-site.xml",
-"name": "xasecure.audit.jaas.Client.option.keyTab",
-"serviceName": "RANGER"
-  },
-  {
-"category": "SolrKerberosSettings",
-"filename": "ranger-admin-site.xml",
-"name": "xasecure.audit.jaas.Client.loginModuleName",
-"serviceName": "RANGER"
-  },
-  {
-"category": "SolrKerberosSettings",
-"filename": "ranger-admin-site.xml",
-"name": "xasecure.audit.jaas.Client.loginModuleControlFlag",
-"serviceName": "RANGER"
-  },
-  {
-"category": "SolrKerberosSettings",
-"filename": "ranger-admin-site.xml",
-"name": "xasecure.audit.jaas.Client.option.useKeyTab",
-"serviceName": "RANGER"
-  },
-  {
-"category": "SolrKerberosSettings",
-"filename": "ranger-admin-site.xml",
-"name": "xasecure.audit.jaas.Client.option.storeKey",
-"serviceName": "RANGER"
-  },
-  {
-"category": "SolrKerberosSettings",
-"filename": "ranger-admin-site.xml",
-"name": "xasecure.audit.jaas.Client.option.serviceName",
-"serviceName": "RANGER"
-  },
-  {
 "category": "RANGER_ADMIN",
 "filename": "ranger-env.xml",
 "index": 0,
@@ -120,7 +78,9 @@ module.exports = [
   "ranger.ldap.bind.dn",
   "ranger.ldap.bind.password",
   "ranger.ldap.referral",
-  "ranger.ldap.user.searchfilter"
+  "ranger.ldap.user.searchfilter",
+  "ranger.ldap.group.searchbase",
+  "ranger.ldap.group.searchfilter"
 ]
   },
   {
@@ -286,12 +246,14 @@ module.exports = [
 "category": "ADSettings",
 "filename": "ranger-admin-site.xml",
 "name": "ranger.ldap.ad.domain",
+"index": 4,
 "serviceName": "RANGER"
   },
   {
 "category": "ADSettings",
 "filename": "ranger-admin-site.xml",
 "name": "ranger.ldap.ad.url",
+"index": 1,
 "serviceName": "RANGER"
   },
   {
@@ -304,12 +266,14 @@ module.exports = [
 "category": "ADSettings",
 "filename": "ranger-admin-site.xml",
 "name": "ranger.ldap.ad.bind.dn",
+"index": 2,
 "serviceName": "RANGER"
   },
   {
 "category": "ADSettings",
 "filename": "ranger-admin-site.xml",
 "name": "ranger.ldap.ad.bind.password",
+"index": 3,
 "serviceName": "RANGER"
   },
   {
diff --git a/ambari-web/app/models/stack_service.js 
b/ambari-web/app/models/stack_service.js
index a8d3e3e..618f716 100644
--- a/ambari-web/app/models/stack_service.js
+++ b/ambari-web/app/models/stack_service.js
@@ -477,8 +477,7 @@ App.StackService.configCategories = function () {
 App.ServiceConfigCategory.create({ name: 'UnixAuthenticationSettings', 
displayName: 'Unix Authentication Settings'}),
 App.ServiceConfigCategory.create({ name: 'ADSettings', displayName: 
'AD Settings'}),
 App.ServiceConfigCategory.create({ name: 'LDAPSettings', displayName: 
'LDAP Settings'}),
-App.ServiceConfigCategory.create({ name: 'KnoxSSOSettings', 
displayName: 'Knox SSO Settings'}),
-App.ServiceConfigCategory.create({ name: 'SolrKerberosSettings', 
displayName: 'Solr Kerberos Settings'})
+App.ServiceConfigCategory.create({ name: 'KnoxSSOSettings', 
displayName: 'Knox SSO Settings'})
   ]);
   break;
 case 'ACCUMULO':



[ambari] branch branch-2.7 updated: AMBARI-24378 Updating LDAPSettings section for Ranger in Advanced config section. (mugdha) (#1917)

2018-07-30 Thread mugdha
This is an automated email from the ASF dual-hosted git repository.

mugdha pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
 new 26a48ea  AMBARI-24378 Updating LDAPSettings section for Ranger in 
Advanced config section. (mugdha) (#1917)
26a48ea is described below

commit 26a48eac0cc06c534da51c057d71d895465919e1
Author: Mugdha Varadkar 
AuthorDate: Tue Jul 31 11:20:12 2018 +0530

AMBARI-24378 Updating LDAPSettings section for Ranger in Advanced config 
section. (mugdha) (#1917)
---
 .../app/data/configs/services/ranger_properties.js | 50 +++---
 ambari-web/app/models/stack_service.js |  3 +-
 2 files changed, 8 insertions(+), 45 deletions(-)

diff --git a/ambari-web/app/data/configs/services/ranger_properties.js 
b/ambari-web/app/data/configs/services/ranger_properties.js
index 754e4d4..fa89e70 100644
--- a/ambari-web/app/data/configs/services/ranger_properties.js
+++ b/ambari-web/app/data/configs/services/ranger_properties.js
@@ -18,48 +18,6 @@
 
 module.exports = [
   {
-"category": "SolrKerberosSettings",
-"filename": "ranger-admin-site.xml",
-"name": "xasecure.audit.jaas.Client.option.principal",
-"serviceName": "RANGER"
-  },
-  {
-"category": "SolrKerberosSettings",
-"filename": "ranger-admin-site.xml",
-"name": "xasecure.audit.jaas.Client.option.keyTab",
-"serviceName": "RANGER"
-  },
-  {
-"category": "SolrKerberosSettings",
-"filename": "ranger-admin-site.xml",
-"name": "xasecure.audit.jaas.Client.loginModuleName",
-"serviceName": "RANGER"
-  },
-  {
-"category": "SolrKerberosSettings",
-"filename": "ranger-admin-site.xml",
-"name": "xasecure.audit.jaas.Client.loginModuleControlFlag",
-"serviceName": "RANGER"
-  },
-  {
-"category": "SolrKerberosSettings",
-"filename": "ranger-admin-site.xml",
-"name": "xasecure.audit.jaas.Client.option.useKeyTab",
-"serviceName": "RANGER"
-  },
-  {
-"category": "SolrKerberosSettings",
-"filename": "ranger-admin-site.xml",
-"name": "xasecure.audit.jaas.Client.option.storeKey",
-"serviceName": "RANGER"
-  },
-  {
-"category": "SolrKerberosSettings",
-"filename": "ranger-admin-site.xml",
-"name": "xasecure.audit.jaas.Client.option.serviceName",
-"serviceName": "RANGER"
-  },
-  {
 "category": "RANGER_ADMIN",
 "filename": "ranger-env.xml",
 "index": 0,
@@ -120,7 +78,9 @@ module.exports = [
   "ranger.ldap.bind.dn",
   "ranger.ldap.bind.password",
   "ranger.ldap.referral",
-  "ranger.ldap.user.searchfilter"
+  "ranger.ldap.user.searchfilter",
+  "ranger.ldap.group.searchbase",
+  "ranger.ldap.group.searchfilter"
 ]
   },
   {
@@ -286,12 +246,14 @@ module.exports = [
 "category": "ADSettings",
 "filename": "ranger-admin-site.xml",
 "name": "ranger.ldap.ad.domain",
+"index": 4,
 "serviceName": "RANGER"
   },
   {
 "category": "ADSettings",
 "filename": "ranger-admin-site.xml",
 "name": "ranger.ldap.ad.url",
+"index": 1,
 "serviceName": "RANGER"
   },
   {
@@ -304,12 +266,14 @@ module.exports = [
 "category": "ADSettings",
 "filename": "ranger-admin-site.xml",
 "name": "ranger.ldap.ad.bind.dn",
+"index": 2,
 "serviceName": "RANGER"
   },
   {
 "category": "ADSettings",
 "filename": "ranger-admin-site.xml",
 "name": "ranger.ldap.ad.bind.password",
+"index": 3,
 "serviceName": "RANGER"
   },
   {
diff --git a/ambari-web/app/models/stack_service.js 
b/ambari-web/app/models/stack_service.js
index a8d3e3e..618f716 100644
--- a/ambari-web/app/models/stack_service.js
+++ b/ambari-web/app/models/stack_service.js
@@ -477,8 +477,7 @@ App.StackService.configCategories = function () {
 App.ServiceConfigCategory.create({ name: 'UnixAuthenticationSettings', 
displayName: 'Unix Authentication Settings'}),
 App.ServiceConfigCategory.create({ name: 'ADSettings', displayName: 
'AD Settings'}),
 App.ServiceConfigCategory.create({ name: 'LDAPSettings', displayName: 
'LDAP Settings'}),
-App.ServiceConfigCategory.create({ name: 'KnoxSSOSettings', 
displayName: 'Knox SSO Settings'}),
-App.ServiceConfigCategory.create({ name: 'SolrKerberosSettings', 
displayName: 'Solr Kerberos Settings'})
+App.ServiceConfigCategory.create({ name: 'KnoxSSOSettings', 
displayName: 'Knox SSO Settings'})
   ]);
   break;
 case 'ACCUMULO':



[ambari] branch branch-2.7 updated: AMBARI-24352 Updating Ranger and Ranger KMS configs during Ambari upgrade (mugdha) (#1878)

2018-07-26 Thread mugdha
This is an automated email from the ASF dual-hosted git repository.

mugdha pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
 new d930ad4  AMBARI-24352 Updating Ranger and Ranger KMS configs during 
Ambari upgrade (mugdha) (#1878)
d930ad4 is described below

commit d930ad4faa5898d992fb0055e86a261d31195924
Author: Mugdha Varadkar 
AuthorDate: Fri Jul 27 10:24:25 2018 +0530

AMBARI-24352 Updating Ranger and Ranger KMS configs during Ambari upgrade 
(mugdha) (#1878)

* AMBARI-24352 Updating Ranger and Ranger KMS configs during Ambari upgrade 
(mugdha)

* AMBARI-24352 Updating Ranger and Ranger KMS configs during Ambari 
upgrade. Minor UT fix. (mugdha)

* AMBARI-24352 Updating Ranger and Ranger KMS configs during Ambari 
upgrade. Adding Doc Comment. (mugdha)

* AMBARI-24352 Updating Ranger and Ranger KMS configs during Ambari 
upgrade. Adding logic for fetching port from existing db conn string. (mugdha)
---
 .../ambari/server/upgrade/SchemaUpgradeHelper.java |   1 +
 .../ambari/server/upgrade/UpgradeCatalog271.java   | 198 ++
 .../KAFKA/0.8.1/package/scripts/params.py  |   2 -
 .../RANGER/0.4.0/package/scripts/params.py |   6 +-
 .../package/templates/input.config-ranger.json.j2  |   6 +-
 .../0.5.0/configuration/ranger-ugsync-site.xml |   4 +-
 .../0.7.0/configuration/ranger-admin-site.xml  |  11 +
 .../RANGER/0.7.0/configuration/ranger-env.xml  |  10 +
 .../RANGER_KMS/0.5.0.2.3/configuration/kms-env.xml |  20 ++
 .../YARN/2.1.0.2.0/package/scripts/params_linux.py |   2 -
 .../RANGER_KMS/themes/theme_version_1.json |  49 -
 .../stacks/HDP/2.3/services/stack_advisor.py   |  19 ++
 .../server/upgrade/UpgradeCatalog271Test.java  | 229 +
 .../python/stacks/2.3/common/test_stack_advisor.py |  10 +
 .../stacks/2.5/configs/ranger-admin-default.json   |   2 +-
 .../stacks/2.5/configs/ranger-admin-secured.json   |   2 +-
 .../stacks/2.6/configs/ranger-admin-default.json   |   2 +-
 .../stacks/2.6/configs/ranger-admin-secured.json   |   2 +-
 18 files changed, 552 insertions(+), 23 deletions(-)

diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
index de80052..4a05175 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
@@ -189,6 +189,7 @@ public class SchemaUpgradeHelper {
   catalogBinder.addBinding().to(UpgradeCatalog261.class);
   catalogBinder.addBinding().to(UpgradeCatalog262.class);
   catalogBinder.addBinding().to(UpgradeCatalog270.class);
+  catalogBinder.addBinding().to(UpgradeCatalog271.class);
   catalogBinder.addBinding().to(UpdateAlertScriptPaths.class);
   catalogBinder.addBinding().to(FinalUpgradeCatalog.class);
 
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog271.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog271.java
new file mode 100644
index 000..c8a4d99
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog271.java
@@ -0,0 +1,198 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ambari.server.upgrade;
+
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.controller.AmbariManagementController;
+import org.apache.ambari.server.orm.dao.DaoUtils;
+import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.Config;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.collect.Sets;
+import com.google.inject.Inject;
+import com.go

[ambari] branch trunk updated: AMBARI-24352 Updating Ranger and Ranger KMS configs during Ambari upgrade (mugdha) (#1874)

2018-07-26 Thread mugdha
This is an automated email from the ASF dual-hosted git repository.

mugdha pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new fd408fc  AMBARI-24352 Updating Ranger and Ranger KMS configs during 
Ambari upgrade (mugdha) (#1874)
fd408fc is described below

commit fd408fcdbb0a86a030e21e61d42db8698cc1cf88
Author: Mugdha Varadkar 
AuthorDate: Fri Jul 27 10:20:25 2018 +0530

AMBARI-24352 Updating Ranger and Ranger KMS configs during Ambari upgrade 
(mugdha) (#1874)

* AMBARI-24352 Updating Ranger and Ranger KMS configs during Ambari upgrade 
(mugdha)

* AMBARI-24352 Updating Ranger and Ranger KMS configs during Ambari 
upgrade. Minor UT fix. (mugdha)

* AMBARI-24352 Updating Ranger and Ranger KMS configs during Ambari 
upgrade. Adding Doc Comment. (mugdha)

* AMBARI-24352 Updating Ranger and Ranger KMS configs during Ambari 
upgrade. Adding logic for fetching port from existing db conn string. (mugdha)
---
 .../ambari/server/upgrade/SchemaUpgradeHelper.java |   1 +
 .../ambari/server/upgrade/UpgradeCatalog271.java   | 198 ++
 .../KAFKA/0.8.1/package/scripts/params.py  |   2 -
 .../RANGER/0.4.0/package/scripts/params.py |   6 +-
 .../package/templates/input.config-ranger.json.j2  |   6 +-
 .../0.5.0/configuration/ranger-ugsync-site.xml |   4 +-
 .../0.7.0/configuration/ranger-admin-site.xml  |  11 +
 .../RANGER/0.7.0/configuration/ranger-env.xml  |  10 +
 .../RANGER_KMS/0.5.0.2.3/configuration/kms-env.xml |  20 ++
 .../YARN/2.1.0.2.0/package/scripts/params_linux.py |   2 -
 .../RANGER_KMS/themes/theme_version_1.json |  49 -
 .../stacks/HDP/2.3/services/stack_advisor.py   |  19 ++
 .../server/upgrade/UpgradeCatalog271Test.java  | 229 +
 .../python/stacks/2.3/common/test_stack_advisor.py |  10 +
 .../stacks/2.5/configs/ranger-admin-default.json   |   2 +-
 .../stacks/2.5/configs/ranger-admin-secured.json   |   2 +-
 .../stacks/2.6/configs/ranger-admin-default.json   |   2 +-
 .../stacks/2.6/configs/ranger-admin-secured.json   |   2 +-
 18 files changed, 552 insertions(+), 23 deletions(-)

diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
index de80052..4a05175 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
@@ -189,6 +189,7 @@ public class SchemaUpgradeHelper {
   catalogBinder.addBinding().to(UpgradeCatalog261.class);
   catalogBinder.addBinding().to(UpgradeCatalog262.class);
   catalogBinder.addBinding().to(UpgradeCatalog270.class);
+  catalogBinder.addBinding().to(UpgradeCatalog271.class);
   catalogBinder.addBinding().to(UpdateAlertScriptPaths.class);
   catalogBinder.addBinding().to(FinalUpgradeCatalog.class);
 
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog271.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog271.java
new file mode 100644
index 000..c8a4d99
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog271.java
@@ -0,0 +1,198 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ambari.server.upgrade;
+
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.controller.AmbariManagementController;
+import org.apache.ambari.server.orm.dao.DaoUtils;
+import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.Config;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.collect.Sets;
+import com.google.inject.Inject;
+import com.google.inject

[ambari] branch trunk updated: AMBARI-24216 Updating admin user password field value for Ranger and Atlas (mugdha) (#1645)

2018-06-29 Thread mugdha
This is an automated email from the ASF dual-hosted git repository.

mugdha pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new bbcc1b8  AMBARI-24216 Updating admin user password field value for 
Ranger and Atlas (mugdha) (#1645)
bbcc1b8 is described below

commit bbcc1b80cadde59bd114bc37caf51b0387ef8343
Author: Mugdha Varadkar 
AuthorDate: Fri Jun 29 18:30:16 2018 +0530

AMBARI-24216 Updating admin user password field value for Ranger and Atlas 
(mugdha) (#1645)
---
 .../resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml | 2 +-
 .../resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml
index 077ba00..717e7a7 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml
@@ -103,7 +103,7 @@
   
   
 admin_password
-admin
+
 PASSWORD
 This is the password for default admin user that is used for 
creating ambari user in Ranger Admin
 
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
index b69bccd..21cc620 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
@@ -31,7 +31,7 @@
 atlas.admin.password
 Admin password
 Admin Login password
-admin
+
 PASSWORD
 
   password



[ambari] branch trunk updated: AMBARI-23979 Updating ownership and permission of .crc file for Ranger service and Ranger plugin supported services (mugdha) (#1411)

2018-05-31 Thread mugdha
This is an automated email from the ASF dual-hosted git repository.

mugdha pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new f2b946a  AMBARI-23979 Updating ownership and permission of .crc file 
for Ranger service and Ranger plugin supported services (mugdha) (#1411)
f2b946a is described below

commit f2b946adfd21edc9b0ab07d6e6961fa2199cfb19
Author: Mugdha Varadkar 
AuthorDate: Thu May 31 14:01:42 2018 +0530

AMBARI-23979 Updating ownership and permission of .crc file for Ranger 
service and Ranger plugin supported services (mugdha) (#1411)
---
 .../libraries/functions/setup_ranger_plugin_xml.py |  9 +++
 .../RANGER/0.4.0/package/scripts/ranger_tagsync.py | 21 --
 .../0.4.0/package/scripts/setup_ranger_xml.py  | 84 +++---
 .../RANGER_KMS/0.5.0.2.3/package/scripts/kms.py| 22 +-
 .../python/stacks/2.5/RANGER/test_ranger_admin.py  | 16 +
 .../stacks/2.5/RANGER/test_ranger_usersync.py  |  8 +++
 .../stacks/2.5/RANGER_KMS/test_kms_server.py   | 48 +
 .../python/stacks/2.6/RANGER/test_ranger_admin.py  | 28 
 .../stacks/2.6/RANGER/test_ranger_tagsync.py   | 15 
 9 files changed, 189 insertions(+), 62 deletions(-)

diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
index af53714..09b816c 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
@@ -223,6 +223,15 @@ def setup_ranger_plugin_keystore(service_name, 
audit_db_is_enabled, stack_versio
 mode = 0640
   )
 
+  dot_jceks_crc_file_path = os.path.join(os.path.dirname(credential_file), "." 
+ os.path.basename(credential_file) + ".crc")
+
+  File(dot_jceks_crc_file_path,
+owner = component_user,
+group = component_group,
+only_if = format("test -e {dot_jceks_crc_file_path}"),
+mode = 0640
+  )
+
 def setup_configuration_file_for_required_plugins(component_user, 
component_group, create_core_site_path,
   configurations={}, 
configuration_attributes={}, file_name='core-site.xml',
   xml_include_file=None, 
xml_include_file_content=None):
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
index b1a1819..2d91f3d 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
@@ -27,7 +27,7 @@ from resource_management.libraries.functions.format import 
format
 from resource_management.core.logger import Logger
 from resource_management.core import shell
 from ranger_service import ranger_service
-from setup_ranger_xml import ranger, ranger_credential_helper
+from setup_ranger_xml import ranger, ranger_credential_helper, 
update_dot_jceks_crc_ownership
 from resource_management.core.exceptions import Fail
 
 class RangerTagsync(Script):
@@ -39,10 +39,14 @@ class RangerTagsync(Script):
 
 ranger_credential_helper(params.tagsync_cred_lib, 
'tagadmin.user.password', 'rangertagsync', params.tagsync_jceks_path)
 File(params.tagsync_jceks_path,
-   owner = params.unix_user,
-   group = params.unix_group,
-   mode = 0640
+  owner = params.unix_user,
+  group = params.unix_group,
+  only_if = format("test -e {tagsync_jceks_path}"),
+  mode = 0640
 )
+
+update_dot_jceks_crc_ownership(credential_provider_path = 
params.tagsync_jceks_path, user = params.unix_user, group = params.unix_group)
+
 if params.stack_supports_ranger_tagsync_ssl_xml_support:
   Logger.info("Stack support Atlas user for Tagsync, creating keystore for 
same.")
   self.create_atlas_user_keystore(env)
@@ -136,10 +140,13 @@ class RangerTagsync(Script):
 env.set_params(params)
 ranger_credential_helper(params.tagsync_cred_lib, 'atlas.user.password', 
'admin', params.atlas_tagsync_jceks_path)
 File(params.atlas_tagsync_jceks_path,
- owner = params.unix_user,
- group = params.unix_group,
- mode = 0640
+  owner = params.unix_user,
+  group = params.unix_group,
+  only_if = format("test -e {atlas_tagsync_jceks_path}"),
+  mode = 0640
 )
 
+update_dot_jceks_crc_ownership(credential_provider_path = 
params.atlas_tagsync_jceks_path, user = params.unix_user, group = 
params.unix_group)
+
 if __name__ == "__main

[ambari] branch trunk updated: AMBARI-23738 Need to add pre-upgrade check for Atlas service during stack upgrade (#1221)

2018-05-15 Thread mugdha
This is an automated email from the ASF dual-hosted git repository.

mugdha pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 5b35787  AMBARI-23738 Need to add pre-upgrade check for Atlas service 
during stack upgrade (#1221)
5b35787 is described below

commit 5b357875d1d19bea2f06191f78cf71503cf6d8ee
Author: Mugdha Varadkar <fimug...@users.noreply.github.com>
AuthorDate: Tue May 15 18:52:45 2018 +0530

AMBARI-23738 Need to add pre-upgrade check for Atlas service during stack 
upgrade (#1221)

* AMBARI-23738 Need to add pre-upgrade check for Atlas service during stack 
upgrade

* AMBARI-23738 Need to add pre-upgrade check for Atlas service during stack 
upgrade

* AMBARI-23738 Need to add pre-upgrade check for Atlas service during stack 
upgrade
---
 .../server/checks/AtlasMigrationPropertyCheck.java |  73 +++
 .../ambari/server/checks/CheckDescription.java |  10 +-
 .../checks/AtlasMigrationPropertyCheckTest.java| 142 +
 3 files changed, 224 insertions(+), 1 deletion(-)

diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/AtlasMigrationPropertyCheck.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/AtlasMigrationPropertyCheck.java
new file mode 100644
index 000..9aa6795
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/AtlasMigrationPropertyCheck.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ambari.server.checks;
+
+import java.util.Set;
+
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.controller.PrereqCheckRequest;
+import org.apache.ambari.server.state.stack.PrereqCheckStatus;
+import org.apache.ambari.server.state.stack.PrerequisiteCheck;
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.collect.Sets;
+import com.google.inject.Singleton;
+
+
+/**
+ * Atlas needs to migrate existing data from TitanDB to JanusGraph.
+ * To migrate existing data to JanusGraph the property 
atlas.migration.data.filename needs to be present in Atlas 
applicaton.properties.
+ */
+@Singleton
+@UpgradeCheck(group = UpgradeCheckGroup.INFORMATIONAL_WARNING)
+public class AtlasMigrationPropertyCheck extends AbstractCheckDescriptor {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(AtlasMigrationPropertyCheck.class);
+private static final String serviceName = "ATLAS";
+
+/**
+ * Default constructor
+ */
+public AtlasMigrationPropertyCheck(){  
super(CheckDescription.ATLAS_MIGRATION_PROPERTY_CHECK); }
+
+/**
+ * {@inheritDoc}
+ */
+public Set getApplicableServices() { return 
Sets.newHashSet(serviceName); }
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+public void perform(PrerequisiteCheck prerequisiteCheck, 
PrereqCheckRequest request) throws AmbariException {
+  String atlasMigrationProperty = 
getProperty(request,"application-properties","atlas.migration.data.filename");
+  if(StringUtils.isBlank(atlasMigrationProperty)) {
+LOG.info("The property atlas.migration.data.filename is not found in 
application-properties, need to add the property before upgrade.");
+prerequisiteCheck.getFailedOn().add(serviceName);
+prerequisiteCheck.setStatus(PrereqCheckStatus.FAIL);
+prerequisiteCheck.setFailReason(getFailReason(prerequisiteCheck, 
request));
+  } else if (atlasMigrationProperty.contains("/etc/atlas/conf")) {
+  LOG.info("The property atlas.migration.data.filename is found in 
application-properties, but it contains atlas conf path ie /etc/atlas/conf. 
Avoid using conf path for this property.");
+  prerequisiteCheck.getFailedOn().add(serviceName);
+  prerequisiteCheck.setStatus(PrereqCheckStatus.WARNING);
+  prerequisiteCheck.setFailReason(getFailReason(prerequisiteCheck, 
request));
+  }
+}
+}
diff --git 
a/ambari-server

[ambari] 01/01: Merge pull request #1178 from fimugdha/trunk

2018-05-08 Thread mugdha
This is an automated email from the ASF dual-hosted git repository.

mugdha pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git

commit d70dc6c5dc2420383c4987567dfcca559abf9652
Merge: c4a125d 6d547f5
Author: Mugdha Varadkar <fimug...@users.noreply.github.com>
AuthorDate: Tue May 8 14:19:47 2018 +0530

Merge pull request #1178 from fimugdha/trunk

AMBARI-23762 Updating default Ranger Hdfs service name for NN Federation 
enabled cluster

 .../libraries/functions/ranger_functions_v2.py | 87 +++---
 .../libraries/functions/setup_ranger_plugin_xml.py | 38 +-
 2 files changed, 97 insertions(+), 28 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
mug...@apache.org.


[ambari] branch trunk updated (c4a125d -> d70dc6c)

2018-05-08 Thread mugdha
This is an automated email from the ASF dual-hosted git repository.

mugdha pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git.


from c4a125d  AMBARI-23782. Log Search: Cluster filter is not working on a 
few endpoints. (#1198)
 add a05762d  AMBARI-23103 Adding Stack feature constant for Ranger and 
Ranger KMS services (mugdha)
 add 7e1c33a  Merge remote-tracking branch 'upstream/trunk' into trunk
 add c07c2ca  Merge remote-tracking branch 'upstream/trunk' into trunk
 add 6d547f5  AMBARI-23762 Updating default Ranger Hdfs service name for NN 
Federation enabled cluster (mugdha)
 new d70dc6c  Merge pull request #1178 from fimugdha/trunk

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../libraries/functions/ranger_functions_v2.py | 87 +++---
 .../libraries/functions/setup_ranger_plugin_xml.py | 38 +-
 2 files changed, 97 insertions(+), 28 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
mug...@apache.org.


ambari git commit: AMBARI-22669 Ranger stack script changes to fix missing directory failure for blueprint installation (mugdha)

2017-12-25 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk cfed3fb9d -> 9c7f1b7aa


AMBARI-22669 Ranger stack script changes to fix missing directory failure for 
blueprint installation (mugdha)


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

Branch: refs/heads/trunk
Commit: 9c7f1b7aa9d04bea2f7e68a64fd242f20c86b521
Parents: cfed3fb
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Tue Dec 19 15:42:46 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Tue Dec 26 10:16:52 2017 +0530

--
 .../RANGER/0.4.0/package/scripts/params.py   |  4 ++--
 .../RANGER/0.4.0/package/scripts/ranger_admin.py | 10 ++
 .../0.4.0/package/scripts/setup_ranger_xml.py| 19 ++-
 .../RANGER_KMS/0.5.0.2.3/package/scripts/kms.py  | 13 -
 .../0.5.0.2.3/package/scripts/kms_server.py  |  6 --
 .../stacks/2.6/RANGER/test_ranger_admin.py   | 10 +-
 6 files changed, 27 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9c7f1b7a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
index 5731e6c..aac94f3 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
@@ -94,11 +94,11 @@ ranger_tagsync_truststore_password = 
config['configurations']['ranger-tagsync-po
 atlas_tagsync_keystore_password = 
config['configurations']['atlas-tagsync-ssl']['xasecure.policymgr.clientssl.keystore.password']
 atlas_tagsync_truststore_password = 
config['configurations']['atlas-tagsync-ssl']['xasecure.policymgr.clientssl.truststore.password']
 
-if upgrade_direction == Direction.DOWNGRADE and version and not 
check_stack_feature(StackFeature.CONFIG_VERSIONING, version):
+if upgrade_direction == Direction.DOWNGRADE and not 
check_stack_feature(StackFeature.CONFIG_VERSIONING, 
version_for_stack_feature_checks):
   stack_supports_rolling_upgrade = True
   stack_supports_config_versioning = False
 
-if upgrade_direction == Direction.DOWNGRADE and version and not 
check_stack_feature(StackFeature.RANGER_USERSYNC_NON_ROOT, version):
+if upgrade_direction == Direction.DOWNGRADE and not 
check_stack_feature(StackFeature.RANGER_USERSYNC_NON_ROOT, 
version_for_stack_feature_checks):
   stack_supports_usersync_non_root = False
 
 if stack_supports_rolling_upgrade:

http://git-wip-us.apache.org/repos/asf/ambari/blob/9c7f1b7a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
index d0a725a..2dd13ba 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
@@ -175,10 +175,11 @@ class RangerAdmin(Script):
 stack_version = upgrade_stack[1]
 
 if params.xml_configurations_supported and params.upgrade_direction == 
Direction.UPGRADE:
-  Logger.info(format('Setting Ranger database schema, using version 
{stack_version}'))
+  target_version = upgrade_summary.get_target_version("RANGER", 
default_version = stack_version)
+  Logger.info(format('Setting Ranger database schema, using version 
{target_version}'))
 
   from setup_ranger_xml import setup_ranger_db
-  setup_ranger_db(stack_version=stack_version)
+  setup_ranger_db(stack_version = target_version)
 
   def setup_ranger_java_patches(self, env):
 import params
@@ -191,10 +192,11 @@ class RangerAdmin(Script):
 stack_version = upgrade_stack[1]
 
 if params.xml_configurations_supported and params.upgrade_direction == 
Direction.UPGRADE:
-  Logger.info(format('Applying Ranger java patches, using version 
{stack_version}'))
+  target_version = upgrade_summary.get_target_version("RANGER", 
default_version = stack_version)
+  Logger.info(format('Applying Ranger java patches, using version 
{target_version}'))
 
   from setup_ranger_xml import setup_java_patch
-  setup_jav

ambari git commit: AMBARI-22463 Removing secure reference configs entries from stack for Ranger KMS service (mugdha)

2017-11-19 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 2d9fd418a -> 8b820346c


AMBARI-22463 Removing secure reference configs entries from stack for Ranger 
KMS service (mugdha)


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

Branch: refs/heads/trunk
Commit: 8b820346ca2902016ee2d5d7d5d3ff5d60126933
Parents: 2d9fd41
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Mon Nov 20 10:27:46 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Mon Nov 20 10:57:23 2017 +0530

--
 .../0.5.0.2.3/configuration/kms-site.xml| 26 
 .../1.0.0.3.0/configuration/kms-site.xml| 26 
 2 files changed, 52 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8b820346/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/configuration/kms-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/configuration/kms-site.xml
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/configuration/kms-site.xml
index 59a6952..5dcdd82 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/configuration/kms-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/configuration/kms-site.xml
@@ -65,19 +65,6 @@
 
   
   
-hadoop.kms.authentication.kerberos.keytab
-${user.home}/kms.keytab
-Path to the keytab with credentials for the configured 
Kerberos principal.
-
-  
-  
-hadoop.kms.authentication.kerberos.principal
-HTTP/localhost
-The Kerberos principal to use for the HTTP endpoint. The 
principal must start with 'HTTP/' as per the Kerberos HTTP SPNEGO 
specification.
-KERBEROS_PRINCIPAL
-
-  
-  
 hadoop.kms.authentication.kerberos.name.rules
 DEFAULT
 Rules used to resolve Kerberos principal names.
@@ -112,19 +99,6 @@
 
   
   
-
hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.keytab
-/etc/hadoop/conf/kms.keytab
-The absolute path for the Kerberos keytab with the 
credentials to connect to Zookeeper.
-
-  
-  
-
hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.principal
-kms/#HOSTNAME#
-The Kerberos service principal used to connect to 
Zookeeper.
-KERBEROS_PRINCIPAL
-
-  
-  
 hadoop.kms.security.authorization.manager
 
org.apache.ranger.authorization.kms.authorizer.RangerKmsAuthorizer
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8b820346/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-site.xml
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-site.xml
index 1e6f7b5..19ce76f 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/configuration/kms-site.xml
@@ -65,19 +65,6 @@
 
   
   
-hadoop.kms.authentication.kerberos.keytab
-${user.home}/kms.keytab
-Path to the keytab with credentials for the configured 
Kerberos principal.
-
-  
-  
-hadoop.kms.authentication.kerberos.principal
-HTTP/localhost
-The Kerberos principal to use for the HTTP endpoint. The 
principal must start with 'HTTP/' as per the Kerberos HTTP SPNEGO 
specification.
-KERBEROS_PRINCIPAL
-
-  
-  
 hadoop.kms.authentication.kerberos.name.rules
 DEFAULT
 Rules used to resolve Kerberos principal names.
@@ -112,19 +99,6 @@
 
   
   
-
hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.keytab
-/etc/hadoop/conf/kms.keytab
-The absolute path for the Kerberos keytab with the 
credentials to connect to Zookeeper.
-
-  
-  
-
hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.principal
-kms/#HOSTNAME#
-The Kerberos service principal used to connect to 
Zookeeper.
-KERBEROS_PRINCIPAL
-
-  
-  
 hadoop.kms.security.authorization.manager
 
org.apache.ranger.authorization.kms.authorizer.RangerKmsAuthorizer
 



ambari git commit: AMBARI-22234 Optimizing Ranger KMS imports (mugdha)

2017-10-16 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk e19029cbd -> d6cd303d0


AMBARI-22234 Optimizing Ranger KMS imports (mugdha)


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

Branch: refs/heads/trunk
Commit: d6cd303d0207ac6ffcdbc16d129758bba9494423
Parents: e19029c
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Tue Oct 17 11:22:05 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Tue Oct 17 11:24:13 2017 +0530

--
 .../0.5.0.2.3/package/scripts/kms_server.py | 21 ++--
 .../1.0.0.3.0/package/scripts/kms_server.py | 19 +-
 2 files changed, 21 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d6cd303d/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py
index fcf2478..0b37489 100755
--- 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py
@@ -27,9 +27,10 @@ from resource_management.libraries.functions.format import 
format
 from resource_management.core.logger import Logger
 from resource_management.core import shell
 from resource_management.libraries.functions.default import default
-from kms import kms, setup_kms_db, setup_java_patch, enable_kms_plugin, 
setup_kms_jce, update_password_configs
 from kms_service import kms_service
 
+import kms
+
 class KmsServer(Script):
 
   def install(self, env):
@@ -44,9 +45,9 @@ class KmsServer(Script):
   sudo = True
 )
 
-setup_kms_db()
+kms.setup_kms_db()
 self.configure(env)
-setup_java_patch()
+kms.setup_java_patch()
 
   def stop(self, env, upgrade_type=None):
 import params
@@ -63,9 +64,9 @@ class KmsServer(Script):
 
 env.set_params(params)
 self.configure(env)
-enable_kms_plugin()
-setup_kms_jce()
-update_password_configs()
+kms.enable_kms_plugin()
+kms.setup_kms_jce()
+kms.update_password_configs()
 kms_service(action = 'start', upgrade_type=upgrade_type)
 
   def status(self, env):
@@ -87,15 +88,15 @@ class KmsServer(Script):
 import params
 
 env.set_params(params)
-kms()
+kms.kms()
 
   def pre_upgrade_restart(self, env, upgrade_type=None):
 import params
 env.set_params(params)
 
 stack_select.select_packages(params.version)
-kms(upgrade_type=upgrade_type)
-setup_java_patch()
+kms.kms(upgrade_type=upgrade_type)
+kms.setup_java_patch()
 
   def setup_ranger_kms_database(self, env):
 import params
@@ -107,7 +108,7 @@ class KmsServer(Script):
 
 stack_version = upgrade_stack[1]
 Logger.info(format('Setting Ranger KMS database schema, using version 
{stack_version}'))
-setup_kms_db(stack_version=stack_version)
+kms.setup_kms_db(stack_version=stack_version)
 
   def get_log_folder(self):
 import params

http://git-wip-us.apache.org/repos/asf/ambari/blob/d6cd303d/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py
index 4c313c4..4708da1 100755
--- 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py
@@ -27,10 +27,11 @@ from resource_management.libraries.functions.format import 
format
 from resource_management.core.logger import Logger
 from resource_management.core import shell
 from resource_management.libraries.functions.default import default
-from kms import kms, setup_kms_db, setup_java_patch, enable_kms_plugin, 
setup_kms_jce
 from kms_service import kms_service
 import upgrade
 
+import kms
+
 class KmsServer(Script):
 
   def install(self, env):
@@ -38,9 +39,9 @@ class KmsServer(Script):
 import params
 env.set_params(params)
 
-setup_kms_db()
+kms.setup_kms_db()
 self.configure(env)
-setup_java_patch()
+kms.setup_java_patch()
 
   def stop(self, en

ambari git commit: AMBARI-22232 : ADDENDUM Need to add a new property to support proxy users for Atlas service (Vishal Suvagia via mugdha).

2017-10-16 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk e219186ea -> d4458daa9


AMBARI-22232 : ADDENDUM Need to add a new property to support proxy users for 
Atlas service (Vishal Suvagia via mugdha).


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

Branch: refs/heads/trunk
Commit: d4458daa9bf5209eb2f86409185221cdbd749b13
Parents: e219186
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Mon Oct 16 15:16:17 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Mon Oct 16 15:35:35 2017 +0530

--
 .../upgrades/AtlasProxyUserConfigCalculation.java  | 17 +
 .../AtlasProxyUserConfigCalculationTest.java   | 17 +
 2 files changed, 34 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d4458daa/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
index 85fb200..40d64b5 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.ambari.server.serveraction.upgrades;
 
 import org.apache.ambari.server.AmbariException;

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4458daa/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculationTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculationTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculationTest.java
index 3f8bca9..33ec7f3 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculationTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculationTest.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.ambari.server.serveraction.upgrades;
 
 import com.google.inject.Injector;



ambari git commit: AMBARI-22232 : ADDENDUM Need to add a new property to support proxy users for Atlas service (Vishal Suvagia via mugdha).

2017-10-16 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 f8c66dd05 -> 2d1100ded


AMBARI-22232 : ADDENDUM Need to add a new property to support proxy users for 
Atlas service (Vishal Suvagia via mugdha).


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

Branch: refs/heads/branch-2.6
Commit: 2d1100deda79195c39e4f42f7a9d4504b10c6af5
Parents: f8c66dd
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Mon Oct 16 15:16:17 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Mon Oct 16 15:33:52 2017 +0530

--
 .../upgrades/AtlasProxyUserConfigCalculation.java  | 17 +
 .../AtlasProxyUserConfigCalculationTest.java   | 17 +
 2 files changed, 34 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2d1100de/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
index c0c4f33..a9f625a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.ambari.server.serveraction.upgrades;
 
 import org.apache.ambari.server.AmbariException;

http://git-wip-us.apache.org/repos/asf/ambari/blob/2d1100de/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculationTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculationTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculationTest.java
index 3f8bca9..33ec7f3 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculationTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculationTest.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.ambari.server.serveraction.upgrades;
 
 import com.google.inject.Injector;



ambari git commit: AMBARI-22232 : Need to add a new property to support proxy users for Atlas service. (Vishal Suvagia via mugdha)

2017-10-15 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 dda3687ae -> 34dc30941


AMBARI-22232 : Need to add a new property to support proxy users for Atlas 
service. (Vishal Suvagia via mugdha)


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

Branch: refs/heads/branch-2.6
Commit: 34dc3094194f78cc3c143390b162d3dc38aa5860
Parents: dda3687
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Sat Oct 14 16:26:56 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Mon Oct 16 11:17:41 2017 +0530

--
 .../AtlasProxyUserConfigCalculation.java|  48 +
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml |   4 +
 .../stacks/HDP/2.5/upgrades/upgrade-2.6.xml |   3 +
 .../configuration/application-properties.xml|  15 +++
 .../stacks/HDP/2.6/services/stack_advisor.py|   7 ++
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |   4 +
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml |   3 +
 .../AtlasProxyUserConfigCalculationTest.java| 108 +++
 .../stacks/2.6/common/test_stack_advisor.py |   3 +-
 9 files changed, 194 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/34dc3094/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
new file mode 100644
index 000..c0c4f33
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
@@ -0,0 +1,48 @@
+package org.apache.ambari.server.serveraction.upgrades;
+
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.actionmanager.HostRoleStatus;
+import org.apache.ambari.server.agent.CommandReport;
+import org.apache.ambari.server.serveraction.AbstractServerAction;
+import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.Config;
+
+import javax.inject.Inject;
+import java.text.MessageFormat;
+import java.util.Map;
+import java.util.concurrent.ConcurrentMap;
+
+public class AtlasProxyUserConfigCalculation extends 
AbstractUpgradeServerAction {
+
+  private static final String ATLAS_APPLICATION_PROPERTIES_CONFIG_TYPE = 
"application-properties";
+  private static final String KNOX_ENV_CONFIG_TYPE = "knox-env";
+  private static final String KNOX_USER_CONFIG = "knox_user";
+
+  @Override
+  public CommandReport execute(ConcurrentMap<String, Object> 
requestSharedDataContext) throws AmbariException, InterruptedException {
+String clusterName = getExecutionCommand().getClusterName();
+Cluster cluster = m_clusters.getCluster(clusterName);
+String outputMessage = "";
+
+Config atlasApplicationProperties = 
cluster.getDesiredConfigByType(ATLAS_APPLICATION_PROPERTIES_CONFIG_TYPE);
+if (null == atlasApplicationProperties) {
+  return createCommandReport(0, HostRoleStatus.COMPLETED, "{}",
+MessageFormat.format("Config type {0} not found, skipping updating 
property in same.", ATLAS_APPLICATION_PROPERTIES_CONFIG_TYPE), "");
+}
+
+Config knoxEnvConfig = 
cluster.getDesiredConfigByType(KNOX_ENV_CONFIG_TYPE);
+String atlasProxyUsers = "knox";
+if (null != knoxEnvConfig && 
knoxEnvConfig.getProperties().containsKey(KNOX_USER_CONFIG)) {
+  atlasProxyUsers = knoxEnvConfig.getProperties().get(KNOX_USER_CONFIG);
+}
+
+Map<String, String> currentAtlasApplicationProperties = 
atlasApplicationProperties.getProperties();
+currentAtlasApplicationProperties.put("atlas.proxyusers", atlasProxyUsers);
+
atlasApplicationProperties.setProperties(currentAtlasApplicationProperties);
+atlasApplicationProperties.save();
+
+outputMessage = outputMessage + MessageFormat.format("Successfully updated 
{0} config type.\n", ATLAS_APPLICATION_PROPERTIES_CONFIG_TYPE);
+return createCommandReport(0, HostRoleStatus.COMPLETED, "{}", 
outputMessage, "");
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/34dc3094/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
--
diff --git 
a/ambari-serve

ambari git commit: AMBARI-22232 : Need to add a new property to support proxy users for Atlas service. (Vishal Suvagia via mugdha)

2017-10-15 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 499fec3c1 -> df1081378


AMBARI-22232 : Need to add a new property to support proxy users for Atlas 
service. (Vishal Suvagia via mugdha)


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

Branch: refs/heads/trunk
Commit: df1081378e51c309589540673e140faaf9329ee4
Parents: 499fec3
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Sat Oct 14 16:22:31 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Mon Oct 16 11:15:23 2017 +0530

--
 .../AtlasProxyUserConfigCalculation.java|  48 +
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml |   4 +
 .../stacks/HDP/2.5/upgrades/upgrade-2.6.xml |   3 +
 .../configuration/application-properties.xml|  15 +++
 .../stacks/HDP/2.6/services/stack_advisor.py|   7 ++
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |   4 +
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml |   3 +
 .../AtlasProxyUserConfigCalculationTest.java| 108 +++
 .../stacks/2.6/common/test_stack_advisor.py |   3 +-
 9 files changed, 194 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/df108137/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
new file mode 100644
index 000..85fb200
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AtlasProxyUserConfigCalculation.java
@@ -0,0 +1,48 @@
+package org.apache.ambari.server.serveraction.upgrades;
+
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.actionmanager.HostRoleStatus;
+import org.apache.ambari.server.agent.CommandReport;
+import org.apache.ambari.server.serveraction.AbstractServerAction;
+import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.Config;
+
+import javax.inject.Inject;
+import java.text.MessageFormat;
+import java.util.Map;
+import java.util.concurrent.ConcurrentMap;
+
+public class AtlasProxyUserConfigCalculation extends 
AbstractUpgradeServerAction {
+
+  private static final String ATLAS_APPLICATION_PROPERTIES_CONFIG_TYPE = 
"application-properties";
+  private static final String KNOX_ENV_CONFIG_TYPE = "knox-env";
+  private static final String KNOX_USER_CONFIG = "knox_user";
+
+  @Override
+  public CommandReport execute(ConcurrentMap<String, Object> 
requestSharedDataContext) throws AmbariException, InterruptedException {
+String clusterName = getExecutionCommand().getClusterName();
+Cluster cluster = getClusters().getCluster(clusterName);
+String outputMessage = "";
+
+Config atlasApplicationProperties = 
cluster.getDesiredConfigByType(ATLAS_APPLICATION_PROPERTIES_CONFIG_TYPE);
+if (null == atlasApplicationProperties) {
+  return createCommandReport(0, HostRoleStatus.COMPLETED, "{}",
+MessageFormat.format("Config type {0} not found, skipping updating 
property in same.", ATLAS_APPLICATION_PROPERTIES_CONFIG_TYPE), "");
+}
+
+Config knoxEnvConfig = 
cluster.getDesiredConfigByType(KNOX_ENV_CONFIG_TYPE);
+String atlasProxyUsers = "knox";
+if (null != knoxEnvConfig && 
knoxEnvConfig.getProperties().containsKey(KNOX_USER_CONFIG)) {
+  atlasProxyUsers = knoxEnvConfig.getProperties().get(KNOX_USER_CONFIG);
+}
+
+Map<String, String> currentAtlasApplicationProperties = 
atlasApplicationProperties.getProperties();
+currentAtlasApplicationProperties.put("atlas.proxyusers", atlasProxyUsers);
+
atlasApplicationProperties.setProperties(currentAtlasApplicationProperties);
+atlasApplicationProperties.save();
+
+outputMessage = outputMessage + MessageFormat.format("Successfully updated 
{0} config type.\n", ATLAS_APPLICATION_PROPERTIES_CONFIG_TYPE);
+return createCommandReport(0, HostRoleStatus.COMPLETED, "{}", 
outputMessage, "");
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/df108137/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
--
diff --git 
a/ambari-server/sr

ambari git commit: AMBARI-22204 Updating Ranger Admin pre-upgrade task (mugdha)

2017-10-12 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 5de82da3b -> 3acfa5c12


AMBARI-22204 Updating Ranger Admin pre-upgrade task (mugdha)


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

Branch: refs/heads/trunk
Commit: 3acfa5c12708ff00c896943cd44e81b0a9ec85d1
Parents: 5de82da
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Thu Oct 12 14:26:43 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Thu Oct 12 14:35:59 2017 +0530

--
 .../0.4.0/package/scripts/ranger_admin.py   | 23 +++
 .../0.4.0/package/scripts/ranger_tagsync.py | 23 +++
 .../1.0.0.3.0/package/scripts/ranger_admin.py   | 24 +++-
 .../1.0.0.3.0/package/scripts/ranger_tagsync.py | 23 +++
 4 files changed, 75 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3acfa5c1/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
index 848b137..d0a725a 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
@@ -20,6 +20,7 @@ limitations under the License.
 from resource_management.core.exceptions import Fail
 from resource_management.libraries.functions.check_process_status import 
check_process_status
 from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions import upgrade_summary
 from resource_management.libraries.script import Script
 from resource_management.core.resources.system import Execute, File
 from resource_management.core.exceptions import ComponentIsNotRunning
@@ -199,11 +200,25 @@ class RangerAdmin(Script):
 import params
 env.set_params(params)
 
-upgrade_stack = stack_select._get_upgrade_stack()
-if upgrade_stack is None:
-  raise Fail('Unable to determine the stack and stack version')
+orchestration = stack_select.PACKAGE_SCOPE_STANDARD
+summary = upgrade_summary.get_upgrade_summary()
 
-stack_select.select_packages(params.version)
+if summary is not None:
+  orchestration = summary.orchestration
+  if orchestration is None:
+raise Fail("The upgrade summary does not contain an orchestration 
type")
+
+  if orchestration.upper() in stack_select._PARTIAL_ORCHESTRATION_SCOPES:
+orchestration = stack_select.PACKAGE_SCOPE_PATCH
+
+stack_select_packages = stack_select.get_packages(orchestration, 
service_name = "RANGER", component_name = "RANGER_ADMIN")
+if stack_select_packages is None:
+  raise Fail("Unable to get packages for stack-select")
+
+Logger.info("RANGER_ADMIN component will be stack-selected to version {0} 
using a {1} orchestration".format(params.version, orchestration.upper()))
+
+for stack_select_package_name in stack_select_packages:
+  stack_select.select(stack_select_package_name, params.version)
 
   def get_log_folder(self):
 import params

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acfa5c1/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
index 3aae8ff..b1a1819 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
@@ -19,6 +19,7 @@ limitations under the License.
 """
 from resource_management.libraries.script import Script
 from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions import upgrade_summary
 from resource_management.core.resources.system import Execute, File
 from resource_management.libraries.functions.check_process_status import 
check_process_status
 from resource_management.core.exceptions import ComponentIsNotRunning
@@ -102,11 +103,25 @@ class RangerTagsync(Script):
 import params
  

ambari git commit: AMBARI-22204 Updating Ranger Admin pre-upgrade task (mugdha)

2017-10-12 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 16ceccfa7 -> 26ff188e2


AMBARI-22204 Updating Ranger Admin pre-upgrade task (mugdha)


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

Branch: refs/heads/branch-2.6
Commit: 26ff188e2cce560fc73334c9f2d928f69b6beb2b
Parents: 16ceccf
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Thu Oct 12 14:08:27 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Thu Oct 12 14:34:35 2017 +0530

--
 .../0.4.0/package/scripts/ranger_admin.py   | 23 ++
 .../0.4.0/package/scripts/ranger_tagsync.py | 23 ++
 .../RANGER/package/scripts/ranger_admin.py  | 25 +++-
 3 files changed, 57 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/26ff188e/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
index f779c18..39dad77 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
@@ -20,6 +20,7 @@ limitations under the License.
 from resource_management.core.exceptions import Fail
 from resource_management.libraries.functions.check_process_status import 
check_process_status
 from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions import upgrade_summary
 from resource_management.libraries.functions.constants import Direction
 from resource_management.libraries.script import Script
 from resource_management.core.resources.system import Execute, File
@@ -198,11 +199,25 @@ class RangerAdmin(Script):
 import params
 env.set_params(params)
 
-upgrade_stack = stack_select._get_upgrade_stack()
-if upgrade_stack is None:
-  raise Fail('Unable to determine the stack and stack version')
+orchestration = stack_select.PACKAGE_SCOPE_STANDARD
+summary = upgrade_summary.get_upgrade_summary()
 
-stack_select.select_packages(params.version)
+if summary is not None:
+  orchestration = summary.orchestration
+  if orchestration is None:
+raise Fail("The upgrade summary does not contain an orchestration 
type")
+
+  if orchestration.upper() in stack_select._PARTIAL_ORCHESTRATION_SCOPES:
+orchestration = stack_select.PACKAGE_SCOPE_PATCH
+
+stack_select_packages = stack_select.get_packages(orchestration, 
service_name = "RANGER", component_name = "RANGER_ADMIN")
+if stack_select_packages is None:
+  raise Fail("Unable to get packages for stack-select")
+
+Logger.info("RANGER_ADMIN component will be stack-selected to version {0} 
using a {1} orchestration".format(params.version, orchestration.upper()))
+
+for stack_select_package_name in stack_select_packages:
+  stack_select.select(stack_select_package_name, params.version)
 
   def get_log_folder(self):
 import params

http://git-wip-us.apache.org/repos/asf/ambari/blob/26ff188e/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
index 74439bf..8875f7f 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
@@ -19,6 +19,7 @@ limitations under the License.
 """
 from resource_management.libraries.script import Script
 from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions import upgrade_summary
 from resource_management.core.resources.system import Execute, File
 from resource_management.libraries.functions.check_process_status import 
check_process_status
 from resource_management.core.exceptions import ComponentIsNotRunning
@@ -98,11 +99,25 @@ class RangerTagsync(Script):
 import params
 env.set_params(params)
 
-upgrade_stack = stack_select._get_upgrade_stack()

ambari git commit: AMBARI-22102 Ranger KMS should add proxy user for Spark2 user (mugdha)

2017-10-02 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 969ecfc92 -> 03696f166


AMBARI-22102 Ranger KMS should add proxy user for Spark2 user (mugdha)


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

Branch: refs/heads/trunk
Commit: 03696f16607dc84723b608a66c476ea0706bf525
Parents: 969ecfc
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Tue Oct 3 11:08:34 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Tue Oct 3 11:29:00 2017 +0530

--
 .../common-services/RANGER_KMS/1.0.0.3.0/service_advisor.py   | 3 ++-
 .../src/main/resources/stacks/HDP/2.5/services/stack_advisor.py   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/03696f16/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/service_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/service_advisor.py
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/service_advisor.py
index b81e05b..33f39b2 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/service_advisor.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/service_advisor.py
@@ -232,7 +232,8 @@ class RangerKMSRecommender(service_advisor.ServiceAdvisor):
   def recommendRangerKMSConfigurationsFromHDP25(self, configurations, 
clusterData, services, hosts):
 
 security_enabled = self.isSecurityEnabled(services)
-required_services = [{'service' : 'RANGER', 'config-type': 'ranger-env', 
'property-name': 'ranger_user', 'proxy-category': ['hosts', 'users', 'groups']}]
+required_services = [{'service' : 'RANGER', 'config-type': 'ranger-env', 
'property-name': 'ranger_user', 'proxy-category': ['hosts', 'users', 'groups']},
+{'service' : 'SPARK2', 'config-type': 'livy2-env', 
'property-name': 'livy2_user', 'proxy-category': ['hosts', 'users', 'groups']}]
 
 if security_enabled:
   # recommendations for kms proxy related properties

http://git-wip-us.apache.org/repos/asf/ambari/blob/03696f16/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index 2a5d76b..92ce9b9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -1969,7 +1969,8 @@ 
yarn.scheduler.capacity.root.{0}.maximum-am-resource-percent=1""".format(llap_qu
 super(HDP25StackAdvisor, 
self).recommendRangerKMSConfigurations(configurations, clusterData, services, 
hosts)
 
 security_enabled = self.isSecurityEnabled(services)
-required_services = [{'service' : 'RANGER', 'config-type': 'ranger-env', 
'property-name': 'ranger_user', 'proxy-category': ['hosts', 'users', 'groups']}]
+required_services = [{'service' : 'RANGER', 'config-type': 'ranger-env', 
'property-name': 'ranger_user', 'proxy-category': ['hosts', 'users', 'groups']},
+{'service' : 'SPARK2', 'config-type': 'livy2-env', 'property-name': 
'livy2_user', 'proxy-category': ['hosts', 'users', 'groups']}]
 
 if security_enabled:
   # recommendations for kms proxy related properties



ambari git commit: AMBARI-22102 Ranger KMS should add proxy user for Spark2 user (mugdha)

2017-10-02 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 504ea2aa8 -> 1ef5b391f


AMBARI-22102 Ranger KMS should add proxy user for Spark2 user (mugdha)


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

Branch: refs/heads/branch-2.6
Commit: 1ef5b391f529c5dd58556f55211e3735f1e9ace5
Parents: 504ea2a
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Tue Oct 3 10:50:53 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Tue Oct 3 11:00:01 2017 +0530

--
 .../src/main/resources/stacks/HDP/2.5/services/stack_advisor.py   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1ef5b391/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index be615db..3af05b5 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -2004,7 +2004,8 @@ 
yarn.scheduler.capacity.root.{0}.maximum-am-resource-percent=1""".format(llap_qu
 super(HDP25StackAdvisor, 
self).recommendRangerKMSConfigurations(configurations, clusterData, services, 
hosts)
 
 security_enabled = self.isSecurityEnabled(services)
-required_services = [{'service' : 'RANGER', 'config-type': 'ranger-env', 
'property-name': 'ranger_user', 'proxy-category': ['hosts', 'users', 'groups']}]
+required_services = [{'service' : 'RANGER', 'config-type': 'ranger-env', 
'property-name': 'ranger_user', 'proxy-category': ['hosts', 'users', 'groups']},
+{'service' : 'SPARK2', 'config-type': 'livy2-env', 'property-name': 
'livy2_user', 'proxy-category': ['hosts', 'users', 'groups']}]
 
 if security_enabled:
   # recommendations for kms proxy related properties



ambari git commit: AMBARI-21910 Ranger Usersync config to support nested group evaluation for LDAP Sync source property (mugdha)

2017-09-22 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk f067ec8c3 -> ea8924435


AMBARI-21910 Ranger Usersync config to support nested group evaluation for LDAP 
Sync source property (mugdha)


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

Branch: refs/heads/trunk
Commit: ea892443513fa730dad2ef3af06069ef618e0225
Parents: f067ec8
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Fri Sep 22 18:03:25 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Sep 22 18:14:00 2017 +0530

--
 .../RangerUsersyncConfigCalculation.java|  96 ++
 .../RANGER/0.7.0/configuration/ranger-env.xml   |  23 
 .../0.7.0/configuration/ranger-ugsync-site.xml  |   7 ++
 .../RANGER/0.7.0/themes/theme_version_5.json|  40 ++
 .../1.0.0.3.0/configuration/ranger-env.xml  |  23 
 .../configuration/ranger-ugsync-site.xml|   7 ++
 .../1.0.0.3.0/themes/theme_version_1.json   |  40 ++
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |   7 ++
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml |   8 ++
 .../RangerUsersyncConfigCalculationTest.java| 126 +++
 10 files changed, 377 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ea892443/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/RangerUsersyncConfigCalculation.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/RangerUsersyncConfigCalculation.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/RangerUsersyncConfigCalculation.java
new file mode 100644
index 000..3573748
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/RangerUsersyncConfigCalculation.java
@@ -0,0 +1,96 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.serveraction.upgrades;
+
+import java.text.MessageFormat;
+import java.util.Map;
+import java.util.concurrent.ConcurrentMap;
+
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.actionmanager.HostRoleStatus;
+import org.apache.ambari.server.agent.CommandReport;
+import org.apache.ambari.server.serveraction.AbstractServerAction;
+import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.Config;
+
+import com.google.inject.Inject;
+
+/**
+ * Computes Ranger Usersync ldap grouphierarchylevels property. This class is 
only used when upgrading from
+ * HDP-2.6.x to HDP-2.6.y.
+ */
+
+public class RangerUsersyncConfigCalculation extends AbstractServerAction {
+  private static final String RANGER_USERSYNC_CONFIG_TYPE = 
"ranger-ugsync-site";
+  private static final String RANGER_ENV_CONFIG_TYPE = "ranger-env";
+
+  @Inject
+  private Clusters m_clusters;
+
+  @Override
+  public CommandReport execute(ConcurrentMap<String, Object> 
requestSharedDataContext) throws AmbariException, InterruptedException {
+
+  String clusterName = getExecutionCommand().getClusterName();
+  Cluster cluster = m_clusters.getCluster(clusterName);
+  String outputMsg = "";
+
+  Config rangerUsersyncConfig = 
cluster.getDesiredConfigByType(RANGER_USERSYNC_CONFIG_TYPE);
+
+  if (null == rangerUsersyncConfig) {
+return createCommandReport(0, HostRoleStatus.COMPLETED, "{}",
+  MessageFormat.format("Config type {0} not found, skipping updating 
property in same.", RANGER_USERSYNC_CONFIG_TYPE), "");
+  }
+
+  String ldapGroupHierarchy = "0";
+
+  if 
(rangerUsersyncConfig.getProperties().containsKey("ranger.usersync.ldap.grouphierarchylevels"))
 {
+ldapGroupHierarchy = 
rangerUsersyncConfig.getPrope

ambari git commit: AMBARI-21910 Ranger Usersync config to support nested group evaluation for LDAP Sync source property (mugdha)

2017-09-22 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 29e6213d1 -> f5ec32912


AMBARI-21910 Ranger Usersync config to support nested group evaluation for LDAP 
Sync source property (mugdha)


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

Branch: refs/heads/branch-2.6
Commit: f5ec3291215aae8320f99b542be7648fec1b7fd1
Parents: 29e6213
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Fri Sep 22 17:59:51 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Sep 22 18:12:22 2017 +0530

--
 .../RangerUsersyncConfigCalculation.java|  96 ++
 .../RANGER/0.7.0/configuration/ranger-env.xml   |  23 
 .../0.7.0/configuration/ranger-ugsync-site.xml  |   7 ++
 .../RANGER/0.7.0/themes/theme_version_5.json|  40 ++
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |   7 ++
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml |   8 ++
 .../RangerUsersyncConfigCalculationTest.java| 126 +++
 7 files changed, 307 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f5ec3291/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/RangerUsersyncConfigCalculation.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/RangerUsersyncConfigCalculation.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/RangerUsersyncConfigCalculation.java
new file mode 100644
index 000..3573748
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/RangerUsersyncConfigCalculation.java
@@ -0,0 +1,96 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.serveraction.upgrades;
+
+import java.text.MessageFormat;
+import java.util.Map;
+import java.util.concurrent.ConcurrentMap;
+
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.actionmanager.HostRoleStatus;
+import org.apache.ambari.server.agent.CommandReport;
+import org.apache.ambari.server.serveraction.AbstractServerAction;
+import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.Config;
+
+import com.google.inject.Inject;
+
+/**
+ * Computes Ranger Usersync ldap grouphierarchylevels property. This class is 
only used when upgrading from
+ * HDP-2.6.x to HDP-2.6.y.
+ */
+
+public class RangerUsersyncConfigCalculation extends AbstractServerAction {
+  private static final String RANGER_USERSYNC_CONFIG_TYPE = 
"ranger-ugsync-site";
+  private static final String RANGER_ENV_CONFIG_TYPE = "ranger-env";
+
+  @Inject
+  private Clusters m_clusters;
+
+  @Override
+  public CommandReport execute(ConcurrentMap<String, Object> 
requestSharedDataContext) throws AmbariException, InterruptedException {
+
+  String clusterName = getExecutionCommand().getClusterName();
+  Cluster cluster = m_clusters.getCluster(clusterName);
+  String outputMsg = "";
+
+  Config rangerUsersyncConfig = 
cluster.getDesiredConfigByType(RANGER_USERSYNC_CONFIG_TYPE);
+
+  if (null == rangerUsersyncConfig) {
+return createCommandReport(0, HostRoleStatus.COMPLETED, "{}",
+  MessageFormat.format("Config type {0} not found, skipping updating 
property in same.", RANGER_USERSYNC_CONFIG_TYPE), "");
+  }
+
+  String ldapGroupHierarchy = "0";
+
+  if 
(rangerUsersyncConfig.getProperties().containsKey("ranger.usersync.ldap.grouphierarchylevels"))
 {
+ldapGroupHierarchy = 
rangerUsersyncConfig.getProperties().get("ranger.usersync.ldap.grouphierarchylevels");
+  } else {
+Map<String, String> targetRangerUsersyncConfig = 
ra

ambari git commit: AMBARI-21925 : Facilitate a parameter to provide HBase conf directory for atlas-env configurations. (Vishal Suvagia via mugdha)

2017-09-19 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 6cfb01f9a -> 9a11f0512


AMBARI-21925 : Facilitate a parameter to provide HBase conf directory for 
atlas-env configurations. (Vishal Suvagia via mugdha)


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

Branch: refs/heads/branch-2.6
Commit: 9a11f0512d3a97fe667e5683b5a55b9193a60abe
Parents: 6cfb01f
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Tue Sep 19 12:04:15 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Tue Sep 19 12:19:48 2017 +0530

--
 .../common-services/ATLAS/0.1.0.2.3/package/scripts/params.py  | 2 +-
 .../stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml  | 6 ++
 .../main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml  | 4 
 .../stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml | 4 
 .../src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml | 1 +
 5 files changed, 16 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9a11f051/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index 41be001..f6f678f 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -202,7 +202,7 @@ smokeuser_keytab = 
config['configurations']['cluster-env']['smokeuser_keytab']
 security_check_status_file = format('{log_dir}/security_check.status')
 
 # hbase
-hbase_conf_dir = "/etc/hbase/conf"
+hbase_conf_dir = 
default('configurations/atlas-env/atlas.hbase.conf.dir','/etc/hbase/conf')
 
 atlas_search_backend = 
default("/configurations/application-properties/atlas.graph.index.search.backend",
 "")
 search_backend_solr = atlas_search_backend.startswith('solr')

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a11f051/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
index 821fafa..b69bccd 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
@@ -44,4 +44,10 @@
 Replication factor for the atlas solr 
collections.
 
   
+  
+atlas.hbase.conf.dir
+/etc/hbase/conf
+Configurable HBase conf directory.
+
+  
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a11f051/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
index 56799a0..5b3f97d 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
@@ -208,6 +208,10 @@
 
 
   
+  
+atlas-env
+
+  
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a11f051/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
index a855dcd..535ac2e 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
@@ -375,6 +375,10 @@
 
   
 
+  
+
+  
+
   
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a11f051/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
--
diff --git 
a/ambari-serv

ambari git commit: AMBARI-21925 : Facilitate a parameter to provide HBase conf directory for atlas-env configurations. (Vishal Suvagia via mugdha)

2017-09-19 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 26965b3eb -> 1f321e356


AMBARI-21925 : Facilitate a parameter to provide HBase conf directory for 
atlas-env configurations. (Vishal Suvagia via mugdha)


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

Branch: refs/heads/trunk
Commit: 1f321e35693a1c8fe2c6c5a4ac3e1f454bf847e1
Parents: 26965b3
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Tue Sep 19 12:06:03 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Tue Sep 19 12:16:16 2017 +0530

--
 .../common-services/ATLAS/0.1.0.2.3/package/scripts/params.py  | 2 +-
 .../ATLAS/0.7.0.3.0/configuration/atlas-env.xml| 6 ++
 .../common-services/ATLAS/0.7.0.3.0/package/scripts/params.py  | 2 +-
 .../stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml  | 6 ++
 .../main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml  | 4 
 .../stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml | 4 
 .../src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml | 1 +
 7 files changed, 23 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1f321e35/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index 96041e6..968ceed 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -205,7 +205,7 @@ smokeuser_keytab = 
config['configurations']['cluster-env']['smokeuser_keytab']
 security_check_status_file = format('{log_dir}/security_check.status')
 
 # hbase
-hbase_conf_dir = "/etc/hbase/conf"
+hbase_conf_dir = 
default('configurations/atlas-env/atlas.hbase.conf.dir','/etc/hbase/conf')
 
 atlas_search_backend = 
default("/configurations/application-properties/atlas.graph.index.search.backend",
 "")
 search_backend_solr = atlas_search_backend.startswith('solr')

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f321e35/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
index f97ca98..ee8aedd 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
@@ -185,4 +185,10 @@
 Replication factor for the atlas solr 
collections.
 
   
+  
+atlas.hbase.conf.dir
+/etc/hbase/conf
+Configurable HBase conf directory.
+
+  
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f321e35/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
index 61b41d6..b01884c 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
@@ -202,7 +202,7 @@ smokeuser_keytab = 
config['configurations']['cluster-env']['smokeuser_keytab']
 security_check_status_file = format('{log_dir}/security_check.status')
 
 # hbase
-hbase_conf_dir = "/etc/hbase/conf"
+hbase_conf_dir = 
default('configurations/atlas-env/atlas.hbase.conf.dir','/etc/hbase/conf')
 
 atlas_search_backend = 
default("/configurations/application-properties/atlas.graph.index.search.backend",
 "")
 search_backend_solr = atlas_search_backend.startswith('solr')

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f321e35/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
 
b/ambari-

ambari git commit: AMBARI-21904 Remove redundant smokeuser entry from Ranger KMS Kerberos descriptor (mugdha)

2017-09-08 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk b7f53dc8c -> a05947873


AMBARI-21904 Remove redundant smokeuser entry from Ranger KMS Kerberos 
descriptor (mugdha)


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

Branch: refs/heads/trunk
Commit: a05947873b39d646575e6568e9b7cd086a10fac3
Parents: b7f53dc
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Fri Sep 8 12:08:00 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Sep 8 14:24:18 2017 +0530

--
 .../server/upgrade/UpgradeCatalog260.java   |  40 +++
 .../RANGER_KMS/0.5.0.2.3/kerberos.json  |   6 --
 .../RANGER_KMS/1.0.0.3.0/kerberos.json  |   6 --
 .../HDP/2.5/services/RANGER_KMS/kerberos.json   |   6 --
 .../server/upgrade/UpgradeCatalog260Test.java   |  53 +
 .../test_kerberos_descriptor_ranger_kms.json| 108 +++
 6 files changed, 201 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a0594787/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
index d1de998..d05f39a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
@@ -30,10 +30,17 @@ import javax.persistence.Query;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.orm.DBAccessor;
+import org.apache.ambari.server.orm.dao.ArtifactDAO;
+import org.apache.ambari.server.orm.entities.ArtifactEntity;
 import org.apache.ambari.server.orm.entities.ClusterConfigEntity;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.Config;
+import org.apache.ambari.server.state.kerberos.KerberosComponentDescriptor;
+import org.apache.ambari.server.state.kerberos.KerberosDescriptor;
+import org.apache.ambari.server.state.kerberos.KerberosDescriptorFactory;
+import org.apache.ambari.server.state.kerberos.KerberosIdentityDescriptor;
+import org.apache.ambari.server.state.kerberos.KerberosServiceDescriptor;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -387,6 +394,7 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
 setUnmappedForOrphanedConfigs();
 removeSupersetFromDruid();
 ensureZeppelinProxyUserConfigs();
+updateKerberosDescriptorArtifacts();
   }
 
   public int getCurrentVersionID() throws AmbariException, SQLException {
@@ -495,4 +503,36 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
   }
 }
   }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  protected void updateKerberosDescriptorArtifact(ArtifactDAO artifactDAO, 
ArtifactEntity artifactEntity) throws AmbariException {
+if (artifactEntity != null) {
+  Map<String, Object> data = artifactEntity.getArtifactData();
+  if (data != null) {
+final KerberosDescriptor kerberosDescriptor = new 
KerberosDescriptorFactory().createInstance(data);
+if (kerberosDescriptor != null) {
+  KerberosServiceDescriptor rangerKmsServiceDescriptor = 
kerberosDescriptor.getService("RANGER_KMS");
+  if (rangerKmsServiceDescriptor != null) {
+
+KerberosIdentityDescriptor rangerKmsServiceIdentity = 
rangerKmsServiceDescriptor.getIdentity("/smokeuser");
+if (rangerKmsServiceIdentity != null) {
+  rangerKmsServiceDescriptor.removeIdentity("/smokeuser");
+}
+KerberosComponentDescriptor rangerKmscomponentDescriptor = 
rangerKmsServiceDescriptor.getComponent("RANGER_KMS_SERVER");
+if (rangerKmscomponentDescriptor != null) {
+  KerberosIdentityDescriptor rangerKmsComponentIdentity = 
rangerKmscomponentDescriptor.getIdentity("/smokeuser");
+  if (rangerKmsComponentIdentity != null) {
+rangerKmscomponentDescriptor.removeIdentity("/smokeuser");
+  }
+}
+  }
+  artifactEntity.setArtifactData(kerberosDescriptor.toMap());
+  artifactDAO.merge(artifactEntity);
+}
+  }
+}
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a0594787/am

ambari git commit: AMBARI-21889 MaxBackupIndex does not work with DailyRollingFileAppender in Ranger (mugdha)

2017-09-08 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 2ece0b331 -> b7f53dc8c


AMBARI-21889 MaxBackupIndex does not work with DailyRollingFileAppender in 
Ranger (mugdha)


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

Branch: refs/heads/trunk
Commit: b7f53dc8c516ba148cdb59577baf3db9b29d538b
Parents: 2ece0b3
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Fri Sep 8 14:03:02 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Sep 8 14:23:12 2017 +0530

--
 .../RANGER/0.6.0/configuration/admin-log4j.xml |  1 -
 .../RANGER/0.6.0/configuration/tagsync-log4j.xml   |  3 +--
 .../RANGER/0.6.0/configuration/usersync-log4j.xml  |  3 +--
 .../RANGER/1.0.0.3.0/configuration/admin-log4j.xml |  1 -
 .../RANGER/1.0.0.3.0/configuration/tagsync-log4j.xml   |  3 +--
 .../RANGER/1.0.0.3.0/configuration/usersync-log4j.xml  |  3 +--
 .../RANGER_KMS/0.5.0.2.3/configuration/kms-log4j.xml   |  6 ++
 .../RANGER_KMS/1.0.0.3.0/configuration/kms-log4j.xml   |  6 ++
 .../stacks/HDP/2.3/upgrades/config-upgrade.xml |  6 ++
 .../stacks/HDP/2.4/upgrades/config-upgrade.xml |  6 ++
 .../stacks/HDP/2.5/upgrades/config-upgrade.xml | 13 -
 11 files changed, 16 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b7f53dc8/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/admin-log4j.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/admin-log4j.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/admin-log4j.xml
index 6108c36..01f4c39 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/admin-log4j.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/admin-log4j.xml
@@ -75,7 +75,6 @@ log4j.appender.xa_log_appender.append=true
 log4j.appender.xa_log_appender.layout=org.apache.log4j.PatternLayout
 log4j.appender.xa_log_appender.layout.ConversionPattern=%d [%t] %-5p %C{6} 
(%F:%L) - %m%n
 log4j.appender.xa_log_appender.MaxFileSize={{ranger_xa_log_maxfilesize}}MB
-log4j.appender.xa_log_appender.MaxBackupIndex={{ranger_xa_log_maxbackupindex}}
 
 # xa_log_appender : category and additivity
 log4j.category.org.springframework=warn,xa_log_appender

http://git-wip-us.apache.org/repos/asf/ambari/blob/b7f53dc8/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/tagsync-log4j.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/tagsync-log4j.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/tagsync-log4j.xml
index 6384302..e84aa87 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/tagsync-log4j.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/tagsync-log4j.xml
@@ -71,8 +71,7 @@ 
log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
 log4j.appender.logFile.file=${logdir}/tagsync.log
 log4j.appender.logFile.datePattern='.'-MM-dd
 log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.logFile.MaxFileSize = {{ranger_tagsync_log_maxfilesize}}MB
-log4j.appender.logFile.MaxBackupIndex = 
{{ranger_tagsync_log_number_of_backup_files}}
+log4j.appender.logFile.MaxFileSize={{ranger_tagsync_log_maxfilesize}}MB
 log4j.appender.logFile.layout.ConversionPattern=%d{dd MMM  HH:mm:ss} %5p 
%c{1} [%t] - %L %m%n
 
 # console

http://git-wip-us.apache.org/repos/asf/ambari/blob/b7f53dc8/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/usersync-log4j.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/usersync-log4j.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/usersync-log4j.xml
index 8843a2a..04297ab 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/usersync-log4j.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/usersync-log4j.xml
@@ -71,8 +71,7 @@ log4j.appender.logFile.file=${logdir}/usersync.log
 log4j.appender.logFile.datePattern='.'-MM-dd
 log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
 log4j.appender.logFile.layout.ConversionPattern=%d{dd MMM  HH:mm:ss} %5p 
%c

ambari git commit: AMBARI-21904 Remove redundant smokeuser entry from Ranger KMS Kerberos descriptor (mugdha)

2017-09-08 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 af16726a9 -> 77786e4c7


AMBARI-21904 Remove redundant smokeuser entry from Ranger KMS Kerberos 
descriptor (mugdha)


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

Branch: refs/heads/branch-2.6
Commit: 77786e4c74b1d43fc1449a1eb93262ef45ff757d
Parents: af16726
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Fri Sep 8 12:13:43 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Sep 8 14:19:41 2017 +0530

--
 .../server/upgrade/UpgradeCatalog260.java   |  40 +++
 .../RANGER_KMS/0.5.0.2.3/kerberos.json  |   6 --
 .../HDP/2.5/services/RANGER_KMS/kerberos.json   |   6 --
 .../server/upgrade/UpgradeCatalog260Test.java   |  53 +
 .../test_kerberos_descriptor_ranger_kms.json| 108 +++
 5 files changed, 201 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/77786e4c/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
index 07ae0c2..9e145c0 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
@@ -28,10 +28,17 @@ import javax.persistence.Query;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.orm.DBAccessor;
+import org.apache.ambari.server.orm.dao.ArtifactDAO;
+import org.apache.ambari.server.orm.entities.ArtifactEntity;
 import org.apache.ambari.server.orm.entities.ClusterConfigEntity;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.Config;
+import org.apache.ambari.server.state.kerberos.KerberosComponentDescriptor;
+import org.apache.ambari.server.state.kerberos.KerberosDescriptor;
+import org.apache.ambari.server.state.kerberos.KerberosDescriptorFactory;
+import org.apache.ambari.server.state.kerberos.KerberosIdentityDescriptor;
+import org.apache.ambari.server.state.kerberos.KerberosServiceDescriptor;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -386,6 +393,7 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
 setUnmappedForOrphanedConfigs();
 removeSupersetFromDruid();
 ensureZeppelinProxyUserConfigs();
+updateKerberosDescriptorArtifacts();
   }
 
   /**
@@ -505,4 +513,36 @@ public class UpgradeCatalog260 extends 
AbstractUpgradeCatalog {
   }
 }
   }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  protected void updateKerberosDescriptorArtifact(ArtifactDAO artifactDAO, 
ArtifactEntity artifactEntity) throws AmbariException {
+if (artifactEntity != null) {
+  Map<String, Object> data = artifactEntity.getArtifactData();
+  if (data != null) {
+final KerberosDescriptor kerberosDescriptor = new 
KerberosDescriptorFactory().createInstance(data);
+if (kerberosDescriptor != null) {
+  KerberosServiceDescriptor rangerKmsServiceDescriptor = 
kerberosDescriptor.getService("RANGER_KMS");
+  if (rangerKmsServiceDescriptor != null) {
+
+KerberosIdentityDescriptor rangerKmsServiceIdentity = 
rangerKmsServiceDescriptor.getIdentity("/smokeuser");
+if (rangerKmsServiceIdentity != null) {
+  rangerKmsServiceDescriptor.removeIdentity("/smokeuser");
+}
+KerberosComponentDescriptor rangerKmscomponentDescriptor = 
rangerKmsServiceDescriptor.getComponent("RANGER_KMS_SERVER");
+if (rangerKmscomponentDescriptor != null) {
+  KerberosIdentityDescriptor rangerKmsComponentIdentity = 
rangerKmscomponentDescriptor.getIdentity("/smokeuser");
+  if (rangerKmsComponentIdentity != null) {
+rangerKmscomponentDescriptor.removeIdentity("/smokeuser");
+  }
+}
+  }
+  artifactEntity.setArtifactData(kerberosDescriptor.toMap());
+  artifactDAO.merge(artifactEntity);
+}
+  }
+}
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/77786e4c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/kerberos.json
--
di

ambari git commit: AMBARI-21889 MaxBackupIndex does not work with DailyRollingFileAppender in Ranger (mugdha)

2017-09-08 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 c94611285 -> af16726a9


AMBARI-21889 MaxBackupIndex does not work with DailyRollingFileAppender in 
Ranger (mugdha)


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

Branch: refs/heads/branch-2.6
Commit: af16726a920ec2d540e817d7c11546ebe824ac2d
Parents: c946112
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Fri Sep 8 14:01:55 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Sep 8 14:17:20 2017 +0530

--
 .../RANGER/0.6.0/configuration/admin-log4j.xml |  1 -
 .../RANGER/0.6.0/configuration/tagsync-log4j.xml   |  3 +--
 .../RANGER/0.6.0/configuration/usersync-log4j.xml  |  3 +--
 .../RANGER_KMS/0.5.0.2.3/configuration/kms-log4j.xml   |  6 ++
 .../BigInsights/4.2.5/upgrades/config-upgrade.xml  | 13 -
 .../stacks/BigInsights/4.2/upgrades/config-upgrade.xml |  6 ++
 .../stacks/HDP/2.3/upgrades/config-upgrade.xml |  6 ++
 .../stacks/HDP/2.4/upgrades/config-upgrade.xml |  6 ++
 .../stacks/HDP/2.5/upgrades/config-upgrade.xml | 13 -
 9 files changed, 18 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/af16726a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/admin-log4j.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/admin-log4j.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/admin-log4j.xml
index 6108c36..01f4c39 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/admin-log4j.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/admin-log4j.xml
@@ -75,7 +75,6 @@ log4j.appender.xa_log_appender.append=true
 log4j.appender.xa_log_appender.layout=org.apache.log4j.PatternLayout
 log4j.appender.xa_log_appender.layout.ConversionPattern=%d [%t] %-5p %C{6} 
(%F:%L) - %m%n
 log4j.appender.xa_log_appender.MaxFileSize={{ranger_xa_log_maxfilesize}}MB
-log4j.appender.xa_log_appender.MaxBackupIndex={{ranger_xa_log_maxbackupindex}}
 
 # xa_log_appender : category and additivity
 log4j.category.org.springframework=warn,xa_log_appender

http://git-wip-us.apache.org/repos/asf/ambari/blob/af16726a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/tagsync-log4j.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/tagsync-log4j.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/tagsync-log4j.xml
index 6384302..e84aa87 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/tagsync-log4j.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/tagsync-log4j.xml
@@ -71,8 +71,7 @@ 
log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
 log4j.appender.logFile.file=${logdir}/tagsync.log
 log4j.appender.logFile.datePattern='.'-MM-dd
 log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.logFile.MaxFileSize = {{ranger_tagsync_log_maxfilesize}}MB
-log4j.appender.logFile.MaxBackupIndex = 
{{ranger_tagsync_log_number_of_backup_files}}
+log4j.appender.logFile.MaxFileSize={{ranger_tagsync_log_maxfilesize}}MB
 log4j.appender.logFile.layout.ConversionPattern=%d{dd MMM  HH:mm:ss} %5p 
%c{1} [%t] - %L %m%n
 
 # console

http://git-wip-us.apache.org/repos/asf/ambari/blob/af16726a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/usersync-log4j.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/usersync-log4j.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/usersync-log4j.xml
index 8843a2a..04297ab 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/usersync-log4j.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/configuration/usersync-log4j.xml
@@ -71,8 +71,7 @@ log4j.appender.logFile.file=${logdir}/usersync.log
 log4j.appender.logFile.datePattern='.'-MM-dd
 log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
 log4j.appender.logFile.layout.ConversionPattern=%d{dd MMM  HH:mm:ss} %5p 
%c{1} [%t] - %m%n
-log4j.appender.logFile.MaxFileSize = {{ranger_usersync_log_maxfilesize}}MB
-log4j.appender.logFile

ambari git commit: AMBARI-21743 Delete ranger-solr-plugin-enabled property during Cross Stack Upgrade (mugdha)

2017-08-17 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 ba9ab71ed -> a3b566f06


AMBARI-21743 Delete ranger-solr-plugin-enabled property during Cross Stack 
Upgrade (mugdha)


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

Branch: refs/heads/branch-2.6
Commit: a3b566f062613e6abb57cc8e6ddde0463958ba6c
Parents: ba9ab71
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Thu Aug 17 17:06:39 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Thu Aug 17 19:08:29 2017 +0530

--
 .../stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml | 4 
 .../BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml | 4 
 2 files changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a3b566f0/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml
 
b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml
index 6ed6a11..f55f9fb 100644
--- 
a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml
+++ 
b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml
@@ -156,6 +156,10 @@
 ranger-env
 
   
+  
+ranger-env
+
+  
   
 admin-log4j
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a3b566f0/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
 
b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
index ed6346d..48d1d92 100644
--- 
a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
+++ 
b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
@@ -294,6 +294,10 @@
 
   
 
+  
+
+  
+
   
 
   Updating the Ranger admin Log4J properties to include 
parameterizations



ambari git commit: AMBARI-21743 Delete ranger-solr-plugin-enabled property during Cross Stack Upgrade (mugdha)

2017-08-17 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 52daee8fa -> dae9c5d53


AMBARI-21743 Delete ranger-solr-plugin-enabled property during Cross Stack 
Upgrade (mugdha)


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

Branch: refs/heads/branch-2.5
Commit: dae9c5d533b71bdfdd9652a9257fa98657e45cde
Parents: 52daee8
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Thu Aug 17 17:06:39 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Thu Aug 17 19:06:03 2017 +0530

--
 .../stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml | 4 
 .../BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml | 4 
 2 files changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/dae9c5d5/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml
 
b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml
index 6ed6a11..f55f9fb 100644
--- 
a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml
+++ 
b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml
@@ -156,6 +156,10 @@
 ranger-env
 
   
+  
+ranger-env
+
+  
   
 admin-log4j
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/dae9c5d5/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
 
b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
index e5f3690..83968e0 100644
--- 
a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
+++ 
b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
@@ -294,6 +294,10 @@
 
   
 
+  
+
+  
+
   
 
   Updating the Ranger admin Log4J properties to include 
parameterizations



ambari git commit: AMBARI-21649 : Update Atlas log4j to reflect latest configurations (Vishal Suvagia via mugdha)

2017-08-10 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 abcf1ce86 -> 6ddd4ac76


AMBARI-21649 : Update Atlas log4j to reflect latest configurations (Vishal 
Suvagia via mugdha)


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

Branch: refs/heads/branch-2.6
Commit: 6ddd4ac76f426e31386822b37b20ec3fa7b133e5
Parents: abcf1ce
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Wed Aug 9 14:02:05 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Aug 11 10:31:08 2017 +0530

--
 .../resources/stacks/HDP/2.5/upgrades/config-upgrade.xml  | 10 --
 .../stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml|  4 
 .../resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml |  1 +
 .../HDP/2.6/services/ATLAS/configuration/atlas-log4j.xml  |  4 ++--
 .../resources/stacks/HDP/2.6/upgrades/config-upgrade.xml  |  5 +
 .../stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml|  4 
 .../resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml |  1 +
 7 files changed, 25 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6ddd4ac7/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
index f227bac..8664584 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
@@ -104,8 +104,8 @@
 atlas-log4j
 
 
-
-
+
+
   
 
   
@@ -127,6 +127,12 @@
 application-properties
 
   
+
+  
+atlas-log4j
+
+
+  
 
   
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/6ddd4ac7/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
index 1697604..7074e77 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
@@ -476,6 +476,10 @@
 
   
 
+  
+
+  
+
   
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6ddd4ac7/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
index 840b17d..995a1d3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
@@ -1102,6 +1102,7 @@
   
   
   
+  
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6ddd4ac7/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-log4j.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-log4j.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-log4j.xml
index 9e3abcf..8b5cad5 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-log4j.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-log4j.xml
@@ -74,7 +74,7 @@
 
   
 
-  
+  
 
 
 
@@ -116,7 +116,7 @@
 
 
   
-
+
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6ddd4ac7/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
index c2c1532..a874fa7 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
+++ 
b/ambari-server/src/main/resources

ambari git commit: AMBARI-21649 : Update Atlas log4j to reflect latest configurations (Vishal Suvagia via mugdha)

2017-08-10 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 86c7f92c3 -> faf5d9079


AMBARI-21649 : Update Atlas log4j to reflect latest configurations (Vishal 
Suvagia via mugdha)


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

Branch: refs/heads/trunk
Commit: faf5d90799deee6509b1398f762616219e241f68
Parents: 86c7f92
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Thu Aug 10 11:02:38 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Aug 11 10:24:42 2017 +0530

--
 .../ATLAS/0.7.0.3.0/configuration/atlas-log4j.xml |  4 ++--
 .../resources/stacks/HDP/2.5/upgrades/config-upgrade.xml  | 10 --
 .../stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml|  4 
 .../resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml |  1 +
 .../HDP/2.6/services/ATLAS/configuration/atlas-log4j.xml  |  4 ++--
 .../resources/stacks/HDP/2.6/upgrades/config-upgrade.xml  |  5 +
 .../stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml|  4 
 .../resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml |  1 +
 8 files changed, 27 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/faf5d907/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-log4j.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-log4j.xml
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-log4j.xml
index bafd47d..b9c8127 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-log4j.xml
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-log4j.xml
@@ -88,7 +88,7 @@
 
   
 
-  
+  
 
 
 
@@ -130,7 +130,7 @@
 
 
   
-
+
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/faf5d907/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
index ec6ee55..f89654e 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
@@ -134,8 +134,8 @@
 atlas-log4j
 
 
-
-
+
+
   
 
   
@@ -157,6 +157,12 @@
 application-properties
 
   
+
+  
+atlas-log4j
+
+
+  
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/faf5d907/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
index e9490b2..492c308 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
@@ -479,6 +479,10 @@
 
   
 
+  
+
+  
+
   
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/faf5d907/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
index 840b17d..995a1d3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
@@ -1102,6 +1102,7 @@
   
   
   
+  
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/faf5d907/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-log4j.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-log4j.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-log4j.xml
index 9e3abcf..8b5cad5 100644
--- 

ambari git commit: AMBARI-21690 Updating get_stack_version pattern match (mugdha)

2017-08-10 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 601cd7dae -> abcf1ce86


AMBARI-21690 Updating get_stack_version pattern match (mugdha)


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

Branch: refs/heads/branch-2.6
Commit: abcf1ce8619bb0459c633f63fc2e2edaa7f04f64
Parents: 601cd7d
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Thu Aug 10 11:57:28 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Aug 11 09:59:07 2017 +0530

--
 .../resource_management/libraries/functions/get_stack_version.py   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/abcf1ce8/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
index 7274a59..463d61f 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
@@ -85,7 +85,7 @@ def get_stack_version(package_name):
 
   stack_version = re.sub(package_name + ' - ', '', stack_output)
   stack_version = stack_version.rstrip()
-  match = re.match('[0-9]+.[0-9]+.[0-9]+.[0-9]+-[0-9]+', stack_version)
+  match = re.match('[0-9]+.[0-9]+.[0-9]+.[0-9]+(-[0-9]+)?', stack_version)
 
   if match is None:
 Logger.info('Failed to get extracted version with ' + stack_selector_path)



ambari git commit: AMBARI-21690 Updating get_stack_version pattern match (mugdha)

2017-08-10 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 bf51a82c9 -> ee87b6ab6


AMBARI-21690 Updating get_stack_version pattern match (mugdha)


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

Branch: refs/heads/branch-2.5
Commit: ee87b6ab60edc43ef94a404ae2ab72da42f3549f
Parents: bf51a82
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Thu Aug 10 11:57:28 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Aug 11 09:56:53 2017 +0530

--
 .../resource_management/libraries/functions/get_stack_version.py   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ee87b6ab/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
index 7274a59..463d61f 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
@@ -85,7 +85,7 @@ def get_stack_version(package_name):
 
   stack_version = re.sub(package_name + ' - ', '', stack_output)
   stack_version = stack_version.rstrip()
-  match = re.match('[0-9]+.[0-9]+.[0-9]+.[0-9]+-[0-9]+', stack_version)
+  match = re.match('[0-9]+.[0-9]+.[0-9]+.[0-9]+(-[0-9]+)?', stack_version)
 
   if match is None:
 Logger.info('Failed to get extracted version with ' + stack_selector_path)



ambari git commit: AMBARI-21650: Ranger Usersync process starts with older stack script during cross stack upgrade (mugdha)

2017-08-04 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 14da3cad8 -> 328735d6e


AMBARI-21650: Ranger Usersync process starts with older stack script during 
cross stack upgrade (mugdha)


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

Branch: refs/heads/branch-2.6
Commit: 328735d6e061ac657030d84201a09bb0d0c2495d
Parents: 14da3ca
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Thu Aug 3 17:23:33 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Aug 4 12:10:30 2017 +0530

--
 .../RANGER/0.4.0/package/scripts/setup_ranger_xml.py   | 6 ++
 1 file changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/328735d6/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
index 2fa7b2f..35a0363 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
@@ -527,6 +527,12 @@ def setup_usersync(upgrade_type=None):
 mode = 0755,
   )
 
+  if upgrade_type is not None and params.stack_supports_config_versioning:
+if os.path.islink('/usr/bin/ranger-usersync'):
+  Link('/usr/bin/ranger-usersync', action="delete")
+
+Link('/usr/bin/ranger-usersync', to=params.usersync_services_file)
+
   Execute(('ln','-sf', 
format('{usersync_services_file}'),'/usr/bin/ranger-usersync'),
 not_if=format("ls /usr/bin/ranger-usersync"),
 only_if=format("ls {usersync_services_file}"),



ambari git commit: AMBARI-21650: Ranger Usersync process starts with older stack script during cross stack upgrade (mugdha)

2017-08-04 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk b487b450a -> a5b8045df


AMBARI-21650: Ranger Usersync process starts with older stack script during 
cross stack upgrade (mugdha)


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

Branch: refs/heads/trunk
Commit: a5b8045dfbc7e8c30fc8b0d23d38ef86243c016a
Parents: b487b45
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Thu Aug 3 17:23:33 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Aug 4 11:40:15 2017 +0530

--
 .../RANGER/0.4.0/package/scripts/setup_ranger_xml.py   | 6 ++
 1 file changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a5b8045d/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
index 4bcf9b0..9b1f6e2 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
@@ -551,6 +551,12 @@ def setup_usersync(upgrade_type=None):
 mode = 0755,
   )
 
+  if upgrade_type is not None and params.stack_supports_config_versioning:
+if os.path.islink('/usr/bin/ranger-usersync'):
+  Link('/usr/bin/ranger-usersync', action="delete")
+
+Link('/usr/bin/ranger-usersync', to=params.usersync_services_file)
+
   Execute(('ln','-sf', 
format('{usersync_services_file}'),'/usr/bin/ranger-usersync'),
 not_if=format("ls /usr/bin/ranger-usersync"),
 only_if=format("ls {usersync_services_file}"),



ambari git commit: AMBARI-21650: Ranger Usersync process starts with older stack script during cross stack upgrade (mugdha)

2017-08-04 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 a43a9564c -> 20039679d


AMBARI-21650: Ranger Usersync process starts with older stack script during 
cross stack upgrade (mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 20039679dfb027c95d92407f6528a88bd2571488
Parents: a43a956
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Thu Aug 3 17:23:33 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Aug 4 11:38:22 2017 +0530

--
 .../RANGER/0.4.0/package/scripts/setup_ranger_xml.py   | 6 ++
 1 file changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/20039679/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
index 2fa7b2f..35a0363 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
@@ -527,6 +527,12 @@ def setup_usersync(upgrade_type=None):
 mode = 0755,
   )
 
+  if upgrade_type is not None and params.stack_supports_config_versioning:
+if os.path.islink('/usr/bin/ranger-usersync'):
+  Link('/usr/bin/ranger-usersync', action="delete")
+
+Link('/usr/bin/ranger-usersync', to=params.usersync_services_file)
+
   Execute(('ln','-sf', 
format('{usersync_services_file}'),'/usr/bin/ranger-usersync'),
 not_if=format("ls /usr/bin/ranger-usersync"),
 only_if=format("ls {usersync_services_file}"),



ambari git commit: AMBARI-21635 Show Audit to DB removal pre-check message during cross stack upgrade (mugdha)

2017-08-02 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 266deaf1d -> d322f9d7b


AMBARI-21635 Show Audit to DB removal pre-check message during cross stack 
upgrade (mugdha)


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

Branch: refs/heads/branch-2.5
Commit: d322f9d7b206b8f26479965f72aed52b4e6f2dd5
Parents: 266deaf
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Wed Aug 2 10:33:42 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Thu Aug 3 10:36:27 2017 +0530

--
 .../4.0/properties/stack_features.json  | 31 ++--
 .../BigInsights/4.2/upgrades/config-upgrade.xml |  6 
 .../upgrades/nonrolling-upgrade-to-hdp-2.6.xml  |  6 +---
 3 files changed, 29 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d322f9d7/ambari-server/src/main/resources/stacks/BigInsights/4.0/properties/stack_features.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/BigInsights/4.0/properties/stack_features.json
 
b/ambari-server/src/main/resources/stacks/BigInsights/4.0/properties/stack_features.json
index a6672e4..bf00f13 100755
--- 
a/ambari-server/src/main/resources/stacks/BigInsights/4.0/properties/stack_features.json
+++ 
b/ambari-server/src/main/resources/stacks/BigInsights/4.0/properties/stack_features.json
@@ -95,7 +95,7 @@
   {
 "name": "ranger_usersync_non_root",
 "description": "Ranger Usersync as non-root user (AMBARI-10416)",
-"min_version": "4.1.0.0"
+"min_version": "4.2.0.0"
   },
   {
 "name": "ranger_audit_db_support",
@@ -185,8 +185,8 @@
 "min_version": "4.2.5.0"
   },
   {
-"name": "ranger_install_logsearch_client",
-"description": "LogSearch Service support",
+"name": "ranger_install_infra_client",
+"description": "Ambari Infra Service support",
 "min_version": "4.2.5.0"
   },
   {
@@ -208,6 +208,31 @@
 "name": "ranger_kms_pid_support",
 "description": "Ranger KMS Service support pid generation",
 "min_version": "4.2.5.0"
+  },
+  {
+"name": "ranger_admin_password_change",
+"description": "Allow ranger admin credentials to be specified during 
cluster creation (AMBARI-17000)",
+"min_version": "4.2.5.0"
+  },
+  {
+"name": "ranger_hive_plugin_jdbc_url",
+"description": "Handle Ranger hive repo config jdbc url change for 
stack 2.5 (AMBARI-18386)",
+"min_version": "4.2.5.0"
+  },
+  {
+"name": "ranger_xml_configuration",
+"description": "Ranger code base support xml configurations",
+"min_version": "4.2.0.0"
+  },
+  {
+"name": "kafka_ranger_plugin_support",
+"description": "Ambari stack changes for Ranger Kafka Plugin 
(AMBARI-11299)",
+"min_version": "4.2.0.0"
+  },
+  {
+"name": "yarn_ranger_plugin_support",
+"description": "Implement Stack changes for Ranger Yarn Plugin 
integration (AMBARI-10866)",
+"min_version": "4.2.0.0"
   }
 ]
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/d322f9d7/ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/config-upgrade.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/config-upgrade.xml
 
b/ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/config-upgrade.xml
index f544e10..566bcd6 100644
--- 
a/ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/config-upgrade.xml
+++ 
b/ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/config-upgrade.xml
@@ -51,12 +51,6 @@
 
   
 
-  
-ranger-env
-
-  
-
   
 ranger-env
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d322f9d7/ambari-server/src/main/resources/stacks/BigInsi

ambari git commit: AMBARI-21588: MetadataServer start fails if Atlas service is started with custom service user (Vishal Suvagia via mugdha)

2017-07-28 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 2bd4803c4 -> 5a99ce771


AMBARI-21588: MetadataServer start fails if Atlas service is started with 
custom service user (Vishal Suvagia via mugdha)


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

Branch: refs/heads/trunk
Commit: 5a99ce77179a8c0ed3c34166798537901fea3f1e
Parents: 2bd4803
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Fri Jul 28 18:40:11 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Jul 28 20:26:36 2017 +0530

--
 .../ATLAS/0.1.0.2.3/package/scripts/metadata.py| 6 ++
 .../src/test/python/stacks/2.3/ATLAS/test_metadata_server.py   | 6 +++---
 .../src/test/python/stacks/2.5/ATLAS/test_atlas_server.py  | 2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5a99ce77/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
index 74b1688..e1247d4 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
@@ -214,6 +214,12 @@ def metadata(type='server'):
 mode=0644
   )
 
+Directory(format('{metadata_home}/'),
+  owner = params.metadata_user,
+  group = params.user_group,
+  recursive_ownership = True,
+)
+
 def upload_conf_set(config_set, jaasFile):
   import params
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5a99ce77/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py 
b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
index d1d8b7f..5d99867 100644
--- a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
+++ b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
@@ -334,7 +334,7 @@ class TestMetadataServer(RMFTestCase):
   content=Template("atlas_hbase_setup.rb.j2"))
 
 self.assertResourceCalled('File', 
str(self.conf_dir+"/hdfs-site.xml"),action = ['delete'],)
-
+self.assertResourceCalled('Directory',self.stack_root + 
'/current/atlas-server/', owner = 'atlas', group = 'hadoop', 
recursive_ownership = True, )
 self.assertNoMoreResources()
 
   def test_configure_secure(self):
@@ -355,7 +355,7 @@ class TestMetadataServer(RMFTestCase):
 
 self.assertResourceCalled('File', 
str(self.conf_dir+"/hdfs-site.xml"),action = ['delete'],)
 
-
+self.assertResourceCalled('Directory',self.stack_root + 
'/current/atlas-server/', owner = 'atlas', group = 'hadoop', 
recursive_ownership = True, )
 self.assertNoMoreResources()
 
   def test_start_default(self):
@@ -374,7 +374,7 @@ class TestMetadataServer(RMFTestCase):
   content=Template("atlas_hbase_setup.rb.j2"))
 
 self.assertResourceCalled('File', 
str(self.conf_dir+"/hdfs-site.xml"),action = ['delete'],)
-
+self.assertResourceCalled('Directory',self.stack_root + 
'/current/atlas-server/', owner = 'atlas', group = 'hadoop', 
recursive_ownership = True, )
 
 self.assertResourceCalled('Execute', 'source {0}/atlas-env.sh ; 
{1}/current/atlas-server/bin/atlas_start.py'.format(self.conf_dir,self.stack_root),
   not_if = 'ls /var/run/atlas/atlas.pid >/dev/null 
2>&1 && ps -p `cat /var/run/atlas/atlas.pid` >/dev/null 2>&1',

http://git-wip-us.apache.org/repos/asf/ambari/blob/5a99ce77/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py 
b/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
index 539bef5..0d5eb2a 100644
--- a/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
+++ b/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
@@ -182,5 +182,5 @@ class TestAtlasServer(RMFTestCase):
   content=Template("atlas_hbase_setup.rb.j2"))
 
 

ambari git commit: AMBARI-21588: MetadataServer start fails if Atlas service is started with custom service user (Vishal Suvagia via mugdha)

2017-07-28 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 0a78ceab8 -> b1438eea9


AMBARI-21588: MetadataServer start fails if Atlas service is started with 
custom service user (Vishal Suvagia via mugdha)


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

Branch: refs/heads/branch-2.5
Commit: b1438eea9a67eb0284c43c18e86176fbda084c58
Parents: 0a78cea
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Fri Jul 28 18:40:11 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Jul 28 20:25:22 2017 +0530

--
 .../ATLAS/0.1.0.2.3/package/scripts/metadata.py| 6 ++
 .../src/test/python/stacks/2.3/ATLAS/test_metadata_server.py   | 6 +++---
 .../src/test/python/stacks/2.5/ATLAS/test_atlas_server.py  | 2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b1438eea/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
index 6b5f562..0305b82 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
@@ -214,6 +214,12 @@ def metadata(type='server'):
 mode=0644
   )
 
+Directory(format('{metadata_home}/'),
+  owner = params.metadata_user,
+  group = params.user_group,
+  recursive_ownership = True,
+)
+
 def upload_conf_set(config_set, jaasFile):
   import params
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b1438eea/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py 
b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
index d1d8b7f..5d99867 100644
--- a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
+++ b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
@@ -334,7 +334,7 @@ class TestMetadataServer(RMFTestCase):
   content=Template("atlas_hbase_setup.rb.j2"))
 
 self.assertResourceCalled('File', 
str(self.conf_dir+"/hdfs-site.xml"),action = ['delete'],)
-
+self.assertResourceCalled('Directory',self.stack_root + 
'/current/atlas-server/', owner = 'atlas', group = 'hadoop', 
recursive_ownership = True, )
 self.assertNoMoreResources()
 
   def test_configure_secure(self):
@@ -355,7 +355,7 @@ class TestMetadataServer(RMFTestCase):
 
 self.assertResourceCalled('File', 
str(self.conf_dir+"/hdfs-site.xml"),action = ['delete'],)
 
-
+self.assertResourceCalled('Directory',self.stack_root + 
'/current/atlas-server/', owner = 'atlas', group = 'hadoop', 
recursive_ownership = True, )
 self.assertNoMoreResources()
 
   def test_start_default(self):
@@ -374,7 +374,7 @@ class TestMetadataServer(RMFTestCase):
   content=Template("atlas_hbase_setup.rb.j2"))
 
 self.assertResourceCalled('File', 
str(self.conf_dir+"/hdfs-site.xml"),action = ['delete'],)
-
+self.assertResourceCalled('Directory',self.stack_root + 
'/current/atlas-server/', owner = 'atlas', group = 'hadoop', 
recursive_ownership = True, )
 
 self.assertResourceCalled('Execute', 'source {0}/atlas-env.sh ; 
{1}/current/atlas-server/bin/atlas_start.py'.format(self.conf_dir,self.stack_root),
   not_if = 'ls /var/run/atlas/atlas.pid >/dev/null 
2>&1 && ps -p `cat /var/run/atlas/atlas.pid` >/dev/null 2>&1',

http://git-wip-us.apache.org/repos/asf/ambari/blob/b1438eea/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py 
b/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
index 539bef5..0d5eb2a 100644
--- a/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
+++ b/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
@@ -182,5 +182,5 @@ class TestAtlasServer(RMFTestCase):
   content=Template("atlas_hbase_setup.rb.j2"))
 
 

ambari git commit: AMBARI-21560 Auto populate zookeeper.connect in Ranger Kafka plugin properties (mugdha)

2017-07-28 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 0fa6e2091 -> 9d80540f6


AMBARI-21560 Auto populate zookeeper.connect in Ranger Kafka plugin properties 
(mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 9d80540f61f9cee11467755ec5aa6cc2ce8db6c7
Parents: 0fa6e20
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Mon Jul 24 16:17:34 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Jul 28 12:59:59 2017 +0530

--
 .../ranger-kafka-plugin-properties.xml  |  6 ++
 .../stacks/HDP/2.3/services/stack_advisor.py|  5 +
 .../stacks/2.3/common/test_stack_advisor.py | 22 ++--
 3 files changed, 31 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9d80540f/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/configuration/ranger-kafka-plugin-properties.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/configuration/ranger-kafka-plugin-properties.xml
 
b/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/configuration/ranger-kafka-plugin-properties.xml
index 3949402..1250f17 100644
--- 
a/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/configuration/ranger-kafka-plugin-properties.xml
+++ 
b/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/configuration/ranger-kafka-plugin-properties.xml
@@ -48,6 +48,12 @@
 zookeeper.connect
 localhost:2181
 Used for repository creation on ranger admin
+
+  
+zoo.cfg
+clientPort
+  
+
 
   
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/9d80540f/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
index d0f82af..e660742 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
@@ -446,6 +446,11 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
 kafkaLog4jContent+= '\n' + kafkaLog4jRangerLines[item]["name"] + 
'=' + kafkaLog4jRangerLines[item]["value"]
 putKafkaLog4jProperty("content",kafkaLog4jContent)
 
+  zookeeper_host_port = self.getZKHostPortString(services)
+  if zookeeper_host_port:
+putRangerKafkaPluginProperty = self.putProperty(configurations, 
'ranger-kafka-plugin-properties', services)
+putRangerKafkaPluginProperty('zookeeper.connect', zookeeper_host_port)
+
   def recommendRangerKMSConfigurations(self, configurations, clusterData, 
services, hosts):
 servicesList = [service["StackServices"]["service_name"] for service in 
services["services"]]
 putRangerKmsDbksProperty = self.putProperty(configurations, "dbks-site", 
services)

http://git-wip-us.apache.org/repos/asf/ambari/blob/9d80540f/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py 
b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py
index fe3d26d..ff57c7b 100644
--- a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py
@@ -298,6 +298,17 @@ class TestHDP23StackAdvisor(TestCase):
   }
 
 }]
+  },
+  {
+"StackServices": {
+  "service_name": "ZOOKEEPER"
+},
+"components": [{
+  "StackServiceComponents": {
+"component_name": "ZOOKEEPER_SERVER",
+"hostnames": ["host1"]
+  }
+}]
   }
 ],
   "Versions": {
@@ -305,7 +316,7 @@ class TestHDP23StackAdvisor(TestCase):
   },
   "configurations": {
 "core-site": {
-  "properties": { },
+  "properties": {}
 },
 "cluster-env": {
   "properties": {
@@ -321,13 +332,19 @@ class TestHDP23StackAdvisor(TestCase):
 },
 

ambari git commit: AMBARI-21560 Auto populate zookeeper.connect in Ranger Kafka plugin properties (mugdha)

2017-07-28 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 8d3570f8a -> 4759196f3


AMBARI-21560 Auto populate zookeeper.connect in Ranger Kafka plugin properties 
(mugdha)


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

Branch: refs/heads/trunk
Commit: 4759196f37a1e83cc732c44f901b647280c6b8b5
Parents: 8d3570f
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Mon Jul 24 18:08:57 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Jul 28 12:58:34 2017 +0530

--
 .../ranger-kafka-plugin-properties.xml  |  6 ++
 .../KAFKA/0.10.0.3.0/service_advisor.py |  5 +
 .../ranger-kafka-plugin-properties.xml  |  6 ++
 .../stacks/HDP/2.3/services/stack_advisor.py|  5 +
 .../stacks/2.3/common/test_stack_advisor.py | 22 ++--
 5 files changed, 42 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4759196f/ambari-server/src/main/resources/common-services/KAFKA/0.10.0.3.0/configuration/ranger-kafka-plugin-properties.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/KAFKA/0.10.0.3.0/configuration/ranger-kafka-plugin-properties.xml
 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0.3.0/configuration/ranger-kafka-plugin-properties.xml
index 29aa31c..42be7d0 100644
--- 
a/ambari-server/src/main/resources/common-services/KAFKA/0.10.0.3.0/configuration/ranger-kafka-plugin-properties.xml
+++ 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0.3.0/configuration/ranger-kafka-plugin-properties.xml
@@ -48,6 +48,12 @@
 zookeeper.connect
 localhost:2181
 Used for repository creation on ranger admin
+
+  
+zoo.cfg
+clientPort
+  
+
 
   
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/4759196f/ambari-server/src/main/resources/common-services/KAFKA/0.10.0.3.0/service_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/KAFKA/0.10.0.3.0/service_advisor.py
 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0.3.0/service_advisor.py
index 6b889a6..27c7173 100644
--- 
a/ambari-server/src/main/resources/common-services/KAFKA/0.10.0.3.0/service_advisor.py
+++ 
b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0.3.0/service_advisor.py
@@ -272,6 +272,11 @@ class KafkaRecommender(service_advisor.ServiceAdvisor):
 kafkaLog4jContent+= '\n' + kafkaLog4jRangerLines[item]["name"] + 
'=' + kafkaLog4jRangerLines[item]["value"]
 putKafkaLog4jProperty("content",kafkaLog4jContent)
 
+  zookeeper_host_port = self.getZKHostPortString(services)
+  if zookeeper_host_port:
+putRangerKafkaPluginProperty = self.putProperty(configurations, 
'ranger-kafka-plugin-properties', services)
+putRangerKafkaPluginProperty('zookeeper.connect', zookeeper_host_port)
+
 
   def recommendKAFKAConfigurationsFromHDP26(self, configurations, clusterData, 
services, hosts):
 if 'kafka-env' in services['configurations'] and 'kafka_user' in 
services['configurations']['kafka-env']['properties']:

http://git-wip-us.apache.org/repos/asf/ambari/blob/4759196f/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/configuration/ranger-kafka-plugin-properties.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/configuration/ranger-kafka-plugin-properties.xml
 
b/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/configuration/ranger-kafka-plugin-properties.xml
index 3949402..1250f17 100644
--- 
a/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/configuration/ranger-kafka-plugin-properties.xml
+++ 
b/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/configuration/ranger-kafka-plugin-properties.xml
@@ -48,6 +48,12 @@
 zookeeper.connect
 localhost:2181
 Used for repository creation on ranger admin
+
+  
+zoo.cfg
+clientPort
+  
+
 
   
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/4759196f/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
index 9efcee0..8cde439 100644
--- a/ambari-server/src/main/resources/s

ambari git commit: AMBARI-21053 Reverting Beacon stack advisor recommendation (mugdha)

2017-07-21 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 2a298a3f7 -> da21afc7d


AMBARI-21053 Reverting Beacon stack advisor recommendation (mugdha)


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

Branch: refs/heads/trunk
Commit: da21afc7d9019454f872cff09fe91e8889fca54d
Parents: 2a298a3
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Fri Jul 21 12:38:57 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Jul 21 12:48:50 2017 +0530

--
 .../stacks/HDP/2.6/services/stack_advisor.py| 33 +---
 1 file changed, 1 insertion(+), 32 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/da21afc7/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
index fa86f6c..181 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
@@ -40,42 +40,11 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
 "HIVE": self.recommendHIVEConfigurations,
 "HBASE": self.recommendHBASEConfigurations,
 "YARN": self.recommendYARNConfigurations,
-"KAFKA": self.recommendKAFKAConfigurations,
-"BEACON": self.recommendBEACONConfigurations
+"KAFKA": self.recommendKAFKAConfigurations
   }
   parentRecommendConfDict.update(childRecommendConfDict)
   return parentRecommendConfDict
 
-  def recommendBEACONConfigurations(self, configurations, clusterData, 
services, hosts):
-beaconEnvProperties = self.getSiteProperties(services['configurations'], 
'beacon-env')
-putbeaconEnvProperty = self.putProperty(configurations, "beacon-env", 
services)
-
-# database URL and driver class recommendations
-if beaconEnvProperties and self.checkSiteProperties(beaconEnvProperties, 
'beacon_store_driver') and self.checkSiteProperties(beaconEnvProperties, 
'beacon_database'):
-  putbeaconEnvProperty('beacon_store_driver', 
self.getDBDriver(beaconEnvProperties['beacon_database']))
-if beaconEnvProperties and self.checkSiteProperties(beaconEnvProperties, 
'beacon_store_db_name', 'beacon_store_url') and 
self.checkSiteProperties(beaconEnvProperties, 'beacon_database'):
-  beaconServerHost = self.getHostWithComponent('BEACON', 'BEACON_SERVER', 
services, hosts)
-  beaconDBConnectionURL = beaconEnvProperties['beacon_store_url']
-  protocol = self.getProtocol(beaconEnvProperties['beacon_database'])
-  oldSchemaName = self.getOldValue(services, "beacon-env", 
"beacon_store_db_name")
-  oldDBType = self.getOldValue(services, "beacon-env", "beacon_database")
-  # under these if constructions we are checking if beacon server hostname 
available,
-  # if it's default db connection url with "localhost" or if schema name 
was changed or if db type was changed (only for db type change from default 
mysql to existing mysql)
-  # or if protocol according to current db type differs with protocol in 
db connection url(other db types changes)
-  if beaconServerHost is not None:
-if (beaconDBConnectionURL and "//localhost" in beaconDBConnectionURL) 
or oldSchemaName or oldDBType or (protocol and beaconDBConnectionURL and not 
beaconDBConnectionURL.startswith(protocol)):
-  dbConnection = 
self.getDBConnectionStringBeacon(beaconEnvProperties['beacon_database']).format(beaconServerHost['Hosts']['host_name'],
 beaconEnvProperties['beacon_store_db_name'])
-  putbeaconEnvProperty('beacon_store_url', dbConnection)
-
-  def getDBConnectionStringBeacon(self, databaseType):
-driverDict = {
-  'NEW DERBY DATABASE': 
'jdbc:derby:${{beacon.data.dir}}/${{beacon.store.db.name}}-db;create=true',
-  'EXISTING MYSQL DATABASE': 'jdbc:mysql://{0}/{1}',
-  'EXISTING MYSQL / MARIADB DATABASE': 'jdbc:mysql://{0}/{1}',
-  'EXISTING ORACLE DATABASE': 'jdbc:oracle:thin:@//{0}:1521/{1}'
-}
-return driverDict.get(databaseType.upper())
-
   def recommendAtlasConfigurations(self, configurations, clusterData, 
services, hosts):
 super(HDP26StackAdvisor, 
self).recommendAtlasConfigurations(configurations, clusterData, services, hosts)
 servicesList = [service["StackServices"]["service_name"] for service in 
services["services"]]



ambari git commit: AMBARI-21053 Reverting Beacon stack advisor recommendation (mugdha)

2017-07-21 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 a7cc3801a -> caec39f10


AMBARI-21053 Reverting Beacon stack advisor recommendation (mugdha)


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

Branch: refs/heads/branch-2.5
Commit: caec39f10d8be65b79f8eafacef4abf82dc33766
Parents: a7cc380
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Fri Jul 21 12:38:57 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Jul 21 12:46:45 2017 +0530

--
 .../stacks/HDP/2.6/services/stack_advisor.py| 33 +---
 1 file changed, 1 insertion(+), 32 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/caec39f1/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
index c1c1f13..cc5fa92 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
@@ -41,42 +41,11 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
 "HIVE": self.recommendHIVEConfigurations,
 "HBASE": self.recommendHBASEConfigurations,
 "YARN": self.recommendYARNConfigurations,
-"KAFKA": self.recommendKAFKAConfigurations,
-"BEACON": self.recommendBEACONConfigurations
+"KAFKA": self.recommendKAFKAConfigurations
   }
   parentRecommendConfDict.update(childRecommendConfDict)
   return parentRecommendConfDict
 
-  def recommendBEACONConfigurations(self, configurations, clusterData, 
services, hosts):
-beaconEnvProperties = self.getSiteProperties(services['configurations'], 
'beacon-env')
-putbeaconEnvProperty = self.putProperty(configurations, "beacon-env", 
services)
-
-# database URL and driver class recommendations
-if beaconEnvProperties and self.checkSiteProperties(beaconEnvProperties, 
'beacon_store_driver') and self.checkSiteProperties(beaconEnvProperties, 
'beacon_database'):
-  putbeaconEnvProperty('beacon_store_driver', 
self.getDBDriver(beaconEnvProperties['beacon_database']))
-if beaconEnvProperties and self.checkSiteProperties(beaconEnvProperties, 
'beacon_store_db_name', 'beacon_store_url') and 
self.checkSiteProperties(beaconEnvProperties, 'beacon_database'):
-  beaconServerHost = self.getHostWithComponent('BEACON', 'BEACON_SERVER', 
services, hosts)
-  beaconDBConnectionURL = beaconEnvProperties['beacon_store_url']
-  protocol = self.getProtocol(beaconEnvProperties['beacon_database'])
-  oldSchemaName = getOldValue(self, services, "beacon-env", 
"beacon_store_db_name")
-  oldDBType = getOldValue(self, services, "beacon-env", "beacon_database")
-  # under these if constructions we are checking if beacon server hostname 
available,
-  # if it's default db connection url with "localhost" or if schema name 
was changed or if db type was changed (only for db type change from default 
mysql to existing mysql)
-  # or if protocol according to current db type differs with protocol in 
db connection url(other db types changes)
-  if beaconServerHost is not None:
-if (beaconDBConnectionURL and "//localhost" in beaconDBConnectionURL) 
or oldSchemaName or oldDBType or (protocol and beaconDBConnectionURL and not 
beaconDBConnectionURL.startswith(protocol)):
-  dbConnection = 
self.getDBConnectionStringBeacon(beaconEnvProperties['beacon_database']).format(beaconServerHost['Hosts']['host_name'],
 beaconEnvProperties['beacon_store_db_name'])
-  putbeaconEnvProperty('beacon_store_url', dbConnection)
-
-  def getDBConnectionStringBeacon(self, databaseType):
-driverDict = {
-  'NEW DERBY DATABASE': 
'jdbc:derby:${{beacon.data.dir}}/${{beacon.store.db.name}}-db;create=true',
-  'EXISTING MYSQL DATABASE': 'jdbc:mysql://{0}/{1}',
-  'EXISTING MYSQL / MARIADB DATABASE': 'jdbc:mysql://{0}/{1}',
-  'EXISTING ORACLE DATABASE': 'jdbc:oracle:thin:@//{0}:1521/{1}'
-}
-return driverDict.get(databaseType.upper())
-
   def recommendAtlasConfigurations(self, configurations, clusterData, 
services, hosts):
 super(HDP26StackAdvisor, 
self).recommendAtlasConfigurations(configurations, clusterData, services, hosts)
 servicesList = [service["StackServices"]["service_name"] for service in 
services["services"]]



ambari git commit: AMBARI-21374 : Replication factor should be configurable in Atlas to create solr collections (Vishal Suvagia via mugdha)

2017-07-05 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 cba018eb6 -> 395cdcf33


AMBARI-21374 : Replication factor should be configurable in Atlas to create 
solr collections (Vishal Suvagia via mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 395cdcf33ce25ead47bcf7c2463cbad1a9fb3d86
Parents: cba018e
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Mon Jul 3 10:47:20 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Thu Jul 6 10:53:51 2017 +0530

--
 .../common-services/ATLAS/0.1.0.2.3/package/scripts/params.py  | 4 +++-
 .../stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml  | 6 ++
 2 files changed, 9 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/395cdcf3/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index a8bfeb7..bdc9ec4 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -209,7 +209,9 @@ search_backend_solr = 
atlas_search_backend.startswith('solr')
 infra_solr_znode = default("/configurations/infra-solr-env/infra_solr_znode", 
None)
 infra_solr_hosts = default("/clusterHostInfo/infra_solr_hosts", [])
 infra_solr_replication_factor = 2 if len(infra_solr_hosts) > 1 else 1
-atlas_solr_shards = default("/configurations/atlas-env/atlas_solr-shards", 1)
+if 'atlas_solr_replication_factor' in config['configurations']['atlas-env']:
+  infra_solr_replication_factor = 
int(default("/configurations/atlas-env/atlas_solr_replication_factor", 1))
+atlas_solr_shards = default("/configurations/atlas-env/atlas_solr_shards", 1)
 has_infra_solr = len(infra_solr_hosts) > 0
 infra_solr_role_atlas = 
default('configurations/infra-solr-security-json/infra_solr_role_atlas', 
'atlas_user')
 infra_solr_role_dev = 
default('configurations/infra-solr-security-json/infra_solr_role_dev', 'dev')

http://git-wip-us.apache.org/repos/asf/ambari/blob/395cdcf3/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
index d54cf15..821fafa 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
@@ -38,4 +38,10 @@
 
 
   
+   
+atlas_solr_replication_factor
+1
+Replication factor for the atlas solr 
collections.
+
+  
 



ambari git commit: AMBARI-21374 : Replication factor should be configurable in Atlas to create solr collections (Vishal Suvagia via mugdha)

2017-07-05 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 3dc51b0c9 -> 78ebbef3d


AMBARI-21374 : Replication factor should be configurable in Atlas to create 
solr collections (Vishal Suvagia via mugdha)


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

Branch: refs/heads/trunk
Commit: 78ebbef3db12b1261d71db361bc480a374f62e92
Parents: 3dc51b0
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Mon Jul 3 10:44:43 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Thu Jul 6 10:44:50 2017 +0530

--
 .../common-services/ATLAS/0.1.0.2.3/package/scripts/params.py  | 4 +++-
 .../ATLAS/0.7.0.3.0/configuration/atlas-env.xml| 6 ++
 .../common-services/ATLAS/0.7.0.3.0/package/scripts/params.py  | 4 +++-
 .../stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml  | 6 ++
 4 files changed, 18 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/78ebbef3/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index 111a248..0c84b5c 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -212,7 +212,9 @@ search_backend_solr = 
atlas_search_backend.startswith('solr')
 infra_solr_znode = default("/configurations/infra-solr-env/infra_solr_znode", 
None)
 infra_solr_hosts = default("/clusterHostInfo/infra_solr_hosts", [])
 infra_solr_replication_factor = 2 if len(infra_solr_hosts) > 1 else 1
-atlas_solr_shards = default("/configurations/atlas-env/atlas_solr-shards", 1)
+if 'atlas_solr_replication_factor' in config['configurations']['atlas-env']:
+  infra_solr_replication_factor = 
int(default("/configurations/atlas-env/atlas_solr_replication_factor", 1))
+atlas_solr_shards = default("/configurations/atlas-env/atlas_solr_shards", 1)
 has_infra_solr = len(infra_solr_hosts) > 0
 infra_solr_role_atlas = 
default('configurations/infra-solr-security-json/infra_solr_role_atlas', 
'atlas_user')
 infra_solr_role_dev = 
default('configurations/infra-solr-security-json/infra_solr_role_dev', 'dev')

http://git-wip-us.apache.org/repos/asf/ambari/blob/78ebbef3/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
index c5a4fd6..f97ca98 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
@@ -179,4 +179,10 @@
 
 
   
+  
+atlas_solr_replication_factor
+1
+Replication factor for the atlas solr 
collections.
+
+  
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/78ebbef3/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
index d26df33..61b41d6 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
@@ -211,7 +211,9 @@ search_backend_solr = 
atlas_search_backend.startswith('solr')
 infra_solr_znode = default("/configurations/infra-solr-env/infra_solr_znode", 
None)
 infra_solr_hosts = default("/clusterHostInfo/infra_solr_hosts", [])
 infra_solr_replication_factor = 2 if len(infra_solr_hosts) > 1 else 1
-atlas_solr_shards = default("/configurations/atlas-env/atlas_solr-shards", 1)
+if 'atlas_solr_replication_factor' in config['configurations']['atlas-env']:
+  infra_solr_replication_factor = 
int(default("/configurations/atlas-env/atlas_solr_replication_factor", 1))
+atlas_solr_shards = default("/config

[05/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/themes/theme_version_1.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/themes/theme_version_1.json
 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/themes/theme_version_1.json
new file mode 100644
index 000..a307f56
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/themes/theme_version_1.json
@@ -0,0 +1,1821 @@
+{
+  "name": "default",
+  "description": "Default theme for Ranger service",
+  "configuration": {
+"layouts": [
+  {
+"name": "default",
+"tabs": [
+  {
+"name": "ranger_admin_settings",
+"display-name": "Ranger Admin",
+"layout": {
+  "tab-columns": "2",
+  "tab-rows": "2",
+  "sections": [
+{
+  "name": "section-ranger-admin",
+  "display-name": "Ranger Admin",
+  "row-index": "0",
+  "column-index": "0",
+  "row-span": "3",
+  "column-span": "2",
+  "section-columns": "2",
+  "section-rows": "3",
+  "subsections": [
+{
+  "name": "subsection-ranger-db-row1-col1",
+  "row-index": "0",
+  "column-index": "0",
+  "row-span": "1",
+  "column-span": "1"
+},
+{
+  "name": "subsection-ranger-db-row1-col2",
+  "row-index": "0",
+  "column-index": "1",
+  "row-span": "1",
+  "column-span": "1"
+},
+{
+  "name": "subsection-ranger-db-row2",
+  "row-index": "1",
+  "column-index": "0",
+  "row-span": "1",
+  "column-span": "2"
+},
+{
+  "name": "subsection-ranger-db-root-user-col1",
+  "row-index": "2",
+  "column-index": "0",
+  "row-span": "1",
+  "column-span": "1",
+  "depends-on": [
+{
+  "configs":[
+"ranger-env/create_db_dbuser"
+  ],
+  "if": "${ranger-env/create_db_dbuser}",
+  "then": {
+"property_value_attributes": {
+  "visible": true
+}
+  },
+  "else": {
+"property_value_attributes": {
+  "visible": false
+}
+  }
+}
+  ]
+},
+{
+  "name": "subsection-ranger-db-root-user-col2",
+  "row-index": "2",
+  "column-index": "1",
+  "row-span": "1",
+  "column-span": "1",
+  "depends-on": [
+{
+  "configs":[
+"ranger-env/create_db_dbuser"
+  ],
+  "if": "${ranger-env/create_db_dbuser}",
+  "then": {
+"property_value_attributes": {
+  "visible": true
+}
+  },
+  "else": {
+"property_value_attributes": {
+  "visible": false
+}
+  }
+}
+  ]
+}
+  ]
+}
+  ]
+}
+  },
+  {
+"name": "ranger_user_info",
+"display-name": "Ranger User Info",
+"layout": {
+  "tab-columns": "1",
+  "tab-rows": "1",
+  "sections": [
+{
+  "name": "section-user-info",
+  "display-name": "Ranger User Info",
+  "row-index": "0",
+  "column-index": "0",
+  "row-span": "2",
+  "column-span": "1",
+  "section-columns": "1",
+  "section-rows": "2",
+  "subsections": [
+{
+  

[09/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/usersync-log4j.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/usersync-log4j.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/usersync-log4j.xml
new file mode 100644
index 000..b5f2a7a
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/usersync-log4j.xml
@@ -0,0 +1,89 @@
+
+
+
+  
+ranger_usersync_log_maxfilesize
+256
+   The maximum size of backup file before the log is 
rotated
+Ranger usersync Log: backup file size
+
+  MB
+
+
+   
+   
+ranger_usersync_log_maxbackupindex
+20
+The number of backup files
+Ranger usersync Log: # of backup files
+
+  int
+  0
+
+
+  
+  
+content
+usersync-log4j template
+usersync-log4j.properties
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+log4j.rootLogger = info,logFile
+
+# logFile
+log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.logFile.file=${logdir}/usersync.log
+log4j.appender.logFile.datePattern='.'-MM-dd
+log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
+log4j.appender.logFile.layout.ConversionPattern=%d{dd MMM  HH:mm:ss} %5p 
%c{1} [%t] - %m%n
+log4j.appender.logFile.MaxFileSize = {{ranger_usersync_log_maxfilesize}}MB
+log4j.appender.logFile.MaxBackupIndex = {{ranger_usersync_log_maxbackupindex}}
+
+# console
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.Target=System.out
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{dd MMM  HH:mm:ss} %5p 
%c{1} [%t] - %m%n
+
+
+  content
+  false
+
+
+  
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/kerberos.json
 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/kerberos.json
new file mode 100644
index 000..1fc8acf
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/kerberos.json
@@ -0,0 +1,153 @@
+{
+  "services": [
+{
+  "name": "RANGER",
+  "identities": [
+{
+  "name": "/spnego"
+},
+{
+  "name": "/smokeuser"
+}
+  ],
+  "configurations": [
+{
+  "ranger-admin-site": {
+"xasecure.audit.jaas.Client.loginModuleName": 
"com.sun.security.auth.module.Krb5LoginModule",
+"xasecure.audit.jaas.Client.loginModuleControlFlag": "required",
+"xasecure.audit.jaas.Client.option.useKeyTab": "true",
+"xasecure.audit.jaas.Client.option.storeKey": "false",
+"xasecure.audit.jaas.Client.option.serviceName": "solr"
+  }
+}
+  ],
+  "components": [
+{
+  "name": "RANGER_ADMIN",
+  "identities": [
+{
+  "name": "rangeradmin",
+  "principal": {
+"value": "rangeradmin/_HOST@${realm}",
+"type" : "service",
+"configuration": 
"ranger-admin-site/ranger.admin.kerberos.principal",
+"local_username" : "${ranger-env/ranger_user}"
+  },
+  "keytab": {
+"file": "${keytab_dir}/rangeradmin.service.keytab",
+"owner": {
+  "name": "${ranger-env/ranger_user}",
+  "access": "r"
+},
+"configuration": 
"ranger-admin-site/ranger.admin.kerberos.keytab"
+  }
+},
+{
+  "name": "rangerlookup",
+  "principal": {
+"value": "rangerlookup/_HOST@${realm}",
+"configuration": 

[16/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-tagsync-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-tagsync-site.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-tagsync-site.xml
deleted file mode 100644
index 5e60c06..000
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-tagsync-site.xml
+++ /dev/null
@@ -1,206 +0,0 @@
-
-
-
-  
-ranger.tagsync.logdir
-/var/log/ranger/tagsync
-Ranger Log dir
-
-  directory
-  false
-  true
-
-
-  
-  
-ranger.tagsync.dest.ranger.endpoint
-{{ranger_external_url}}
-Ranger TagAdmin REST URL
-
-  true
-
-
-  
-  
-ranger.tagsync.source.atlas
-Enable Atlas Tag Source
-false
-
-
-  boolean
-
-
-  
-application-properties
-atlas.server.bind.address
-  
-
-
-  
-  
-ranger.tagsync.source.atlasrest
-Enable AtlasRest Tag Source
-false
-
-
-  boolean
-
-
-  
-  
-ranger.tagsync.source.file
-Enable File Tag Source
-false
-
-
-  boolean
-
-
-  
-  
-ranger.tagsync.source.file.check.interval.millis
-File Source: File update polling interval
-
-
-
-  true
-
-
-  
-  
-ranger.tagsync.source.atlasrest.download.interval.millis
-AtlasREST Source: Atlas source download 
interval
-6
-
-  true
-
-
-  
-
-  
-ranger.tagsync.source.file.filename
-File Source: Filename
-
-File Source Filename
-
-  true
-
-
-  
-
-  
-ranger.tagsync.source.atlasrest.endpoint
-AtlasREST Source: Atlas endpoint
-
-
-
-  true
-
-
-
-  
-application-properties
-atlas.server.http.port
-  
-  
-application-properties
-atlas.server.https.port
-  
-  
-application-properties
-atlas.enableTLS
-  
-
-  
-  
-ranger.tagsync.kerberos.principal
-
-
-KERBEROS_PRINCIPAL
-
-  true
-
-
-  
-  
-ranger.tagsync.kerberos.keytab
-
-
-
-  true
-
-
-  
-  
-ranger.tagsync.dest.ranger.username
-rangertagsync
-
-
-  
-
-  
-ranger.tagsync.source.atlasrest.username
-admin
-
-
-  
-
-  
-ranger.tagsync.atlas.default.cluster.name
-{{cluster_name}}
-Capture cluster name
-
-  true
-
-
-  
-
-  
-ranger.tagsync.keystore.filename
-/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks
-Keystore file
-
-  true
-
-
-  
-  
-ranger.tagsync.source.atlasrest.keystore.filename
-/usr/hdp/current/ranger-tagsync/conf/atlasuser.jceks
-Tagsync atlasrest keystore file
-
-  true
-
-
-  
-  
-ranger.tagsync.dest.ranger.ssl.config.filename
-
{{stack_root}}/current/ranger-tagsync/conf/ranger-policymgr-ssl.xml
-Keystore and truststore information used for tagsync, 
required if tagsync - ranger admin communication is SSL 
enabled
-
-  
-  
-ranger.tagsync.source.atlasrest.ssl.config.filename
-
{{stack_root}}/current/ranger-tagsync/conf/atlas-tagsync-ssl.xml
-Keystore and truststore information used for tagsync, 
required if tagsync to atlas communication is SSL enabled
-
-  
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-ugsync-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-ugsync-site.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-ugsync-site.xml
deleted file mode 100644
index 922fbd8..000
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-ugsync-site.xml
+++ /dev/null
@@ -1,577 +0,0 @@
-
-
-
-  
-ranger.usersync.port
-5151
-Port for unix authentication service, run within 
usersync
-
-  
-  
-ranger.usersync.ssl
-true
-SSL enabled? (ranger admin - usersync 
communication)
-
-  
-
-  
-ranger.usersync.keystore.password
-UnIx529p
-PASSWORD
-Keystore password
-
-  password
-
-
-  
-
-  
-ranger.usersync.truststore.password
-changeit
-PASSWORD
-Truststore password
-
-  password
-
-
-  
-  
-ranger.usersync.passwordvalidator.path
-./native/credValidator.uexe
-Native program for password validation
-
-  
-  
-ranger.usersync.enabled
-Enable User Sync
-true
-Should users and groups be 

[13/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/properties/ranger-solrconfig.xml.j2
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/properties/ranger-solrconfig.xml.j2
 
b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/properties/ranger-solrconfig.xml.j2
deleted file mode 100644
index 25dbb7a..000
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/properties/ranger-solrconfig.xml.j2
+++ /dev/null
@@ -1,1874 +0,0 @@
-
-
-
-
-
-  
-
-  
-  5.2.0
-
-  
-
-  
-  
-
-  
-  
-
-  
-  
-
-  
-  
-
-  
-  
-
-  
-  
-
-  
-  ${solr.data.dir:}
-
-
-  
-  
-
-
-
-
-${solr.hdfs.home:}
-
-${solr.hdfs.confdir:}
-
-${solr.hdfs.blockcache.enabled:true}
-
-${solr.hdfs.blockcache.global:true}
-
-  
-
-  
-  
-
-  
-
-   
- true
- managed-schema
-   
-
-
-  
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-{{ranger_audit_logs_merge_factor}}
-
-
-
-
-
-${solr.lock.type:native}
-
-
-
-
-
-
-  
-  
-  
-  
-  
-  
-
-
-
- true
-  
-
-
-  
-  
-  
-  
-  
-  
-
-  
-  
-
-
-
-  ${solr.ulog.dir:}
-
-
-
- 
-   ${solr.autoCommit.maxTime:15000}
-   false
- 
-
-
-
- 
-   ${solr.autoSoftCommit.maxTime:5000}
- 
-
-
-
-
-
-
-  
-
-  
-  
-
-  
-  
-
-1024
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-true
-
-   
-   
-
-   
-   20
-
-   
-   200
-
-   
-
-
-  
-
-  
-
-
-  
-
-  static firstSearcher warming in solrconfig.xml
-
-  
-
-
-
-true
-
-
-2
-
-  
-
-
-  
-  
-
-
-
-
-
-
-
-
-
-  
-
-  
-
-  
-
-  solr-data-config.xml
-
-  
-
-  
-  
-
- 
-   explicit
-   10
-   text
- 
-
-
-
-
-
-
-
-
-
-  
-  
- 
-   explicit
-   json
-   true
-   text
- 
-  
-
-
-  
-  
- 
-   true
-   json
-   true
- 
-  
-
-
-  
-  
-
-  explicit
-
-  
-  velocity
-  browse
-  layout
-
-  
-  edismax
-  *:*
-  10
-  *,score
-
-  
-  on
-  1
-
-  
-
-
-  
-
-  text
-  add-unknown-fields-to-the-schema
-
-  
-
-  
-  
-
-
-  
-
-  
-  
-
-  true
-  ignored_
-
-  
-  true
-  links
-  ignored_
-
-  
-
-
-  
-  
-
-
-  
-  
-
-  
-  
-  
-  
-
-  
-  
-  
-  
-
-  solrpingquery
-
-
-  all
-
-
-
-  
-
-  
-  
-
- explicit
- true
-
-  
-
-  
-  
-
-
-
-  
-
-  
-
-   
-  
-
-text_general
-
-
-
-
-
-  default
-  text
-  solr.DirectSolrSpellChecker
-  
-  internal
-  
-  0.5
-  
-  2
-  
-  1
-  
-  5
-  
-  4
-  
-  0.01
-  
-
-
-
-
-  wordbreak
-  solr.WordBreakSolrSpellChecker
-  name
-  true
-  true
-  10
-
-
-
-
-
-
-
-
-
-
-  
-
-  
-  
-
-  text
-  
-  default
-  wordbreak
-  on
-  true
-  10
-  5
-  5
-  true
-  true
-  10
-  5
-
-
-  spellcheck
-
-  
-
-  
-   
-  mySuggester
-  FuzzyLookupFactory  
-  DocumentDictionaryFactory 
-  cat
-  price
-  string
-
-  
-
-  
-
-  true
-  10
-
-
-  suggest
-
-  
-  
-  
-
-  
-  
-
-  text
-  true
-
-
-  tvComponent
-
-  
-
-  
-  
-
-  lingo
-
-  
-  org.carrot2.clustering.lingo.LingoClusteringAlgorithm
-
-  
-  clustering/carrot2
-
-
-
-
-  stc
-  org.carrot2.clustering.stc.STCClusteringAlgorithm
-
-
-
-
-  kmeans
-  org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
-
-  
-
-  
-  
-
-  true
-  true
-  
-  name
-  
-  id
-  
-  features
-  
-  true
-  
-  
-  
-  false
-
-  
-  edismax
-  
-text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
-  
-  *:*
-  10
-  *,score
-
-
-  clustering
-
-  
-
-  
-  
-
-  
-  
- 
-  true
-  false
-
-
-  terms
-
-  
-
-
-  
-  
-
-string
-elevate.xml
-  
-
-  
-  
-
-  explicit
-  text
-
-
-  elevator
-
-  
-
-  
-  
-
-  
-  
-  
-
-  100
-
-  
-
-  
-  
-
-  
-  70
-  
-  

[01/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 19d4200e7 -> 3dc51b0c9


http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/themes/theme_version_1.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/themes/theme_version_1.json
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/themes/theme_version_1.json
new file mode 100644
index 000..848f10b
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/themes/theme_version_1.json
@@ -0,0 +1,409 @@
+{
+  "name": "default",
+  "description": "Default theme for Ranger KMS service",
+  "configuration": {
+"layouts": [
+{
+"name": "default",
+"tabs": [
+  {
+"name": "db_settings",
+"display-name": "Settings",
+"layout": {
+  "tab-columns": "2",
+  "tab-rows": "2",
+  "sections": [
+{
+  "name": "section-db-settings",
+  "display-name": "",
+  "row-index": "0",
+  "column-index": "0",
+  "row-span": "4",
+  "column-span": "2",
+  "section-columns": "2",
+  "section-rows": "4",
+  "subsections": [
+{
+  "name": "subsection-kms-db-row1-col1",
+  "display-name": "Ranger KMS DB",
+  "row-index": "0",
+  "column-index": "0",
+  "row-span": "1",
+  "column-span": "1"
+},
+{
+  "name": "subsection-kms-db-row1-col2",
+  "row-index": "0",
+  "column-index": "1",
+  "row-span": "1",
+  "column-span": "1"
+},
+{
+  "name": "subsection-kms-create-db-user-row2-col",
+  "display-name": "Setup Database and Database User",
+  "row-index": "1",
+  "column-index": "0",
+  "row-span": "1",
+  "column-span": "2"
+},
+{
+  "name": "subsection-kms-db-root-user-row3-col1",
+  "display-name": "Ranger KMS Root DB",
+  "row-index": "2",
+  "column-index": "0",
+  "row-span": "1",
+  "column-span": "1",
+  "depends-on": [
+{
+  "configs":[
+"kms-env/create_db_user"
+  ],
+  "if": "${kms-env/create_db_user}",
+  "then": {
+"property_value_attributes": {
+  "visible": true
+}
+  },
+  "else": {
+"property_value_attributes": {
+  "visible": false
+}
+  }
+}
+  ]
+},
+{
+  "name": "subsection-kms-db-root-user-row3-col2",
+  "row-index": "2",
+  "column-index": "1",
+  "row-span": "1",
+  "column-span": "1",
+  "depends-on": [
+{
+  "configs":[
+"kms-env/create_db_user"
+  ],
+  "if": "${kms-env/create_db_user}",
+  "then": {
+"property_value_attributes": {
+  "visible": true
+}
+  },
+  "else": {
+"property_value_attributes": {
+  "visible": false
+}
+  }
+}
+  ]
+},
+{
+  "name": "subsection-kms-master-row4-col",
+  "display-name": "KMS Master Secret Password",
+  "row-index": "3",
+  "column-index": "0",
+  "row-span": "1",
+  "column-span": "2"
+}
+  ]
+}
+  ]
+}
+  },
+  {
+"name": "kms_hsm",
+

[17/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms 
(mugdha)


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

Branch: refs/heads/trunk
Commit: 3dc51b0c93bf130890f0f937b44d84f5017a
Parents: 19d4200
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Tue Jun 27 15:52:53 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Thu Jul 6 09:48:45 2017 +0530

--
 .../HDFS/3.0.0.3.0/service_advisor.py   |   53 +
 .../RANGER/0.7.0.3.0/alerts.json|   76 -
 .../0.7.0.3.0/configuration/admin-log4j.xml |  132 --
 .../configuration/admin-properties.xml  |  163 --
 .../configuration/atlas-tagsync-ssl.xml |   72 -
 .../configuration/ranger-admin-site.xml |  785 
 .../0.7.0.3.0/configuration/ranger-env.xml  |  513 -
 .../0.7.0.3.0/configuration/ranger-site.xml |   30 -
 .../configuration/ranger-solr-configuration.xml |   59 -
 .../ranger-tagsync-policymgr-ssl.xml|   72 -
 .../configuration/ranger-tagsync-site.xml   |  206 --
 .../configuration/ranger-ugsync-site.xml|  577 --
 .../tagsync-application-properties.xml  |   62 -
 .../0.7.0.3.0/configuration/tagsync-log4j.xml   |   90 -
 .../0.7.0.3.0/configuration/usersync-log4j.xml  |   89 -
 .../configuration/usersync-properties.xml   |   32 -
 .../RANGER/0.7.0.3.0/kerberos.json  |  153 --
 .../RANGER/0.7.0.3.0/metainfo.xml   |  189 --
 .../alerts/alert_ranger_admin_passwd_check.py   |  195 --
 .../RANGER/0.7.0.3.0/package/scripts/params.py  |  448 -
 .../0.7.0.3.0/package/scripts/ranger_admin.py   |  217 --
 .../0.7.0.3.0/package/scripts/ranger_service.py |   69 -
 .../0.7.0.3.0/package/scripts/ranger_tagsync.py |  139 --
 .../package/scripts/ranger_usersync.py  |  124 --
 .../0.7.0.3.0/package/scripts/service_check.py  |   49 -
 .../0.7.0.3.0/package/scripts/setup_ranger.py   |  153 --
 .../package/scripts/setup_ranger_xml.py |  853 
 .../0.7.0.3.0/package/scripts/status_params.py  |   39 -
 .../RANGER/0.7.0.3.0/package/scripts/upgrade.py |   31 -
 .../templates/input.config-ranger.json.j2   |   79 -
 .../package/templates/ranger_admin_pam.j2   |   22 -
 .../package/templates/ranger_remote_pam.j2  |   22 -
 .../package/templates/ranger_solr_jaas_conf.j2  |   26 -
 .../properties/ranger-solrconfig.xml.j2 | 1874 --
 .../RANGER/0.7.0.3.0/quicklinks/quicklinks.json |   41 -
 .../RANGER/0.7.0.3.0/role_command_order.json|9 -
 .../RANGER/0.7.0.3.0/service_advisor.py |  793 
 .../0.7.0.3.0/themes/theme_version_1.json   |  722 ---
 .../0.7.0.3.0/themes/theme_version_2.json   | 1470 --
 .../0.7.0.3.0/themes/theme_version_3.json   |  692 ---
 .../0.7.0.3.0/themes/theme_version_5.json   |   48 -
 .../RANGER/1.0.0.3.0/alerts.json|   76 +
 .../1.0.0.3.0/configuration/admin-log4j.xml |  132 ++
 .../configuration/admin-properties.xml  |  161 ++
 .../configuration/atlas-tagsync-ssl.xml |   72 +
 .../configuration/ranger-admin-site.xml |  751 +++
 .../1.0.0.3.0/configuration/ranger-env.xml  |  503 +
 .../configuration/ranger-solr-configuration.xml |   59 +
 .../ranger-tagsync-policymgr-ssl.xml|   72 +
 .../configuration/ranger-tagsync-site.xml   |  201 ++
 .../configuration/ranger-ugsync-site.xml|  571 ++
 .../tagsync-application-properties.xml  |   62 +
 .../1.0.0.3.0/configuration/tagsync-log4j.xml   |   90 +
 .../1.0.0.3.0/configuration/usersync-log4j.xml  |   89 +
 .../RANGER/1.0.0.3.0/kerberos.json  |  153 ++
 .../RANGER/1.0.0.3.0/metainfo.xml   |  177 ++
 .../alerts/alert_ranger_admin_passwd_check.py   |  195 ++
 .../RANGER/1.0.0.3.0/package/scripts/params.py  |  449 +
 .../1.0.0.3.0/package/scripts/ranger_admin.py   |  210 ++
 .../1.0.0.3.0/package/scripts/ranger_service.py |   69 +
 .../1.0.0.3.0/package/scripts/ranger_tagsync.py |  139 ++
 .../package/scripts/ranger_usersync.py  |  120 ++
 .../1.0.0.3.0/package/scripts/service_check.py  |   49 +
 .../package/scripts/setup_ranger_xml.py |  853 
 .../1.0.0.3.0/package/scripts/status_params.py  |   39 +
 .../RANGER/1.0.0.3.0/package/scripts/upgrade.py |   31 +
 .../templates/input.config-ranger.json.j2   |   79 +
 .../package/templates/ranger_admin_pam.j2   |   22 +
 .../package/templates/ranger_remote_pam.j2  |   22 +
 .../package/templates/ranger_solr_jaas_conf.j2  |   26 +
 .../properties/ranger-solrconfig.xml.j2 | 1874 ++
 .../RANGER/1.0.0.3.0/quicklinks

[07/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/properties/ranger-solrconfig.xml.j2
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/properties/ranger-solrconfig.xml.j2
 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/properties/ranger-solrconfig.xml.j2
new file mode 100644
index 000..a1975fd
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/properties/ranger-solrconfig.xml.j2
@@ -0,0 +1,1874 @@
+
+
+
+
+
+  
+
+  
+  5.2.0
+
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  ${solr.data.dir:}
+
+
+  
+  
+
+
+
+
+${solr.hdfs.home:}
+
+${solr.hdfs.confdir:}
+
+${solr.hdfs.blockcache.enabled:true}
+
+${solr.hdfs.blockcache.global:true}
+
+  
+
+  
+  
+
+  
+
+   
+ true
+ managed-schema
+   
+
+
+  
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{{ranger_audit_logs_merge_factor}}
+
+
+
+
+
+${solr.lock.type:native}
+
+
+
+
+
+
+  
+  
+  
+  
+  
+  
+
+
+
+ true
+  
+
+
+  
+  
+  
+  
+  
+  
+
+  
+  
+
+
+
+  ${solr.ulog.dir:}
+
+
+
+ 
+   ${solr.autoCommit.maxTime:15000}
+   false
+ 
+
+
+
+ 
+   ${solr.autoSoftCommit.maxTime:5000}
+ 
+
+
+
+
+
+
+  
+
+  
+  
+
+  
+  
+
+1024
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+true
+
+   
+   
+
+   
+   20
+
+   
+   200
+
+   
+
+
+  
+
+  
+
+
+  
+
+  static firstSearcher warming in solrconfig.xml
+
+  
+
+
+
+true
+
+
+2
+
+  
+
+
+  
+  
+
+
+
+
+
+
+
+
+
+  
+
+  
+
+  
+
+  solr-data-config.xml
+
+  
+
+  
+  
+
+ 
+   explicit
+   10
+   text
+ 
+
+
+
+
+
+
+
+
+
+  
+  
+ 
+   explicit
+   json
+   true
+   text
+ 
+  
+
+
+  
+  
+ 
+   true
+   json
+   true
+ 
+  
+
+
+  
+  
+
+  explicit
+
+  
+  velocity
+  browse
+  layout
+
+  
+  edismax
+  *:*
+  10
+  *,score
+
+  
+  on
+  1
+
+  
+
+
+  
+
+  text
+  add-unknown-fields-to-the-schema
+
+  
+
+  
+  
+
+
+  
+
+  
+  
+
+  true
+  ignored_
+
+  
+  true
+  links
+  ignored_
+
+  
+
+
+  
+  
+
+
+  
+  
+
+  
+  
+  
+  
+
+  
+  
+  
+  
+
+  solrpingquery
+
+
+  all
+
+
+
+  
+
+  
+  
+
+ explicit
+ true
+
+  
+
+  
+  
+
+
+
+  
+
+  
+
+   
+  
+
+text_general
+
+
+
+
+
+  default
+  text
+  solr.DirectSolrSpellChecker
+  
+  internal
+  
+  0.5
+  
+  2
+  
+  1
+  
+  5
+  
+  4
+  
+  0.01
+  
+
+
+
+
+  wordbreak
+  solr.WordBreakSolrSpellChecker
+  name
+  true
+  true
+  10
+
+
+
+
+
+
+
+
+
+
+  
+
+  
+  
+
+  text
+  
+  default
+  wordbreak
+  on
+  true
+  10
+  5
+  5
+  true
+  true
+  10
+  5
+
+
+  spellcheck
+
+  
+
+  
+
+  mySuggester
+  FuzzyLookupFactory  
+  DocumentDictionaryFactory 
+  cat
+  price
+  string
+
+  
+
+  
+
+  true
+  10
+
+
+  suggest
+
+  
+  
+  
+
+  
+  
+
+  text
+  true
+
+
+  tvComponent
+
+  
+
+  
+  
+
+  lingo
+
+  
+  org.carrot2.clustering.lingo.LingoClusteringAlgorithm
+
+  
+  clustering/carrot2
+
+
+
+
+  stc
+  org.carrot2.clustering.stc.STCClusteringAlgorithm
+
+
+
+
+  kmeans
+  org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
+
+  
+
+  
+  
+
+  true
+  true
+  
+  name
+  
+  id
+  
+  features
+  
+  true
+  
+  
+  
+  false
+
+  
+  edismax
+  
+text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
+  
+  *:*
+  10
+  *,score
+
+
+  clustering
+
+  
+
+  
+  
+
+  
+  
+ 
+  true
+  false
+
+
+  terms
+
+  
+
+
+  
+  
+
+string
+elevate.xml
+  
+
+  
+  
+
+  explicit
+  text
+
+
+  elevator
+
+  
+
+  
+  
+
+  
+  
+  
+
+  100
+
+  
+
+  
+  
+
+  
+  70
+  
+ 

[14/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/setup_ranger_xml.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/setup_ranger_xml.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/setup_ranger_xml.py
deleted file mode 100644
index 26e6578..000
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/setup_ranger_xml.py
+++ /dev/null
@@ -1,853 +0,0 @@
-#!/usr/bin/env python
-"""
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-"""
-import os
-import re
-from resource_management.libraries.script import Script
-from resource_management.libraries.functions.default import default
-from resource_management.core.logger import Logger
-from resource_management.core.resources.system import File, Directory, 
Execute, Link
-from resource_management.core.source import DownloadSource, InlineTemplate, 
Template
-from resource_management.libraries.resources.xml_config import XmlConfig
-from resource_management.libraries.resources.modify_properties_file import 
ModifyPropertiesFile
-from resource_management.libraries.resources.properties_file import 
PropertiesFile
-from resource_management.core.exceptions import Fail
-from resource_management.libraries.functions.decorator import retry
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.is_empty import is_empty
-from resource_management.core.utils import PasswordString
-from resource_management.core.shell import as_sudo
-from resource_management.libraries.functions import solr_cloud_util
-from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, 
UPGRADE_TYPE_ROLLING
-from resource_management.core.exceptions import ExecutionFailed
-
-# This file contains functions used for setup/configure of Ranger Admin and 
Ranger Usersync.
-# The design is to mimic what is done by the setup.sh script bundled by Ranger 
component currently.
-
-def ranger(name=None, upgrade_type=None):
-  """
-  parameter name: name of ranger service component
-  """
-  if name == 'ranger_admin':
-setup_ranger_admin(upgrade_type=upgrade_type)
-
-  if name == 'ranger_usersync':
-setup_usersync(upgrade_type=upgrade_type)
-
-  if name == 'ranger_tagsync':
-setup_tagsync(upgrade_type=upgrade_type)
-
-def setup_ranger_admin(upgrade_type=None):
-  import params
-
-  if upgrade_type is None:
-upgrade_type = 
Script.get_upgrade_type(default("/commandParams/upgrade_type", ""))
-
-  ranger_home = params.ranger_home
-  ranger_conf = params.ranger_conf
-
-  Directory(ranger_conf,
-owner = params.unix_user,
-group = params.unix_group,
-create_parents = True
-  )
-
-  copy_jdbc_connector()
-
-  File(format("/usr/lib/ambari-agent/{check_db_connection_jar_name}"),
-content = 
DownloadSource(format("{jdk_location}{check_db_connection_jar_name}")),
-mode = 0644,
-  )
-
-  cp = format("{check_db_connection_jar}")
-  if params.db_flavor.lower() == 'sqla':
-cp = cp + os.pathsep + format("{ranger_home}/ews/lib/sajdbc4.jar")
-  else:
-cp = cp + os.pathsep + format("{driver_curl_target}")
-  cp = cp + os.pathsep + format("{ranger_home}/ews/lib/*")
-
-  db_connection_check_command = format(
-"{java_home}/bin/java -cp {cp} 
org.apache.ambari.server.DBConnectionVerification 
'{ranger_jdbc_connection_url}' {ranger_db_user} {ranger_db_password!p} 
{ranger_jdbc_driver}")
-
-  env_dict = {}
-  if params.db_flavor.lower() == 'sqla':
-env_dict = {'LD_LIBRARY_PATH':params.ld_lib_path}
-
-  Execute(db_connection_check_command, 
path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin', tries=5, try_sleep=10, 
environment=env_dict)
-
-  Execute(('ln','-sf', 
format('{ranger_home}/ews/webapp/WEB-INF/classes/conf'), 
format('{ranger_home}/conf')),
-not_if=format("ls {ranger_home}/conf"),
-only_if=format("ls {ranger_home}/ews/webapp/WEB-INF/classes/conf"),
-sudo=True)
-
-  if upgrade_type is not None:
-src_file = 
format('{ranger_home}/ews/webapp/WEB-INF/classes/conf.dist/ranger-admin-default-site.xml')
-dst_file = 

[03/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/status_params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/status_params.py
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/status_params.py
deleted file mode 100644
index 34d0082..000
--- 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/status_params.py
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env python
-"""
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-"""
-
-from resource_management.libraries.script import Script
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.default import default
-from resource_management.libraries.functions.version import 
format_stack_version
-from resource_management.libraries.functions.stack_features import 
check_stack_feature
-from resource_management.libraries.functions import StackFeature
-
-config  = Script.get_config()
-tmp_dir = Script.get_tmp_dir()
-
-stack_name = default("/hostLevelParams/stack_name", None)
-stack_version_unformatted = config['hostLevelParams']['stack_version']
-stack_version_formatted = format_stack_version(stack_version_unformatted)
-stack_supports_pid = stack_version_formatted and 
check_stack_feature(StackFeature.RANGER_KMS_PID_SUPPORT, 
stack_version_formatted)
-ranger_kms_pid_dir = default("/configurations/kms-env/ranger_kms_pid_dir", 
"/var/run/ranger_kms")
-ranger_kms_pid_file = format('{ranger_kms_pid_dir}/rangerkms.pid')
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/upgrade.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/upgrade.py
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/upgrade.py
deleted file mode 100644
index 8478bb8..000
--- 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/scripts/upgrade.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env python
-"""
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-"""
-from resource_management.core.resources.system import Execute
-from resource_management.libraries.functions import conf_select
-from resource_management.libraries.functions import stack_select
-from resource_management.libraries.functions.format import format
-
-def prestart(env, stack_component):
-  import params
-
-  if params.version and params.stack_supports_config_versioning:
-conf_select.select(params.stack_name, stack_component, params.version)
-stack_select.select(stack_component, params.version)

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/templates/input.config-ranger-kms.json.j2
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/templates/input.config-ranger-kms.json.j2
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/package/templates/input.config-ranger-kms.json.j2
deleted file mode 100644
index 306fade..000

[10/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/atlas-tagsync-ssl.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/atlas-tagsync-ssl.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/atlas-tagsync-ssl.xml
new file mode 100644
index 000..d43c010
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/atlas-tagsync-ssl.xml
@@ -0,0 +1,72 @@
+
+
+
+  
+xasecure.policymgr.clientssl.keystore
+/etc/security/serverKeys/atlas-tagsync-keystore.jks
+Java Keystore files
+
+  
+
+  
+xasecure.policymgr.clientssl.keystore.password
+myKeyFilePassword
+PASSWORD
+password for keystore
+
+  password
+
+
+  
+
+  
+xasecure.policymgr.clientssl.truststore
+/etc/security/serverKeys/atlas-tagsync-mytruststore.jks
+java truststore file
+
+  
+
+  
+xasecure.policymgr.clientssl.truststore.password
+changeit
+PASSWORD
+java truststore password
+
+  password
+
+
+  
+
+  
+xasecure.policymgr.clientssl.keystore.credential.file
+jceks://file{{atlas_tagsync_credential_file}}
+java keystore credential file
+
+  
+
+  
+xasecure.policymgr.clientssl.truststore.credential.file
+jceks://file{{atlas_tagsync_credential_file}}
+java truststore credential file
+
+  
+
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-admin-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-admin-site.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-admin-site.xml
new file mode 100644
index 000..e2b6c24
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/configuration/ranger-admin-site.xml
@@ -0,0 +1,751 @@
+
+
+
+  
+ranger.service.host
+{{ranger_host}}
+Host where ranger service to be installed
+
+  
+  
+ranger.service.http.enabled
+true
+HTTP enabled
+Enable HTTP
+
+  false
+  boolean
+
+
+  
+  
+ranger.service.http.port
+6080
+HTTP port
+
+  
+  
+ranger.service.https.port
+6182
+HTTPS port (if SSL is enabled)
+
+  
+  
+ranger.service.https.attrib.ssl.enabled
+false
+true/false, set to true if using SSL
+
+  false
+  boolean
+
+
+  
+  
+ranger.service.https.attrib.clientAuth
+want
+Needs to be set to want for two way SSL
+
+  
+  
+ranger.service.https.attrib.keystore.keyalias
+rangeradmin
+Alias for Ranger Admin key in keystore
+
+  
+  
+ranger.service.https.attrib.keystore.pass
+xasecure
+PASSWORD
+Password for keystore
+
+  password
+
+
+  
+  
+ranger.https.attrib.keystore.file
+/etc/security/serverKeys/ranger-admin-keystore.jks
+Ranger admin keystore (specify full path)
+
+  
+  
+ranger.externalurl
+{{ranger_external_url}}
+External URL
+URL to be used by clients to access ranger admin
+
+  false
+  false
+
+
+  
+  
+ranger.jpa.jdbc.driver
+com.mysql.jdbc.Driver
+Driver class name for a JDBC Ranger database
+JDBC driver class name. Example: For MySQL / MariaDB: 
com.mysql.jdbc.Driver, For Oracle: oracle.jdbc.OracleDriver
+
+  false
+
+
+  
+admin-properties
+DB_FLAVOR
+  
+
+
+  
+  
+ranger.jpa.jdbc.url
+jdbc:mysql://localhost
+JDBC connect string for a Ranger database
+JDBC connect string
+
+  false
+
+
+  
+admin-properties
+DB_FLAVOR
+  
+  
+admin-properties
+db_host
+  
+  
+admin-properties
+db_name
+  
+
+
+  
+  
+ranger.jpa.jdbc.user
+{{ranger_db_user}}
+JDBC user
+
+  
+  
+ranger.jpa.jdbc.password
+_
+PASSWORD
+JDBC password
+
+  password
+
+
+  
+  
+ranger.jpa.jdbc.credential.alias
+rangeradmin
+Alias name for storing JDBC password
+
+  
+  
+ranger.credential.provider.path
+/etc/ranger/admin/rangeradmin.jceks
+File for credential store, provide full file 
path
+
+  
+  
+ranger.audit.source.type
+solr
+db or solr, based on the audit destination used
+
+  
+ranger-env
+xasecure.audit.destination.solr
+  
+  
+ranger-env
+xasecure.audit.destination.db
+  
+
+
+  
+  
+ranger.audit.solr.urls
+
+Solr url for audit. Example: 

[04/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-site.xml
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-site.xml
deleted file mode 100644
index 1e6f7b5..000
--- 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/kms-site.xml
+++ /dev/null
@@ -1,133 +0,0 @@
-
-
-
-  
-hadoop.kms.key.provider.uri
-dbks://http@localhost:9292/kms
-URI of the backing KeyProvider for the KMS.
-
-  
-  
-hadoop.security.keystore.JavaKeyStoreProvider.password
-none
-If using the JavaKeyStoreProvider, the password for the 
keystore file.
-
-  
-  
-hadoop.kms.cache.enable
-true
-Whether the KMS will act as a cache for the backing 
KeyProvider. When the cache is enabled, operations like getKeyVersion, 
getMetadata, and getCurrentKey will sometimes return cached data without 
consulting the backing KeyProvider. Cached values are flushed when keys are 
deleted or modified.
-
-
-  
-  
-hadoop.kms.cache.timeout.ms
-60
-Expiry time for the KMS key version and key metadata cache, 
in milliseconds. This affects getKeyVersion and getMetadata.
-
-
-  
-  
-hadoop.kms.current.key.cache.timeout.ms
-3
-Expiry time for the KMS current key cache, in milliseconds. 
This affects getCurrentKey operations.
-
-  
-  
-hadoop.kms.audit.aggregation.window.ms
-1
-Duplicate audit log events within the aggregation window 
(specified in ms) are quashed to reduce log traffic. A single message for 
aggregated events is printed at the end of the window, along with a count of 
the number of aggregated events.
-
-  
-  
-hadoop.kms.authentication.type
-simple
-Authentication type for the KMS. Can be either "simple" or 
"kerberos".
-
-
-  
-  
-hadoop.kms.authentication.kerberos.keytab
-${user.home}/kms.keytab
-Path to the keytab with credentials for the configured 
Kerberos principal.
-
-  
-  
-hadoop.kms.authentication.kerberos.principal
-HTTP/localhost
-The Kerberos principal to use for the HTTP endpoint. The 
principal must start with 'HTTP/' as per the Kerberos HTTP SPNEGO 
specification.
-KERBEROS_PRINCIPAL
-
-  
-  
-hadoop.kms.authentication.kerberos.name.rules
-DEFAULT
-Rules used to resolve Kerberos principal names.
-
-  multiLine
-
-
-  
-  
-hadoop.kms.authentication.signer.secret.provider
-random
-Indicates how the secret to sign the authentication cookies 
will be stored. Options are 'random' (default), 'string' and 'zookeeper'. If 
using a setup with multiple KMS instances, 'zookeeper' should be used.
-
-
-  
-  
-
hadoop.kms.authentication.signer.secret.provider.zookeeper.path
-/hadoop-kms/hadoop-auth-signature-secret
-The Zookeeper ZNode path where the KMS instances will store 
and retrieve the secret from.
-
-  
-  
-
hadoop.kms.authentication.signer.secret.provider.zookeeper.connection.string
-#HOSTNAME#:#PORT#,...
-The Zookeeper connection string, a list of hostnames and port 
comma separated.
-
-  
-  
-
hadoop.kms.authentication.signer.secret.provider.zookeeper.auth.type
-kerberos
-The Zookeeper authentication type, 'none' or 'sasl' 
(Kerberos).
-
-  
-  
-
hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.keytab
-/etc/hadoop/conf/kms.keytab
-The absolute path for the Kerberos keytab with the 
credentials to connect to Zookeeper.
-
-  
-  
-
hadoop.kms.authentication.signer.secret.provider.zookeeper.kerberos.principal
-kms/#HOSTNAME#
-The Kerberos service principal used to connect to 
Zookeeper.
-KERBEROS_PRINCIPAL
-
-  
-  
-hadoop.kms.security.authorization.manager
-
org.apache.ranger.authorization.kms.authorizer.RangerKmsAuthorizer
-
-
-  
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-audit.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-audit.xml
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-audit.xml
deleted file mode 100644
index 526794e..000
--- 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.3.0/configuration/ranger-kms-audit.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-
-  
-xasecure.audit.is.enabled
-true
-Is Audit enabled?
-
-  
-  
-xasecure.audit.destination.hdfs
-true
-Audit to HDFS
-Is 

[11/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_2.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_2.json
 
b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_2.json
deleted file mode 100644
index cbd27e4..000
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/themes/theme_version_2.json
+++ /dev/null
@@ -1,1470 +0,0 @@
-{
-  "name": "default",
-  "description": "Default theme for Ranger service",
-  "configuration": {
-"layouts": [
-  {
-"name": "default",
-"tabs": [
-  {
-"name": "ranger_admin_settings",
-"display-name": "Ranger Admin",
-"layout": {
-  "tab-columns": "2",
-  "tab-rows": "2",
-  "sections": [
-{
-  "name": "section-ranger-admin",
-  "display-name": "Ranger Admin",
-  "row-index": "0",
-  "column-index": "0",
-  "row-span": "3",
-  "column-span": "2",
-  "section-columns": "2",
-  "section-rows": "3",
-  "subsections": [
-{
-  "name": "subsection-ranger-db-row1-col1",
-  "row-index": "0",
-  "column-index": "0",
-  "row-span": "1",
-  "column-span": "1"
-},
-{
-  "name": "subsection-ranger-db-row1-col2",
-  "row-index": "0",
-  "column-index": "1",
-  "row-span": "1",
-  "column-span": "1"
-},
-{
-  "name": "subsection-ranger-db-row2",
-  "row-index": "1",
-  "column-index": "0",
-  "row-span": "1",
-  "column-span": "2"
-},
-{
-  "name": "subsection-ranger-db-root-user-col1",
-  "row-index": "2",
-  "column-index": "0",
-  "row-span": "1",
-  "column-span": "1",
-  "depends-on": [
-{
-  "configs":[
-"ranger-env/create_db_dbuser"
-  ],
-  "if": "${ranger-env/create_db_dbuser}",
-  "then": {
-"property_value_attributes": {
-  "visible": true
-}
-  },
-  "else": {
-"property_value_attributes": {
-  "visible": false
-}
-  }
-}
-  ]
-},
-{
-  "name": "subsection-ranger-db-root-user-col2",
-  "row-index": "2",
-  "column-index": "1",
-  "row-span": "1",
-  "column-span": "1",
-  "depends-on": [
-{
-  "configs":[
-"ranger-env/create_db_dbuser"
-  ],
-  "if": "${ranger-env/create_db_dbuser}",
-  "then": {
-"property_value_attributes": {
-  "visible": true
-}
-  },
-  "else": {
-"property_value_attributes": {
-  "visible": false
-}
-  }
-}
-  ]
-}
-  ]
-}
-  ]
-}
-  },
-  {
-"name": "ranger_user_info",
-"display-name": "Ranger User Info",
-"layout": {
-  "tab-columns": "1",
-  "tab-rows": "1",
-  "sections": [
-{
-  "name": "section-user-info",
-  "display-name": "Ranger User Info",
-  "row-index": "0",
-  "column-index": "0",
-  "row-span": "2",
-  "column-span": "1",
-  "section-columns": "1",
-  "section-rows": "2",
-  "subsections": [
-{
-

[06/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/service_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/service_advisor.py
 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/service_advisor.py
new file mode 100644
index 000..f37261f
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/service_advisor.py
@@ -0,0 +1,774 @@
+#!/usr/bin/env ambari-python-wrap
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+# Python imports
+import imp
+import os
+import traceback
+import re
+import socket
+import fnmatch
+
+
+from resource_management.core.logger import Logger
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../stacks/')
+PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py')
+
+try:
+  with open(PARENT_FILE, 'rb') as fp:
+service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, 
('.py', 'rb', imp.PY_SOURCE))
+except Exception as e:
+  traceback.print_exc()
+  print "Failed to load parent"
+
+DB_TYPE_DEFAULT_PORT_MAP = {"MYSQL":"3306", "ORACLE":"1521", 
"POSTGRES":"5432", "MSSQL":"1433", "SQLA":"2638"}
+
+class RangerServiceAdvisor(service_advisor.ServiceAdvisor):
+
+  def __init__(self, *args, **kwargs):
+self.as_super = super(RangerServiceAdvisor, self)
+self.as_super.__init__(*args, **kwargs)
+
+# Always call these methods
+self.modifyMastersWithMultipleInstances()
+self.modifyCardinalitiesDict()
+self.modifyHeapSizeProperties()
+self.modifyNotValuableComponents()
+self.modifyComponentsNotPreferableOnServer()
+self.modifyComponentLayoutSchemes()
+
+  def modifyMastersWithMultipleInstances(self):
+"""
+Modify the set of masters with multiple instances.
+Must be overriden in child class.
+"""
+# Nothing to do
+pass
+
+  def modifyCardinalitiesDict(self):
+"""
+Modify the dictionary of cardinalities.
+Must be overriden in child class.
+"""
+# Nothing to do
+pass
+
+  def modifyHeapSizeProperties(self):
+"""
+Modify the dictionary of heap size properties.
+Must be overriden in child class.
+"""
+pass
+
+  def modifyNotValuableComponents(self):
+"""
+Modify the set of components whose host assignment is based on other 
services.
+Must be overriden in child class.
+"""
+# Nothing to do
+pass
+
+  def modifyComponentsNotPreferableOnServer(self):
+"""
+Modify the set of components that are not preferable on the server.
+Must be overriden in child class.
+"""
+# Nothing to do
+pass
+
+  def modifyComponentLayoutSchemes(self):
+"""
+Modify layout scheme dictionaries for components.
+The scheme dictionary basically maps the number of hosts to
+host index where component should exist.
+Must be overriden in child class.
+"""
+# Nothing to do
+pass
+
+  def getServiceComponentLayoutValidations(self, services, hosts):
+"""
+Get a list of errors.
+Must be overriden in child class.
+"""
+
+return []
+
+  def getServiceConfigurationRecommendations(self, configurations, 
clusterData, services, hosts):
+"""
+Entry point.
+Must be overriden in child class.
+"""
+# Logger.info("Class: %s, Method: %s. Recommending Service 
Configurations." %
+#(self.__class__.__name__, inspect.stack()[0][3]))
+
+recommender = RangerRecommender()
+recommender.recommendRangerConfigurationsFromHDP206(configurations, 
clusterData, services, hosts)
+recommender.recommendRangerConfigurationsFromHDP22(configurations, 
clusterData, services, hosts)
+recommender.recommendRangerConfigurationsFromHDP23(configurations, 
clusterData, services, hosts)
+recommender.recommendRangerConfigurationsFromHDP25(configurations, 
clusterData, services, hosts)
+recommender.recommendRangerConfigurationsFromHDP26(configurations, 
clusterData, services, hosts)
+
+  def getServiceConfigurationsValidationItems(self, configurations, 
recommendedDefaults, services, hosts):
+   

[15/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/params.py
deleted file mode 100644
index 094d239..000
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/package/scripts/params.py
+++ /dev/null
@@ -1,448 +0,0 @@
-#!/usr/bin/env python
-"""
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-"""
-
-import os
-from resource_management.libraries.script import Script
-from resource_management.libraries.functions.version import 
format_stack_version
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.default import default
-from resource_management.libraries.functions.is_empty import is_empty
-from resource_management.libraries.functions.constants import Direction
-from resource_management.libraries.functions.stack_features import 
check_stack_feature
-from resource_management.libraries.functions.stack_features import 
get_stack_feature_version
-from resource_management.libraries.functions import StackFeature
-from resource_management.libraries.functions.get_bare_principal import 
get_bare_principal
-
-# a map of the Ambari role to the component name
-# for use with /current/
-SERVER_ROLE_DIRECTORY_MAP = {
-  'RANGER_ADMIN' : 'ranger-admin',
-  'RANGER_USERSYNC' : 'ranger-usersync',
-  'RANGER_TAGSYNC' : 'ranger-tagsync'
-}
-
-component_directory = 
Script.get_component_from_role(SERVER_ROLE_DIRECTORY_MAP, "RANGER_ADMIN")
-
-config  = Script.get_config()
-tmp_dir = Script.get_tmp_dir()
-stack_root = Script.get_stack_root()
-
-stack_name = default("/hostLevelParams/stack_name", None)
-version = default("/commandParams/version", None)
-
-stack_version_unformatted = config['hostLevelParams']['stack_version']
-stack_version_formatted = format_stack_version(stack_version_unformatted)
-
-upgrade_marker_file = format("{tmp_dir}/rangeradmin_ru.inprogress")
-
-xml_configurations_supported = 
config['configurations']['ranger-env']['xml_configurations_supported']
-
-create_db_dbuser = config['configurations']['ranger-env']['create_db_dbuser']
-
-# get the correct version to use for checking stack features
-version_for_stack_feature_checks = get_stack_feature_version(config)
-
-stack_supports_rolling_upgrade = 
check_stack_feature(StackFeature.ROLLING_UPGRADE, 
version_for_stack_feature_checks)
-stack_supports_config_versioning = 
check_stack_feature(StackFeature.CONFIG_VERSIONING, 
version_for_stack_feature_checks)
-stack_supports_usersync_non_root = 
check_stack_feature(StackFeature.RANGER_USERSYNC_NON_ROOT, 
version_for_stack_feature_checks)
-stack_supports_ranger_tagsync = 
check_stack_feature(StackFeature.RANGER_TAGSYNC_COMPONENT, 
version_for_stack_feature_checks)
-stack_supports_ranger_audit_db = 
check_stack_feature(StackFeature.RANGER_AUDIT_DB_SUPPORT, 
version_for_stack_feature_checks)
-stack_supports_ranger_log4j = 
check_stack_feature(StackFeature.RANGER_LOG4J_SUPPORT, 
version_for_stack_feature_checks)
-stack_supports_ranger_kerberos = 
check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT, 
version_for_stack_feature_checks)
-stack_supports_usersync_passwd = 
check_stack_feature(StackFeature.RANGER_USERSYNC_PASSWORD_JCEKS, 
version_for_stack_feature_checks)
-stack_supports_infra_client = 
check_stack_feature(StackFeature.RANGER_INSTALL_INFRA_CLIENT, 
version_for_stack_feature_checks)
-stack_supports_pid = check_stack_feature(StackFeature.RANGER_PID_SUPPORT, 
version_for_stack_feature_checks)
-stack_supports_ranger_admin_password_change = 
check_stack_feature(StackFeature.RANGER_ADMIN_PASSWD_CHANGE, 
version_for_stack_feature_checks)
-stack_supports_ranger_setup_db_on_start = 
check_stack_feature(StackFeature.RANGER_SETUP_DB_ON_START, 
version_for_stack_feature_checks)
-stack_supports_ranger_tagsync_ssl_xml_support = 
check_stack_feature(StackFeature.RANGER_TAGSYNC_SSL_XML_SUPPORT, 
version_for_stack_feature_checks)
-stack_supports_ranger_solr_configs = 

[02/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/metainfo.xml
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/metainfo.xml
new file mode 100644
index 000..d328d89
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/metainfo.xml
@@ -0,0 +1,111 @@
+
+
+
+  2.0
+  
+
+  RANGER_KMS
+  Ranger KMS
+  Key Management Server
+  1.0.0.3.0
+  
+
+
+  RANGER_KMS_SERVER
+  Ranger KMS Server
+  MASTER
+  1+
+  true
+  
+scripts/kms_server.py
+PYTHON
+600
+  
+  
+
+  ranger_kms
+  true
+
+  
+  
+
+  HDFS/HDFS_CLIENT
+  host
+  
+true
+  
+
+  
+
+  
+
+
+  
+
+  redhat7,amazon2015,redhat6,suse11,suse12
+  
+
+  ranger_${stack_version}-kms
+
+  
+
+
+  debian7,ubuntu12,ubuntu14,ubuntu16
+  
+
+  ranger-${stack_version}-kms
+
+  
+
+  
+
+  
+kms-properties
+kms-site
+kms-log4j
+dbks-site
+ranger-kms-site
+ranger-kms-audit
+ranger-kms-policymgr-ssl
+ranger-kms-security
+  
+
+  
+scripts/service_check.py
+PYTHON
+300
+  
+
+  
+RANGER
+HDFS
+  
+
+  
+
+  theme_version_1.json
+  true
+
+  
+
+
+  
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms.py
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms.py
new file mode 100755
index 000..6e4a171
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms.py
@@ -0,0 +1,675 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+import sys
+import fileinput
+import os
+import ambari_simplejson as json # simplejson is much faster comparing to 
Python 2.6 json module and has the same functions set.
+import urllib2, base64, httplib
+from StringIO import StringIO as BytesIO
+from datetime import datetime
+from resource_management.core.resources.system import File, Directory, Execute
+from resource_management.libraries.resources.xml_config import XmlConfig
+from resource_management.libraries.resources.modify_properties_file import 
ModifyPropertiesFile
+from resource_management.core.source import DownloadSource, InlineTemplate
+from resource_management.core.exceptions import Fail
+from resource_management.core.logger import Logger
+from resource_management.libraries.functions.is_empty import is_empty
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.ranger_functions import 
Rangeradmin
+from resource_management.libraries.functions.ranger_functions_v2 import 
RangeradminV2
+from resource_management.libraries.functions.decorator import safe_retry
+from resource_management.core.utils import PasswordString
+from resource_management.core.shell import as_sudo
+import re
+import time
+import socket
+
+def password_validation(password, key):
+  import params
+  if password.strip() == "":
+raise Fail("Blank password is not allowed for {0} property. Please enter 
valid password.".format(key))
+  if re.search("[\\\`'\"]",password):
+raise Fail("{0} password contains one of the unsupported special 
characters like \" ' \ `".format(key))
+  else:
+Logger.info("Password 

[12/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/service_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/service_advisor.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/service_advisor.py
deleted file mode 100644
index 875fa30..000
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/service_advisor.py
+++ /dev/null
@@ -1,793 +0,0 @@
-#!/usr/bin/env ambari-python-wrap
-"""
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
-
-# Python imports
-import imp
-import os
-import traceback
-import re
-import socket
-import fnmatch
-
-
-from resource_management.core.logger import Logger
-
-SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
-STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../stacks/')
-PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py')
-
-try:
-  with open(PARENT_FILE, 'rb') as fp:
-service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, 
('.py', 'rb', imp.PY_SOURCE))
-except Exception as e:
-  traceback.print_exc()
-  print "Failed to load parent"
-
-DB_TYPE_DEFAULT_PORT_MAP = {"MYSQL":"3306", "ORACLE":"1521", 
"POSTGRES":"5432", "MSSQL":"1433", "SQLA":"2638"}
-
-class RangerServiceAdvisor(service_advisor.ServiceAdvisor):
-
-  def __init__(self, *args, **kwargs):
-self.as_super = super(RangerServiceAdvisor, self)
-self.as_super.__init__(*args, **kwargs)
-
-# Always call these methods
-self.modifyMastersWithMultipleInstances()
-self.modifyCardinalitiesDict()
-self.modifyHeapSizeProperties()
-self.modifyNotValuableComponents()
-self.modifyComponentsNotPreferableOnServer()
-self.modifyComponentLayoutSchemes()
-
-  def modifyMastersWithMultipleInstances(self):
-"""
-Modify the set of masters with multiple instances.
-Must be overriden in child class.
-"""
-# Nothing to do
-pass
-
-  def modifyCardinalitiesDict(self):
-"""
-Modify the dictionary of cardinalities.
-Must be overriden in child class.
-"""
-# Nothing to do
-pass
-
-  def modifyHeapSizeProperties(self):
-"""
-Modify the dictionary of heap size properties.
-Must be overriden in child class.
-"""
-pass
-
-  def modifyNotValuableComponents(self):
-"""
-Modify the set of components whose host assignment is based on other 
services.
-Must be overriden in child class.
-"""
-# Nothing to do
-pass
-
-  def modifyComponentsNotPreferableOnServer(self):
-"""
-Modify the set of components that are not preferable on the server.
-Must be overriden in child class.
-"""
-# Nothing to do
-pass
-
-  def modifyComponentLayoutSchemes(self):
-"""
-Modify layout scheme dictionaries for components.
-The scheme dictionary basically maps the number of hosts to
-host index where component should exist.
-Must be overriden in child class.
-"""
-# Nothing to do
-pass
-
-  def getServiceComponentLayoutValidations(self, services, hosts):
-"""
-Get a list of errors.
-Must be overriden in child class.
-"""
-
-return []
-
-  def getServiceConfigurationRecommendations(self, configurations, 
clusterData, services, hosts):
-"""
-Entry point.
-Must be overriden in child class.
-"""
-#Logger.info("Class: %s, Method: %s. Recommending Service Configurations." 
%
-#(self.__class__.__name__, inspect.stack()[0][3]))
-
-recommender = RangerRecommender()
-recommender.recommendRangerConfigurationsFromHDP206(configurations, 
clusterData, services, hosts)
-recommender.recommendRangerConfigurationsFromHDP22(configurations, 
clusterData, services, hosts)
-recommender.recommendRangerConfigurationsFromHDP23(configurations, 
clusterData, services, hosts)
-recommender.recommendRangerConfigurationsFromHDP25(configurations, 
clusterData, services, hosts)
-recommender.recommendRangerConfigurationsFromHDP26(configurations, 
clusterData, services, hosts)
-
-
-
-  def getServiceConfigurationsValidationItems(self, configurations, 
recommendedDefaults, services, 

[08/17] ambari git commit: AMBARI-21058 HDP 3.0 - Changing common service version for Ranger & Ranger Kms (mugdha)

2017-07-05 Thread mugdha
http://git-wip-us.apache.org/repos/asf/ambari/blob/3dc51b0c/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/setup_ranger_xml.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/setup_ranger_xml.py
 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/setup_ranger_xml.py
new file mode 100644
index 000..c84ae96
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/setup_ranger_xml.py
@@ -0,0 +1,853 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+import os
+import re
+from resource_management.libraries.script import Script
+from resource_management.libraries.functions.default import default
+from resource_management.core.logger import Logger
+from resource_management.core.resources.system import File, Directory, 
Execute, Link
+from resource_management.core.source import DownloadSource, InlineTemplate, 
Template
+from resource_management.libraries.resources.xml_config import XmlConfig
+from resource_management.libraries.resources.modify_properties_file import 
ModifyPropertiesFile
+from resource_management.libraries.resources.properties_file import 
PropertiesFile
+from resource_management.core.exceptions import Fail
+from resource_management.libraries.functions.decorator import retry
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.is_empty import is_empty
+from resource_management.core.utils import PasswordString
+from resource_management.core.shell import as_sudo
+from resource_management.libraries.functions import solr_cloud_util
+from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, 
UPGRADE_TYPE_ROLLING
+from resource_management.core.exceptions import ExecutionFailed
+
+# This file contains functions used for setup/configure of Ranger Admin and 
Ranger Usersync.
+# The design is to mimic what is done by the setup.sh script bundled by Ranger 
component currently.
+
+def ranger(name=None, upgrade_type=None):
+  """
+  parameter name: name of ranger service component
+  """
+  if name == 'ranger_admin':
+setup_ranger_admin(upgrade_type=upgrade_type)
+
+  if name == 'ranger_usersync':
+setup_usersync(upgrade_type=upgrade_type)
+
+  if name == 'ranger_tagsync':
+setup_tagsync(upgrade_type=upgrade_type)
+
+def setup_ranger_admin(upgrade_type=None):
+  import params
+
+  if upgrade_type is None:
+upgrade_type = 
Script.get_upgrade_type(default("/commandParams/upgrade_type", ""))
+
+  ranger_home = params.ranger_home
+  ranger_conf = params.ranger_conf
+
+  Directory(ranger_conf,
+owner = params.unix_user,
+group = params.unix_group,
+create_parents = True
+  )
+
+  copy_jdbc_connector()
+
+  File(format("/usr/lib/ambari-agent/{check_db_connection_jar_name}"),
+content = 
DownloadSource(format("{jdk_location}{check_db_connection_jar_name}")),
+mode = 0644,
+  )
+
+  cp = format("{check_db_connection_jar}")
+  if params.db_flavor.lower() == 'sqla':
+cp = cp + os.pathsep + format("{ranger_home}/ews/lib/sajdbc4.jar")
+  else:
+cp = cp + os.pathsep + format("{driver_curl_target}")
+  cp = cp + os.pathsep + format("{ranger_home}/ews/lib/*")
+
+  db_connection_check_command = format(
+"{java_home}/bin/java -cp {cp} 
org.apache.ambari.server.DBConnectionVerification 
'{ranger_jdbc_connection_url}' {ranger_db_user} {ranger_db_password!p} 
{ranger_jdbc_driver}")
+
+  env_dict = {}
+  if params.db_flavor.lower() == 'sqla':
+env_dict = {'LD_LIBRARY_PATH':params.ld_lib_path}
+
+  Execute(db_connection_check_command, 
path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin', tries=5, try_sleep=10, 
environment=env_dict)
+
+  Execute(('ln','-sf', 
format('{ranger_home}/ews/webapp/WEB-INF/classes/conf'), 
format('{ranger_home}/conf')),
+not_if=format("ls {ranger_home}/conf"),
+only_if=format("ls {ranger_home}/ews/webapp/WEB-INF/classes/conf"),
+sudo=True)
+
+  if upgrade_type is not None:
+src_file = 
format('{ranger_home}/ews/webapp/WEB-INF/classes/conf.dist/ranger-admin-default-site.xml')
+dst_file = 

ambari git commit: AMBARI-21256 : As part of START_ALL Ranger kms starts after hbase and hive causing their start failure (Vishal Suvagia via mugdha)

2017-06-28 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 4c1ea4c46 -> 5e50042a7


AMBARI-21256 : As part of START_ALL Ranger kms starts after hbase and hive 
causing their start failure (Vishal Suvagia via mugdha)


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

Branch: refs/heads/trunk
Commit: 5e50042a78e4ddcb8e50bb28289ba67c50fb502c
Parents: 4c1ea4c
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Thu Jun 15 15:27:47 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Wed Jun 28 14:00:01 2017 +0530

--
 .../common-services/HBASE/0.96.0.2.0/role_command_order.json  | 3 +--
 .../common-services/HBASE/2.0.0.3.0/role_command_order.json   | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5e50042a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
index 110b179..58d0c1c 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
@@ -4,7 +4,6 @@
 "HBASE_REGIONSERVER-START": ["HBASE_MASTER-START"],
 "HBASE_SERVICE_CHECK-SERVICE_CHECK": ["HBASE_MASTER-START", 
"HBASE_REGIONSERVER-START"],
 "HBASE_MASTER-STOP": ["HBASE_REGIONSERVER-STOP"],
-"HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START", 
"ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START"]
-
+"HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START", 
"ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START", "RANGER_KMS_SERVER-START"]
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5e50042a/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/role_command_order.json
 
b/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/role_command_order.json
index 44d0c61..69f4bf6 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/role_command_order.json
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/role_command_order.json
@@ -4,7 +4,7 @@
 "HBASE_REGIONSERVER-START": ["HBASE_MASTER-START"],
 "HBASE_SERVICE_CHECK-SERVICE_CHECK": ["HBASE_MASTER-START", 
"HBASE_REGIONSERVER-START"],
 "HBASE_MASTER-STOP": ["HBASE_REGIONSERVER-STOP"],
-"HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START", 
"ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START"],
+"HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START", 
"ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START", "RANGER_KMS_SERVER-START"],
 "PHOENIX_QUERY_SERVER-START": ["HBASE_MASTER-START"]
   }
 }



ambari git commit: Revert "BUG-82124 : As part of START_ALL Ranger kms starts after hbase and hive causing their start failure (Vishal Suvagia via mugdha)"

2017-06-28 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 39efba359 -> 4c1ea4c46


Revert "BUG-82124 : As part of START_ALL Ranger kms starts after hbase and hive 
causing their start failure (Vishal Suvagia via mugdha)"

This reverts commit 39efba35980642b832f79c6afb332716045d859f.


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

Branch: refs/heads/trunk
Commit: 4c1ea4c46c71bcae5d054eb7465283bca85cc9e8
Parents: 39efba3
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Wed Jun 28 13:58:10 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Wed Jun 28 13:58:10 2017 +0530

--
 .../common-services/HBASE/0.96.0.2.0/role_command_order.json  | 3 ++-
 .../common-services/HBASE/2.0.0.3.0/role_command_order.json   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4c1ea4c4/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
index 58d0c1c..110b179 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
@@ -4,6 +4,7 @@
 "HBASE_REGIONSERVER-START": ["HBASE_MASTER-START"],
 "HBASE_SERVICE_CHECK-SERVICE_CHECK": ["HBASE_MASTER-START", 
"HBASE_REGIONSERVER-START"],
 "HBASE_MASTER-STOP": ["HBASE_REGIONSERVER-STOP"],
-"HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START", 
"ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START", "RANGER_KMS_SERVER-START"]
+"HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START", 
"ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START"]
+
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/4c1ea4c4/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/role_command_order.json
 
b/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/role_command_order.json
index 69f4bf6..44d0c61 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/role_command_order.json
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/role_command_order.json
@@ -4,7 +4,7 @@
 "HBASE_REGIONSERVER-START": ["HBASE_MASTER-START"],
 "HBASE_SERVICE_CHECK-SERVICE_CHECK": ["HBASE_MASTER-START", 
"HBASE_REGIONSERVER-START"],
 "HBASE_MASTER-STOP": ["HBASE_REGIONSERVER-STOP"],
-"HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START", 
"ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START", "RANGER_KMS_SERVER-START"],
+"HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START", 
"ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START"],
 "PHOENIX_QUERY_SERVER-START": ["HBASE_MASTER-START"]
   }
 }



ambari git commit: AMBARI-21256 : As part of START_ALL Ranger kms starts after hbase and hive causing their start failure (Vishal Suvagia via mugdha)

2017-06-28 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 59aee427e -> f0136c478


AMBARI-21256 : As part of START_ALL Ranger kms starts after hbase and hive 
causing their start failure (Vishal Suvagia via mugdha)


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

Branch: refs/heads/branch-2.5
Commit: f0136c47836e98880d76d7d83efb33563d32cce3
Parents: 59aee42
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Thu Jun 15 15:52:35 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Wed Jun 28 13:34:55 2017 +0530

--
 .../HBASE/0.96.0.2.0/role_command_order.json| 9 +
 1 file changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f0136c47/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
new file mode 100644
index 000..58d0c1c
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
@@ -0,0 +1,9 @@
+{
+  "general_deps" : {
+"_comment" : "dependencies for HBase",
+"HBASE_REGIONSERVER-START": ["HBASE_MASTER-START"],
+"HBASE_SERVICE_CHECK-SERVICE_CHECK": ["HBASE_MASTER-START", 
"HBASE_REGIONSERVER-START"],
+"HBASE_MASTER-STOP": ["HBASE_REGIONSERVER-STOP"],
+"HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START", 
"ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START", "RANGER_KMS_SERVER-START"]
+  }
+}



ambari git commit: BUG-82124 : As part of START_ALL Ranger kms starts after hbase and hive causing their start failure (Vishal Suvagia via mugdha)

2017-06-28 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 9aa786f7e -> 39efba359


BUG-82124 : As part of START_ALL Ranger kms starts after hbase and hive causing 
their start failure (Vishal Suvagia via mugdha)


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

Branch: refs/heads/trunk
Commit: 39efba35980642b832f79c6afb332716045d859f
Parents: 9aa786f
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Thu Jun 15 15:27:47 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Wed Jun 28 13:32:37 2017 +0530

--
 .../common-services/HBASE/0.96.0.2.0/role_command_order.json  | 3 +--
 .../common-services/HBASE/2.0.0.3.0/role_command_order.json   | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/39efba35/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
index 110b179..58d0c1c 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/role_command_order.json
@@ -4,7 +4,6 @@
 "HBASE_REGIONSERVER-START": ["HBASE_MASTER-START"],
 "HBASE_SERVICE_CHECK-SERVICE_CHECK": ["HBASE_MASTER-START", 
"HBASE_REGIONSERVER-START"],
 "HBASE_MASTER-STOP": ["HBASE_REGIONSERVER-STOP"],
-"HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START", 
"ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START"]
-
+"HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START", 
"ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START", "RANGER_KMS_SERVER-START"]
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/39efba35/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/role_command_order.json
 
b/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/role_command_order.json
index 44d0c61..69f4bf6 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/role_command_order.json
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/role_command_order.json
@@ -4,7 +4,7 @@
 "HBASE_REGIONSERVER-START": ["HBASE_MASTER-START"],
 "HBASE_SERVICE_CHECK-SERVICE_CHECK": ["HBASE_MASTER-START", 
"HBASE_REGIONSERVER-START"],
 "HBASE_MASTER-STOP": ["HBASE_REGIONSERVER-STOP"],
-"HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START", 
"ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START"],
+"HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START", 
"ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START", "RANGER_KMS_SERVER-START"],
 "PHOENIX_QUERY_SERVER-START": ["HBASE_MASTER-START"]
   }
 }



ambari git commit: AMBARI-21154: Add JAAS config properties for Atlas Hive hook in HiveCli to use kerberos ticket-cache (Vishal Suvagia via mugdha)

2017-06-28 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 e27772edb -> 59aee427e


AMBARI-21154: Add JAAS config properties for Atlas Hive hook in HiveCli to use 
kerberos ticket-cache (Vishal Suvagia via mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 59aee427e56f94f10506515a38c407cba19dea98
Parents: e27772e
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Fri Jun 23 15:51:24 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Wed Jun 28 11:34:55 2017 +0530

--
 .../stacks/HDP/2.5/upgrades/config-upgrade.xml  |  10 +-
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml |   7 +-
 .../stacks/HDP/2.5/upgrades/upgrade-2.6.xml |   5 +-
 .../stacks/HDP/2.6/services/stack_advisor.py|  21 
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  |   9 ++
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |   6 +
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml |   1 +
 .../stacks/2.6/common/test_stack_advisor.py | 123 ++-
 8 files changed, 146 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/59aee427/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
index 483a194..7fedc3a 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
@@ -435,7 +435,15 @@
 
 
   
-
+  
+hive-atlas-application.properties
+
+
+
+  
 
   
 hive-site

http://git-wip-us.apache.org/repos/asf/ambari/blob/59aee427/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
index befc38b..3cab083 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
@@ -617,7 +617,12 @@
   Removing atlas.cluster.name property
 
   
-  
+
+  
+
+  Updating hive atlas application properties
+
+  
   
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/59aee427/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
index 3054ca3..22c9a8d 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
@@ -825,10 +825,11 @@
   
   
   
+  
 
-
+
 
-
+
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/59aee427/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
index 2b4c14c..c1c1f13 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
@@ -548,6 +548,9 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
 
   def recommendHIVEConfigurations(self, configurations, clusterData, services, 
hosts):
 super(HDP26StackAdvisor, self).recommendHIVEConfigurations(configurations, 
clusterData, services, hosts)
+putHiveAtlasHookProperty = self.putProperty(configurations, 
"hive-atlas-application.properties", services)
+putHiveAtlasHookPropertyAttribute = 
self.putPropertyAttribute(configurations,"hive-atlas-application.properties")
+
 if 'hive-env' in services['configurations'] and 'hive_user' in 
services['configurations']['hive-env']['properties']:
   hive_user = 
s

ambari git commit: AMBARI-21154: Add JAAS config properties for Atlas Hive hook in HiveCli to use kerberos ticket-cache.

2017-06-28 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 2f4025050 -> 9aa786f7e


AMBARI-21154: Add JAAS config properties for Atlas Hive hook in HiveCli to use 
kerberos ticket-cache.


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

Branch: refs/heads/trunk
Commit: 9aa786f7ea4c21159e6a014b4cbb6a6de155b22c
Parents: 2f40250
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Fri Jun 23 17:41:50 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Wed Jun 28 11:32:26 2017 +0530

--
 .../HIVE/2.1.0.3.0/service_advisor.py   |  19 +++
 .../stacks/HDP/2.5/upgrades/config-upgrade.xml  |  10 +-
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml |   7 +-
 .../stacks/HDP/2.5/upgrades/upgrade-2.6.xml |   5 +-
 .../stacks/HDP/2.6/services/stack_advisor.py|  21 
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  |   9 ++
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |   6 +
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml |   1 +
 .../stacks/2.6/common/test_stack_advisor.py | 123 ++-
 9 files changed, 165 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9aa786f7/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/service_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/service_advisor.py
 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/service_advisor.py
index 6d3e13d..48058f7 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/service_advisor.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/service_advisor.py
@@ -683,6 +683,25 @@ class HiveRecommender(service_advisor.ServiceAdvisor):
 else:
   self.logger.info("Not setting Hive Repo user for Ranger.")
 
+security_enabled = self.isSecurityEnabled(services)
+enable_atlas_hook = False
+
+if 'hive-env' in configurations and 'hive.atlas.hook' in 
configurations['hive-env']['properties']:
+  enable_atlas_hook = 
configurations['hive-env']['properties']['hive.atlas.hook'].lower() == 'true'
+elif 'hive-env' in services['configurations'] and 'hive.atlas.hook' in 
services['configurations']['hive-env']['properties']:
+  enable_atlas_hook = 
services['configurations']['hive-env']['properties']['hive.atlas.hook'].lower() 
== 'true'
+
+if 'hive-atlas-application.properties' in services['configurations']:
+  putHiveAtlasHookProperty = self.putProperty(configurations, 
"hive-atlas-application.properties", services)
+  putHiveAtlasHookPropertyAttribute = 
self.putPropertyAttribute(configurations,"hive-atlas-application.properties")
+  if security_enabled and enable_atlas_hook:
+
putHiveAtlasHookProperty('atlas.jaas.ticketBased-KafkaClient.loginModuleControlFlag',
 'required')
+
putHiveAtlasHookProperty('atlas.jaas.ticketBased-KafkaClient.loginModuleName', 
'com.sun.security.auth.module.Krb5LoginModule')
+
putHiveAtlasHookProperty('atlas.jaas.ticketBased-KafkaClient.option.useTicketCache',
 'true')
+  else:
+
putHiveAtlasHookPropertyAttribute('atlas.jaas.ticketBased-KafkaClient.loginModuleControlFlag',
 'delete', 'true')
+
putHiveAtlasHookPropertyAttribute('atlas.jaas.ticketBased-KafkaClient.loginModuleName',
 'delete', 'true')
+
putHiveAtlasHookPropertyAttribute('atlas.jaas.ticketBased-KafkaClient.option.useTicketCache',
 'delete', 'true')
 
   def getDBDriver(self, databaseType):
 driverDict = {

http://git-wip-us.apache.org/repos/asf/ambari/blob/9aa786f7/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
index a29f74b..30796cc 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
@@ -434,7 +434,15 @@
 
 
   
-
+  
+hive-atlas-application.properties
+
+
+
+  
 
   
 hive-site

http://git-wip-us.apache.org/repos/asf/ambari/blob/9aa786f7/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
--
diff --git 
a/ambari-serv

ambari git commit: AMBARI-21190 Populate urlauth filesystem schemes in Ranger hive plugin (mugdha)

2017-06-19 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 97fcfb3cb -> 22e4b482a


AMBARI-21190 Populate urlauth filesystem schemes in Ranger hive plugin (mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 22e4b482a9e1c4fb4211de6455def4ace4b29b42
Parents: 97fcfb3
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Wed Jun 7 11:57:02 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Tue Jun 20 10:43:37 2017 +0530

--
 .../0.5.0/configuration/ranger-ugsync-site.xml  |  3 ++
 .../HIVE/configuration/ranger-hive-security.xml | 33 
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  |  5 +++
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |  4 +++
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml |  1 +
 5 files changed, 46 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/22e4b482/ambari-server/src/main/resources/common-services/RANGER/0.5.0/configuration/ranger-ugsync-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.5.0/configuration/ranger-ugsync-site.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.5.0/configuration/ranger-ugsync-site.xml
index 439c495..331d07b 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.5.0/configuration/ranger-ugsync-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.5.0/configuration/ranger-ugsync-site.xml
@@ -404,6 +404,9 @@
 # a sample value would be (dept=eng)
 # please customize the value to suit your deployment
 # default value is empty"
+
+  true
+
 
   
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/22e4b482/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/ranger-hive-security.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/ranger-hive-security.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/ranger-hive-security.xml
new file mode 100644
index 000..889a7a3
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/ranger-hive-security.xml
@@ -0,0 +1,33 @@
+
+
+
+
+  
+ranger.plugin.hive.urlauth.filesystem.schemes
+hdfs:,file:,wasb:,adl:
+Add urlauth filesystem schemes
+
+  true
+
+
+  
+
+
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/22e4b482/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
index 564dead..df97727 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml
@@ -56,6 +56,11 @@
 
   
+  
+ranger-hive-security
+
+  
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/22e4b482/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
index 6b827c9..ede267a 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
@@ -303,6 +303,10 @@
 
   
 
+  
+
+  
+
   
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/22e4b482/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
index 9227669..b70943b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml
@@ -791,6 +791,7 @@
   
 
   
+  
 
  
 



ambari git commit: AMBARI-21259 Need to use provided password when usersync sync source and authentication method are different (mugdha)

2017-06-19 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 9f5bce56d -> 97fcfb3cb


AMBARI-21259 Need to use provided password when usersync sync source and 
authentication method are different (mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 97fcfb3cbe95a2366526e2ac03e21a0edd4410e2
Parents: 9f5bce5
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Thu Jun 15 18:41:24 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Tue Jun 20 10:42:28 2017 +0530

--
 .../RANGER/0.4.0/package/scripts/params.py  |  4 +++-
 .../RANGER/0.4.0/package/scripts/setup_ranger_xml.py| 12 ++--
 2 files changed, 13 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/97fcfb3c/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
index 094d239..3789358 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
@@ -445,4 +445,6 @@ https_keystore_password = 
config['configurations']['ranger-admin-site']['ranger.
 truststore_password = 
config['configurations']['ranger-admin-site']['ranger.truststore.password']
 
 # need this to capture cluster name for ranger tagsync
-cluster_name = config['clusterName']
\ No newline at end of file
+cluster_name = config['clusterName']
+ranger_ldap_bind_auth_password = 
config['configurations']['ranger-admin-site']['ranger.ldap.bind.password']
+ranger_ad_bind_auth_password = 
config['configurations']['ranger-admin-site']['ranger.ldap.ad.bind.password']
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/97fcfb3c/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
index 087e866..2fa7b2f 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
@@ -312,7 +312,11 @@ def do_keystore_setup(upgrade_type=None):
 )
 
   if params.ranger_auth_method.upper() == "LDAP":
-ranger_credential_helper(params.cred_lib_path, 
params.ranger_ldap_password_alias, 
params.ranger_usersync_ldap_ldapbindpassword, 
params.ranger_credential_provider_path)
+ranger_ldap_auth_password = params.ranger_usersync_ldap_ldapbindpassword
+if params.ranger_ldap_bind_auth_password != 
"{{ranger_usersync_ldap_ldapbindpassword}}":
+  ranger_ldap_auth_password = params.ranger_ldap_bind_auth_password
+
+ranger_credential_helper(params.cred_lib_path, 
params.ranger_ldap_password_alias, ranger_ldap_auth_password, 
params.ranger_credential_provider_path)
 
 File(params.ranger_credential_provider_path,
   owner = params.unix_user,
@@ -321,7 +325,11 @@ def do_keystore_setup(upgrade_type=None):
 )
 
   if params.ranger_auth_method.upper() == "ACTIVE_DIRECTORY":
-ranger_credential_helper(params.cred_lib_path, 
params.ranger_ad_password_alias, params.ranger_usersync_ldap_ldapbindpassword, 
params.ranger_credential_provider_path)
+ranger_ad_auth_password = params.ranger_usersync_ldap_ldapbindpassword
+if params.ranger_ad_bind_auth_password != 
"{{ranger_usersync_ldap_ldapbindpassword}}":
+  ranger_ad_auth_password = params.ranger_ad_bind_auth_password
+
+ranger_credential_helper(params.cred_lib_path, 
params.ranger_ad_password_alias, ranger_ad_auth_password, 
params.ranger_credential_provider_path)
 
 File(params.ranger_credential_provider_path,
   owner = params.unix_user,



ambari git commit: AMBARI-21190 Populate urlauth filesystem schemes in Ranger hive plugin (mugdha)

2017-06-19 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 8df01a8f8 -> 380fa6985


AMBARI-21190 Populate urlauth filesystem schemes in Ranger hive plugin (mugdha)


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

Branch: refs/heads/trunk
Commit: 380fa6985399fbeb3fc6da9ffaeeebd2f7652c1f
Parents: 8df01a8
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Wed Jun 7 12:16:54 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Tue Jun 20 10:40:49 2017 +0530

--
 .../configuration/ranger-hive-security.xml  |  9 ++
 .../0.5.0/configuration/ranger-ugsync-site.xml  |  3 ++
 .../configuration/ranger-ugsync-site.xml|  3 ++
 .../HIVE/configuration/ranger-hive-security.xml | 33 
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  |  5 +++
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |  4 +++
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml |  1 +
 7 files changed, 58 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/380fa698/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/configuration/ranger-hive-security.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/configuration/ranger-hive-security.xml
 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/configuration/ranger-hive-security.xml
index d98bc21..76b405c 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/configuration/ranger-hive-security.xml
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/configuration/ranger-hive-security.xml
@@ -71,4 +71,13 @@
 
 
   
+  
+ranger.plugin.hive.urlauth.filesystem.schemes
+hdfs:,file:,wasb:,adl:
+Add urlauth filesystem schemes
+
+  true
+
+
+  
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/380fa698/ambari-server/src/main/resources/common-services/RANGER/0.5.0/configuration/ranger-ugsync-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.5.0/configuration/ranger-ugsync-site.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.5.0/configuration/ranger-ugsync-site.xml
index 439c495..331d07b 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.5.0/configuration/ranger-ugsync-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.5.0/configuration/ranger-ugsync-site.xml
@@ -404,6 +404,9 @@
 # a sample value would be (dept=eng)
 # please customize the value to suit your deployment
 # default value is empty"
+
+  true
+
 
   
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/380fa698/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-ugsync-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-ugsync-site.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-ugsync-site.xml
index 2c62851..922fbd8 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-ugsync-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.7.0.3.0/configuration/ranger-ugsync-site.xml
@@ -361,6 +361,9 @@
 # a sample value would be (dept=eng)
 # please customize the value to suit your deployment
 # default value is empty"
+
+  true
+
 
   
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/380fa698/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/ranger-hive-security.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/ranger-hive-security.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/ranger-hive-security.xml
new file mode 100644
index 000..889a7a3
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/ranger-hive-security.xml
@@ -0,0 +1,33 @@
+
+
+
+
+  
+ranger.plugin.hive.urlauth.filesystem.schemes
+hdfs:,file:,wasb:,adl:
+Add urlauth filesystem schemes
+
+  true
+
+
+  
+
+
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/380fa698/ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml

ambari git commit: AMBARI-21259 Need to use provided password when usersync sync source and authentication method are different (mugdha)

2017-06-19 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk df21f9c4b -> 8df01a8f8


AMBARI-21259 Need to use provided password when usersync sync source and 
authentication method are different (mugdha)


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

Branch: refs/heads/trunk
Commit: 8df01a8f84f9b404be9248f36484baebc7de582f
Parents: df21f9c
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Thu Jun 15 18:41:24 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Tue Jun 20 10:38:08 2017 +0530

--
 .../RANGER/0.4.0/package/scripts/params.py  |  4 +++-
 .../RANGER/0.4.0/package/scripts/setup_ranger_xml.py| 12 ++--
 2 files changed, 13 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8df01a8f/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
index 094d239..3789358 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
@@ -445,4 +445,6 @@ https_keystore_password = 
config['configurations']['ranger-admin-site']['ranger.
 truststore_password = 
config['configurations']['ranger-admin-site']['ranger.truststore.password']
 
 # need this to capture cluster name for ranger tagsync
-cluster_name = config['clusterName']
\ No newline at end of file
+cluster_name = config['clusterName']
+ranger_ldap_bind_auth_password = 
config['configurations']['ranger-admin-site']['ranger.ldap.bind.password']
+ranger_ad_bind_auth_password = 
config['configurations']['ranger-admin-site']['ranger.ldap.ad.bind.password']
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8df01a8f/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
index 85eb796..ba21494 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
@@ -336,7 +336,11 @@ def do_keystore_setup(upgrade_type=None):
 )
 
   if params.ranger_auth_method.upper() == "LDAP":
-ranger_credential_helper(params.cred_lib_path, 
params.ranger_ldap_password_alias, 
params.ranger_usersync_ldap_ldapbindpassword, 
params.ranger_credential_provider_path)
+ranger_ldap_auth_password = params.ranger_usersync_ldap_ldapbindpassword
+if params.ranger_ldap_bind_auth_password != 
"{{ranger_usersync_ldap_ldapbindpassword}}":
+  ranger_ldap_auth_password = params.ranger_ldap_bind_auth_password
+
+ranger_credential_helper(params.cred_lib_path, 
params.ranger_ldap_password_alias, ranger_ldap_auth_password, 
params.ranger_credential_provider_path)
 
 File(params.ranger_credential_provider_path,
   owner = params.unix_user,
@@ -345,7 +349,11 @@ def do_keystore_setup(upgrade_type=None):
 )
 
   if params.ranger_auth_method.upper() == "ACTIVE_DIRECTORY":
-ranger_credential_helper(params.cred_lib_path, 
params.ranger_ad_password_alias, params.ranger_usersync_ldap_ldapbindpassword, 
params.ranger_credential_provider_path)
+ranger_ad_auth_password = params.ranger_usersync_ldap_ldapbindpassword
+if params.ranger_ad_bind_auth_password != 
"{{ranger_usersync_ldap_ldapbindpassword}}":
+  ranger_ad_auth_password = params.ranger_ad_bind_auth_password
+
+ranger_credential_helper(params.cred_lib_path, 
params.ranger_ad_password_alias, ranger_ad_auth_password, 
params.ranger_credential_provider_path)
 
 File(params.ranger_credential_provider_path,
   owner = params.unix_user,



ambari git commit: AMBARI-21227 Updating Ranger install.properties file (mugdha)

2017-06-12 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 8cdf232bd -> 1f19461f1


AMBARI-21227 Updating Ranger install.properties file (mugdha)


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

Branch: refs/heads/trunk
Commit: 1f19461f10a2c54d3ed81efedc3f9d3d64397700
Parents: 8cdf232
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Mon Jun 12 14:53:45 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Tue Jun 13 10:18:23 2017 +0530

--
 .../libraries/providers/modify_properties_file.py  |  9 +++--
 .../RANGER/0.4.0/package/scripts/ranger_admin.py   | 11 ++-
 .../RANGER/0.4.0/package/scripts/setup_ranger_xml.py   | 13 +
 .../RANGER_KMS/0.5.0.2.3/package/scripts/kms.py|  8 
 .../RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py | 10 +-
 .../test/python/stacks/2.2/RANGER/test_ranger_admin.py |  8 
 .../test/python/stacks/2.5/RANGER/test_ranger_admin.py | 10 ++
 .../python/stacks/2.5/RANGER_KMS/test_kms_server.py| 10 ++
 .../test/python/stacks/2.6/RANGER/test_ranger_admin.py | 10 ++
 9 files changed, 85 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1f19461f/ambari-common/src/main/python/resource_management/libraries/providers/modify_properties_file.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/providers/modify_properties_file.py
 
b/ambari-common/src/main/python/resource_management/libraries/providers/modify_properties_file.py
index 53d7d2f..f45f27d 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/providers/modify_properties_file.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/providers/modify_properties_file.py
@@ -37,6 +37,7 @@ class ModifyPropertiesFileProvider(Provider):
 properties = self.resource.properties
 unsaved_values = properties.keys()
 new_content_lines = []
+final_content_lines = ""
 
 if sudo.path_isfile(filename):
   file_content = sudo.read_file(filename, encoding=self.resource.encoding)
@@ -62,9 +63,13 @@ class ModifyPropertiesFileProvider(Provider):
   value = InlineTemplate(unicode(properties[property_name])).get_content()
   line = u"{0}{1}{2}".format(unicode(property_name), delimiter, value)
   new_content_lines.append(line)
-  
+
+final_content_lines = u"\n".join(new_content_lines)
+if not final_content_lines.endswith("\n"):
+  final_content_lines = final_content_lines + "\n"
+
 File (filename,
-  content = u"\n".join(new_content_lines) + "\n",
+  content = final_content_lines,
   owner = self.resource.owner,
   group = self.resource.group,
   mode = self.resource.mode,

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f19461f/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
index b849d58..ecbacbf 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
@@ -29,7 +29,7 @@ from resource_management.libraries.functions.format import 
format
 from resource_management.core.logger import Logger
 from resource_management.core import shell
 from ranger_service import ranger_service
-from setup_ranger_xml import setup_ranger_audit_solr, 
setup_ranger_admin_passwd_change
+from setup_ranger_xml import setup_ranger_audit_solr, 
setup_ranger_admin_passwd_change, update_password_configs
 from resource_management.libraries.functions import solr_cloud_util
 from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, 
UPGRADE_TYPE_ROLLING
 from resource_management.libraries.functions.constants import Direction
@@ -45,6 +45,14 @@ class RangerAdmin(Script):
 self.install_packages(env)
 import params
 env.set_params(params)
+
+# taking backup of install.properties file
+Execute(('cp', '-f', format('{ranger_home}/install.properties'), 
format('{ranger_home}/install-backup.properties')),
+  not_if = format('ls {ranger_home}/install-backup.properties'),
+  only_if = format('

ambari git commit: AMBARI-21227 Updating Ranger install.properties file (mugdha)

2017-06-12 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 262e84f0d -> 21959a495


AMBARI-21227 Updating Ranger install.properties file (mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 21959a49590db5f7cccfcff60f37ca12faf03bb3
Parents: 262e84f
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Mon Jun 12 14:53:45 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Tue Jun 13 10:14:51 2017 +0530

--
 .../libraries/providers/modify_properties_file.py  |  9 +++--
 .../RANGER/0.4.0/package/scripts/ranger_admin.py   | 11 ++-
 .../RANGER/0.4.0/package/scripts/setup_ranger_xml.py   | 13 +
 .../RANGER_KMS/0.5.0.2.3/package/scripts/kms.py|  8 
 .../RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py | 10 +-
 .../test/python/stacks/2.2/RANGER/test_ranger_admin.py |  8 
 .../test/python/stacks/2.5/RANGER/test_ranger_admin.py | 10 ++
 .../python/stacks/2.5/RANGER_KMS/test_kms_server.py| 10 ++
 .../test/python/stacks/2.6/RANGER/test_ranger_admin.py | 10 ++
 9 files changed, 85 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/21959a49/ambari-common/src/main/python/resource_management/libraries/providers/modify_properties_file.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/providers/modify_properties_file.py
 
b/ambari-common/src/main/python/resource_management/libraries/providers/modify_properties_file.py
index 53d7d2f..f45f27d 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/providers/modify_properties_file.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/providers/modify_properties_file.py
@@ -37,6 +37,7 @@ class ModifyPropertiesFileProvider(Provider):
 properties = self.resource.properties
 unsaved_values = properties.keys()
 new_content_lines = []
+final_content_lines = ""
 
 if sudo.path_isfile(filename):
   file_content = sudo.read_file(filename, encoding=self.resource.encoding)
@@ -62,9 +63,13 @@ class ModifyPropertiesFileProvider(Provider):
   value = InlineTemplate(unicode(properties[property_name])).get_content()
   line = u"{0}{1}{2}".format(unicode(property_name), delimiter, value)
   new_content_lines.append(line)
-  
+
+final_content_lines = u"\n".join(new_content_lines)
+if not final_content_lines.endswith("\n"):
+  final_content_lines = final_content_lines + "\n"
+
 File (filename,
-  content = u"\n".join(new_content_lines) + "\n",
+  content = final_content_lines,
   owner = self.resource.owner,
   group = self.resource.group,
   mode = self.resource.mode,

http://git-wip-us.apache.org/repos/asf/ambari/blob/21959a49/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
index b849d58..ecbacbf 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
@@ -29,7 +29,7 @@ from resource_management.libraries.functions.format import 
format
 from resource_management.core.logger import Logger
 from resource_management.core import shell
 from ranger_service import ranger_service
-from setup_ranger_xml import setup_ranger_audit_solr, 
setup_ranger_admin_passwd_change
+from setup_ranger_xml import setup_ranger_audit_solr, 
setup_ranger_admin_passwd_change, update_password_configs
 from resource_management.libraries.functions import solr_cloud_util
 from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, 
UPGRADE_TYPE_ROLLING
 from resource_management.libraries.functions.constants import Direction
@@ -45,6 +45,14 @@ class RangerAdmin(Script):
 self.install_packages(env)
 import params
 env.set_params(params)
+
+# taking backup of install.properties file
+Execute(('cp', '-f', format('{ranger_home}/install.properties'), 
format('{ranger_home}/install-backup.properties')),
+  not_if = format('ls {ranger_home}/install-backup.properties'),
+  only_if = f

ambari git commit: AMBARI-20932: Ranger plugin setup should handle Nifi service (Vishal Suvagia via mugdha)

2017-05-07 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk f9f44b7e2 -> e74d4f3fa


AMBARI-20932: Ranger plugin setup should handle Nifi service (Vishal Suvagia 
via mugdha)


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

Branch: refs/heads/trunk
Commit: e74d4f3fa505385a68cfec38bccc7ca4dc33c92d
Parents: f9f44b7
Author: Vishal Suvagia <vsuva...@hortonworks.com>
Authored: Sat May 6 23:47:46 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Mon May 8 11:08:14 2017 +0530

--
 .../functions/setup_ranger_plugin_xml.py| 26 
 .../RANGER/0.7.0/configuration/ranger-env.xml   | 22 +
 .../RANGER/0.7.0/themes/theme_version_5.json| 26 
 3 files changed, 64 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e74d4f3f/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
index c510dac..c80c577 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
@@ -49,7 +49,7 @@ def setup_ranger_plugin(component_select_name, service_name, 
previous_jdbc_jar,
 xa_audit_db_password, ssl_truststore_password,
 ssl_keystore_password, api_version=None, 
stack_version_override = None, skip_if_rangeradmin_down = True,
 is_security_enabled = False, 
is_stack_supports_ranger_kerberos = False,
-component_user_principal = None, component_user_keytab 
= None):
+component_user_principal = None, component_user_keytab 
= None, cred_lib_path_override = None, cred_setup_prefix_override = None):
 
   if audit_db_is_enabled and component_driver_curl_source is not None and not 
component_driver_curl_source.endswith("/None"):
 if previous_jdbc_jar and os.path.isfile(previous_jdbc_jar):
@@ -69,8 +69,10 @@ def setup_ranger_plugin(component_select_name, service_name, 
previous_jdbc_jar,
 
   if policymgr_mgr_url.endswith('/'):
 policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
-  stack_version = get_stack_version(component_select_name)
-  if stack_version_override is not None:
+
+  if stack_version_override is None:
+stack_version = get_stack_version(component_select_name)
+  else:
 stack_version = stack_version_override
 
   component_conf_dir = conf_dict
@@ -187,7 +189,7 @@ def setup_ranger_plugin(component_select_name, 
service_name, previous_jdbc_jar,
 
 setup_ranger_plugin_keystore(service_name, audit_db_is_enabled, 
stack_version, credential_file,
   xa_audit_db_password, ssl_truststore_password, 
ssl_keystore_password,
-  component_user, component_group, java_home)
+  component_user, component_group, java_home, 
cred_lib_path_override, cred_setup_prefix_override)
 
   else:
 File(format('{component_conf_dir}/ranger-security.xml'),
@@ -207,16 +209,20 @@ def setup_ranger_plugin_jar_symblink(stack_version, 
service_name, component_list
   sudo=True)
 
 def setup_ranger_plugin_keystore(service_name, audit_db_is_enabled, 
stack_version, credential_file, xa_audit_db_password,
-ssl_truststore_password, 
ssl_keystore_password, component_user, component_group, java_home):
+ssl_truststore_password, 
ssl_keystore_password, component_user, component_group, java_home, 
cred_lib_path_override = None, cred_setup_prefix_override = None):
 
   stack_root = Script.get_stack_root()
   service_name = str(service_name).lower()
-  cred_lib_path = 
format('{stack_root}/{stack_version}/ranger-{service_name}-plugin/install/lib/*')
-  cred_setup_prefix = 
(format('{stack_root}/{stack_version}/ranger-{service_name}-plugin/ranger_credential_helper.py'),
 '-l', cred_lib_path)
 
-  if service_name == 'nifi':
-cred_lib_path = 
format('{stack_root}/{stack_version}/{service_name}/ext/ranger/install/lib/*')
-cred_setup_prefix = 
(format('{stack_root}/{stack_version}/{service_name}/ext/ranger/scripts/ranger_credential_helper.py'),
 '-l', cred_lib_path)
+  if cred_lib_path_override is not None:
+cred_lib_path = cred_lib_path_override
+  else:
+cred_lib_pa

ambari git commit: AMBARI-20932: Ranger plugin setup should handle Nifi service (Vishal Suvagia via mugdha)

2017-05-07 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 9536e6067 -> c7871903f


AMBARI-20932: Ranger plugin setup should handle Nifi service (Vishal Suvagia 
via mugdha)


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

Branch: refs/heads/branch-2.5
Commit: c7871903f26535ace07922dd7583159bb4705c08
Parents: 9536e60
Author: Vishal Suvagia <vsuva...@hortonworks.com>
Authored: Sat May 6 23:47:46 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Mon May 8 11:06:36 2017 +0530

--
 .../functions/setup_ranger_plugin_xml.py| 26 
 .../RANGER/0.7.0/configuration/ranger-env.xml   | 22 +
 .../RANGER/0.7.0/themes/theme_version_5.json| 26 
 3 files changed, 64 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c7871903/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
index c510dac..c80c577 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
@@ -49,7 +49,7 @@ def setup_ranger_plugin(component_select_name, service_name, 
previous_jdbc_jar,
 xa_audit_db_password, ssl_truststore_password,
 ssl_keystore_password, api_version=None, 
stack_version_override = None, skip_if_rangeradmin_down = True,
 is_security_enabled = False, 
is_stack_supports_ranger_kerberos = False,
-component_user_principal = None, component_user_keytab 
= None):
+component_user_principal = None, component_user_keytab 
= None, cred_lib_path_override = None, cred_setup_prefix_override = None):
 
   if audit_db_is_enabled and component_driver_curl_source is not None and not 
component_driver_curl_source.endswith("/None"):
 if previous_jdbc_jar and os.path.isfile(previous_jdbc_jar):
@@ -69,8 +69,10 @@ def setup_ranger_plugin(component_select_name, service_name, 
previous_jdbc_jar,
 
   if policymgr_mgr_url.endswith('/'):
 policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
-  stack_version = get_stack_version(component_select_name)
-  if stack_version_override is not None:
+
+  if stack_version_override is None:
+stack_version = get_stack_version(component_select_name)
+  else:
 stack_version = stack_version_override
 
   component_conf_dir = conf_dict
@@ -187,7 +189,7 @@ def setup_ranger_plugin(component_select_name, 
service_name, previous_jdbc_jar,
 
 setup_ranger_plugin_keystore(service_name, audit_db_is_enabled, 
stack_version, credential_file,
   xa_audit_db_password, ssl_truststore_password, 
ssl_keystore_password,
-  component_user, component_group, java_home)
+  component_user, component_group, java_home, 
cred_lib_path_override, cred_setup_prefix_override)
 
   else:
 File(format('{component_conf_dir}/ranger-security.xml'),
@@ -207,16 +209,20 @@ def setup_ranger_plugin_jar_symblink(stack_version, 
service_name, component_list
   sudo=True)
 
 def setup_ranger_plugin_keystore(service_name, audit_db_is_enabled, 
stack_version, credential_file, xa_audit_db_password,
-ssl_truststore_password, 
ssl_keystore_password, component_user, component_group, java_home):
+ssl_truststore_password, 
ssl_keystore_password, component_user, component_group, java_home, 
cred_lib_path_override = None, cred_setup_prefix_override = None):
 
   stack_root = Script.get_stack_root()
   service_name = str(service_name).lower()
-  cred_lib_path = 
format('{stack_root}/{stack_version}/ranger-{service_name}-plugin/install/lib/*')
-  cred_setup_prefix = 
(format('{stack_root}/{stack_version}/ranger-{service_name}-plugin/ranger_credential_helper.py'),
 '-l', cred_lib_path)
 
-  if service_name == 'nifi':
-cred_lib_path = 
format('{stack_root}/{stack_version}/{service_name}/ext/ranger/install/lib/*')
-cred_setup_prefix = 
(format('{stack_root}/{stack_version}/{service_name}/ext/ranger/scripts/ranger_credential_helper.py'),
 '-l', cred_lib_path)
+  if cred_lib_path_override is not None:
+cred_lib_path = cred_lib_path_override
+  else:
+cred_lib_pa

ambari git commit: AMBARI-20930: stackadvisor recommendations for atlas hooks should be disabled for external Atlas (Vishal Suvagia via mugdha)

2017-05-07 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 2eb193a36 -> 9536e6067


AMBARI-20930: stackadvisor recommendations for atlas hooks should be disabled 
for external Atlas (Vishal Suvagia via mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 9536e6067dcde7a6eb1283ba4b1b95535e8fd43e
Parents: 2eb193a
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Thu May 4 19:47:00 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Mon May 8 11:00:13 2017 +0530

--
 .../stacks/HDP/2.3/services/stack_advisor.py| 25 +++-
 1 file changed, 24 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9536e606/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
index 145816c..d0f82af 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
@@ -258,9 +258,16 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
 hive_hooks = [x for x in hive_hooks if x != ""]
 is_atlas_present_in_cluster = "ATLAS" in servicesList
 
+enable_external_atlas_for_hive = False
 enable_atlas_hook = False
+
+if 'hive-atlas-application.properties' in services['configurations'] and 
'enable.external.atlas.for.hive' in 
services['configurations']['hive-atlas-application.properties']['properties']:
+  enable_external_atlas_for_hive = 
services['configurations']['hive-atlas-application.properties']['properties']['enable.external.atlas.for.hive'].lower()
 == "true"
+
 if is_atlas_present_in_cluster:
   putHiveEnvProperty("hive.atlas.hook", "true")
+elif enable_external_atlas_for_hive:
+  putHiveEnvProperty("hive.atlas.hook", "true")
 else:
   putHiveEnvProperty("hive.atlas.hook", "false")
 
@@ -840,10 +847,16 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
 putSqoopSiteProperty = self.putProperty(configurations, "sqoop-site", 
services)
 putSqoopEnvProperty = self.putProperty(configurations, "sqoop-env", 
services)
 
+enable_external_atlas_for_sqoop = False
 enable_atlas_hook = False
 servicesList = [service["StackServices"]["service_name"] for service in 
services["services"]]
+if 'sqoop-atlas-application.properties' in services['configurations'] and 
'enable.external.atlas.for.sqoop' in 
services['configurations']['sqoop-atlas-application.properties']['properties']:
+  enable_external_atlas_for_sqoop = 
services['configurations']['sqoop-atlas-application.properties']['properties']['enable.external.atlas.for.sqoop'].lower()
 == "true"
+
 if "ATLAS" in servicesList:
   putSqoopEnvProperty("sqoop.atlas.hook", "true")
+elif enable_external_atlas_for_sqoop:
+  putSqoopEnvProperty("sqoop.atlas.hook", "true")
 else:
   putSqoopEnvProperty("sqoop.atlas.hook", "false")
 
@@ -878,9 +891,15 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
   atlas_hook_class = "org.apache.atlas.storm.hook.StormAtlasHook"
   atlas_hook_is_set = atlas_hook_class in notifier_plugin_value
   enable_atlas_hook = False
+  enable_external_atlas_for_storm = False
+
+  if 'storm-atlas-application.properties' in services['configurations'] 
and 'enable.external.atlas.for.storm' in 
services['configurations']['storm-atlas-application.properties']['properties']:
+enable_external_atlas_for_storm = 
services['configurations']['storm-atlas-application.properties']['properties']['enable.external.atlas.for.storm'].lower()
 == "true"
 
   if atlas_is_present:
 putStormEnvProperty("storm.atlas.hook", "true")
+  elif enable_external_atlas_for_storm:
+putStormEnvProperty("storm.atlas.hook", "true")
   else:
 putStormEnvProperty("storm.atlas.hook", "false")
 
@@ -907,9 +926,14 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
 putFalconEnvProperty = self.putProperty(configurations, "falcon-env", 
services)
 enable_atlas_hook = False
 servicesList = [service["StackServices"]["

ambari git commit: AMBARI-20930: stackadvisor recommendations for atlas hooks should be disabled for external Atlas (Vishal Suvagia via mugdha)

2017-05-07 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 2cd5a4395 -> f9f44b7e2


AMBARI-20930: stackadvisor recommendations for atlas hooks should be disabled 
for external Atlas (Vishal Suvagia via mugdha)


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

Branch: refs/heads/trunk
Commit: f9f44b7e2b9a576816e2062cfe307f3687f99de8
Parents: 2cd5a43
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Fri May 5 17:19:55 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Mon May 8 10:58:30 2017 +0530

--
 .../HIVE/2.1.0.3.0/service_advisor.py   |  7 +
 .../stacks/HDP/2.3/services/stack_advisor.py| 27 ++--
 2 files changed, 32 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f9f44b7e/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/service_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/service_advisor.py
 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/service_advisor.py
index ef3e340..6d3e13d 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/service_advisor.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/service_advisor.py
@@ -568,9 +568,16 @@ class HiveRecommender(service_advisor.ServiceAdvisor):
 hive_hooks = [x for x in hive_hooks if x != ""]
 is_atlas_present_in_cluster = "ATLAS" in servicesList
 
+enable_external_atlas_for_hive = False
 enable_atlas_hook = False
+
+if 'hive-atlas-application.properties' in services['configurations'] and 
'enable.external.atlas.for.hive' in 
services['configurations']['hive-atlas-application.properties']['properties']:
+  enable_external_atlas_for_hive = 
services['configurations']['hive-atlas-application.properties']['properties']['enable.external.atlas.for.hive'].lower()
 == "true"
+
 if is_atlas_present_in_cluster:
   putHiveEnvProperty("hive.atlas.hook", "true")
+elif enable_external_atlas_for_hive:
+  putHiveEnvProperty("hive.atlas.hook", "true")
 else:
   putHiveEnvProperty("hive.atlas.hook", "false")
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/f9f44b7e/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
index eb7389d..8cefdac 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
@@ -232,9 +232,16 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
 hive_hooks = [x for x in hive_hooks if x != ""]
 is_atlas_present_in_cluster = "ATLAS" in servicesList
 
+enable_external_atlas_for_hive = False
 enable_atlas_hook = False
+
+if 'hive-atlas-application.properties' in services['configurations'] and 
'enable.external.atlas.for.hive' in 
services['configurations']['hive-atlas-application.properties']['properties']:
+  enable_external_atlas_for_hive = 
services['configurations']['hive-atlas-application.properties']['properties']['enable.external.atlas.for.hive'].lower()
 == "true"
+
 if is_atlas_present_in_cluster:
   putHiveEnvProperty("hive.atlas.hook", "true")
+elif enable_external_atlas_for_hive:
+  putHiveEnvProperty("hive.atlas.hook", "true")
 else:
   putHiveEnvProperty("hive.atlas.hook", "false")
 
@@ -814,10 +821,16 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
 putSqoopSiteProperty = self.putProperty(configurations, "sqoop-site", 
services)
 putSqoopEnvProperty = self.putProperty(configurations, "sqoop-env", 
services)
 
+enable_external_atlas_for_sqoop = False
 enable_atlas_hook = False
 servicesList = [service["StackServices"]["service_name"] for service in 
services["services"]]
+if 'sqoop-atlas-application.properties' in services['configurations'] and 
'enable.external.atlas.for.sqoop' in 
services['configurations']['sqoop-atlas-application.properties']['properties']:
+  enable_external_atlas_for_sqoop = 
services['configurations']['sqoop-atlas-application.properties']['properties']['enabl

ambari git commit: AMBARI-20779 ADDENDUM Create Ranger KMS HDFS audit folder as part of install (mugdha)

2017-05-07 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 569a1bbb6 -> 2cd5a4395


AMBARI-20779 ADDENDUM Create Ranger KMS HDFS audit folder as part of install 
(mugdha)


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

Branch: refs/heads/trunk
Commit: 2cd5a439533e636522b3dc0c6a088a76f856590d
Parents: 569a1bb
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Fri May 5 17:05:30 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Mon May 8 10:29:35 2017 +0530

--
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml | 68 ++--
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml | 68 ++--
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml | 67 ++-
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml | 67 ++-
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.4.xml | 68 ++--
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml | 68 ++--
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml | 68 ++--
 .../HDP/2.5/upgrades/host-upgrade-2.5.xml   | 50 +++---
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml | 68 ++--
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml | 68 ++--
 .../HDP/2.6/upgrades/host-upgrade-2.6.xml   | 48 +++---
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml | 68 ++--
 12 files changed, 387 insertions(+), 389 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2cd5a439/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
index e111dbf..ff1d87d 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
@@ -341,16 +341,6 @@
   
 
 
-
-  false
-  true
-  false
-  
-  
-RANGER_KMS_SERVER
-  
-
-
 
   false
   true
@@ -389,6 +379,16 @@
   
 
 
+
+  false
+  true
+  false
+  
+  
+RANGER_KMS_SERVER
+  
+
+
 
   false
   true
@@ -755,30 +755,6 @@
   
 
 
-
-  
-
-  
-Upgrading Ranger KMS database schema
-scripts/kms_server.py
-setup_ranger_kms_database
-  
-
-
-
-  
-Downgrading Ranger KMS database schema
-scripts/kms_server.py
-setup_ranger_kms_database
-  
-
-
-
-  
-
-  
-
-
 
   
 
@@ -823,6 +799,30 @@
   
 
 
+
+  
+
+  
+Upgrading Ranger KMS database schema
+scripts/kms_server.py
+setup_ranger_kms_database
+  
+
+
+
+  
+Downgrading Ranger KMS database schema
+scripts/kms_server.py
+setup_ranger_kms_database
+  
+
+
+
+  
+
+  
+
+
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2cd5a439/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
index 6230921..41cab3f 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
@@ -484,16 +484,6 @@
   
 
 
-
-  false
-  true
-  false
-  
-  
-RANGER_KMS_SERVER
-  
-
-
 
   false
   true
@@ -532,6 +522,16 @@
   
 
 
+
+  false
+  true
+  false
+  
+  
+RANGER_KMS_SERVER
+  
+
+
 
   false
   true
@@ -900,30 +900,6 @@
   
 
 
-
-  
-
-  
-Upgrading Ranger KMS database schema
-scripts/kms_server.py
-setup_ranger_kms_database
-  
-
-
-
-  
-Downgrading Ranger KMS database schema
-scripts/kms_server.py
-setup_rang

ambari git commit: AMBARI-20779 ADDENDUM Create Ranger KMS HDFS audit folder as part of install (mugdha)

2017-05-07 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 511fcf956 -> 2eb193a36


AMBARI-20779 ADDENDUM Create Ranger KMS HDFS audit folder as part of install 
(mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 2eb193a3628d31392fdf94383cf4887b5c2b10a0
Parents: 511fcf9
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Fri May 5 17:05:30 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Mon May 8 10:27:47 2017 +0530

--
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml | 68 ++--
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml | 68 ++--
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml | 67 ++-
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml | 67 ++-
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.4.xml | 68 ++--
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml | 68 ++--
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml | 68 ++--
 .../HDP/2.5/upgrades/host-upgrade-2.5.xml   | 50 +++---
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml | 68 ++--
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml | 68 ++--
 .../HDP/2.6/upgrades/host-upgrade-2.6.xml   | 48 +++---
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml | 68 ++--
 12 files changed, 387 insertions(+), 389 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2eb193a3/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
index b9d8b88..ebdae5f 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
@@ -339,16 +339,6 @@
   
 
 
-
-  false
-  true
-  false
-  
-  
-RANGER_KMS_SERVER
-  
-
-
 
   false
   true
@@ -387,6 +377,16 @@
   
 
 
+
+  false
+  true
+  false
+  
+  
+RANGER_KMS_SERVER
+  
+
+
 
   false
   true
@@ -753,30 +753,6 @@
   
 
 
-
-  
-
-  
-Upgrading Ranger KMS database schema
-scripts/kms_server.py
-setup_ranger_kms_database
-  
-
-
-
-  
-Downgrading Ranger KMS database schema
-scripts/kms_server.py
-setup_ranger_kms_database
-  
-
-
-
-  
-
-  
-
-
 
   
 
@@ -821,6 +797,30 @@
   
 
 
+
+  
+
+  
+Upgrading Ranger KMS database schema
+scripts/kms_server.py
+setup_ranger_kms_database
+  
+
+
+
+  
+Downgrading Ranger KMS database schema
+scripts/kms_server.py
+setup_ranger_kms_database
+  
+
+
+
+  
+
+  
+
+
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2eb193a3/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
index 8fe58fb..981c7d5 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
@@ -484,16 +484,6 @@
   
 
 
-
-  false
-  true
-  false
-  
-  
-RANGER_KMS_SERVER
-  
-
-
 
   false
   true
@@ -532,6 +522,16 @@
   
 
 
+
+  false
+  true
+  false
+  
+  
+RANGER_KMS_SERVER
+  
+
+
 
   false
   true
@@ -900,30 +900,6 @@
   
 
 
-
-  
-
-  
-Upgrading Ranger KMS database schema
-scripts/kms_server.py
-setup_ranger_kms_database
-  
-
-
-
-  
-Downgrading Ranger KMS database schema
-script

ambari git commit: AMBARI-20868: Ranger admin start fails when Ambari Infra is turned off. (Vishal Suvagia via mugdha)

2017-05-04 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 945b467c8 -> 3023419de


AMBARI-20868: Ranger admin start fails when Ambari Infra is turned off. (Vishal 
Suvagia via mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 3023419def9022f5d7e5e252f515fd30e2a8a147
Parents: 945b467
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Thu May 4 18:31:12 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Thu May 4 19:45:53 2017 +0530

--
 .../0.4.0/package/scripts/setup_ranger_xml.py   | 119 ++-
 .../0.7.0/properties/ranger-solrconfig.xml.j2   |   9 +-
 .../stacks/HDP/2.6/services/stack_advisor.py|   4 +-
 3 files changed, 65 insertions(+), 67 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3023419d/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
index a8b7f24..8f89416 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
@@ -35,6 +35,7 @@ from resource_management.core.utils import PasswordString
 from resource_management.core.shell import as_sudo
 from resource_management.libraries.functions import solr_cloud_util
 from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, 
UPGRADE_TYPE_ROLLING
+from resource_management.core.exceptions import ExecutionFailed
 
 # This file contains functions used for setup/configure of Ranger Admin and 
Ranger Usersync.
 # The design is to mimic what is done by the setup.sh script bundled by Ranger 
component currently.
@@ -660,70 +661,72 @@ def setup_ranger_audit_solr():
 content=Template("ranger_solr_jaas_conf.j2"),
 owner=params.unix_user
   )
+  try:
+check_znode()
+
+if params.stack_supports_ranger_solr_configs:
+  Logger.info('Solr configrations supported,creating solr-configurations.')
+  File(format("{ranger_solr_conf}/solrconfig.xml"),
+   content=InlineTemplate(params.ranger_solr_config_content),
+   owner=params.unix_user,
+   group=params.unix_group,
+   mode=0644
+  )
 
-  check_znode()
-
-  if params.stack_supports_ranger_solr_configs:
-Logger.info('Solr configrations supported,creating solr-configurations.')
-File(format("{ranger_solr_conf}/solrconfig.xml"),
- content=InlineTemplate(params.ranger_solr_config_content),
- owner=params.unix_user,
- group=params.unix_group,
- mode=0644
-)
-
-solr_cloud_util.upload_configuration_to_zk(
-  zookeeper_quorum = params.zookeeper_quorum,
-  solr_znode = params.solr_znode,
-  config_set = params.ranger_solr_config_set,
-  config_set_dir = params.ranger_solr_conf,
-  tmp_dir = params.tmp_dir,
-  java64_home = params.java_home,
-  solrconfig_content = InlineTemplate(params.ranger_solr_config_content),
-  jaas_file=params.solr_jaas_file,
-  retry=30, interval=5
-)
+  solr_cloud_util.upload_configuration_to_zk(
+zookeeper_quorum = params.zookeeper_quorum,
+solr_znode = params.solr_znode,
+config_set = params.ranger_solr_config_set,
+config_set_dir = params.ranger_solr_conf,
+tmp_dir = params.tmp_dir,
+java64_home = params.java_home,
+solrconfig_content = InlineTemplate(params.ranger_solr_config_content),
+jaas_file=params.solr_jaas_file,
+retry=30, interval=5
+  )
 
-  else:
-Logger.info('Solr configrations not supported, skipping 
solr-configurations.')
-solr_cloud_util.upload_configuration_to_zk(
+else:
+  Logger.info('Solr configrations not supported, skipping 
solr-configurations.')
+  solr_cloud_util.upload_configuration_to_zk(
+zookeeper_quorum = params.zookeeper_quorum,
+solr_znode = params.solr_znode,
+config_set = params.ranger_solr_config_set,
+config_set_dir = params.ranger_solr_conf,
+tmp_dir = params.tmp_dir,
+java64_home = params.java_home,
+jaas_file=params.solr_jaas_file,
+retry=30, interval=5)
+
+if params.security_enabled and params.has_infra_solr \
+ 

ambari git commit: AMBARI-20868: Ranger admin start fails when Ambari Infra is turned off. (Vishal Suvagia via mugdha)

2017-05-04 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 37960b421 -> 423d836d0


AMBARI-20868: Ranger admin start fails when Ambari Infra is turned off. (Vishal 
Suvagia via mugdha)


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

Branch: refs/heads/trunk
Commit: 423d836d0e2024f6d0c7adaea074982cfdf88a2f
Parents: 37960b4
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Thu May 4 18:31:12 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Thu May 4 19:43:00 2017 +0530

--
 .../0.4.0/package/scripts/setup_ranger_xml.py   | 119 ++-
 .../0.7.0/properties/ranger-solrconfig.xml.j2   |   9 +-
 .../stacks/HDP/2.6/services/stack_advisor.py|   4 +-
 3 files changed, 65 insertions(+), 67 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/423d836d/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
index e56a705..26e6578 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
@@ -35,6 +35,7 @@ from resource_management.core.utils import PasswordString
 from resource_management.core.shell import as_sudo
 from resource_management.libraries.functions import solr_cloud_util
 from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, 
UPGRADE_TYPE_ROLLING
+from resource_management.core.exceptions import ExecutionFailed
 
 # This file contains functions used for setup/configure of Ranger Admin and 
Ranger Usersync.
 # The design is to mimic what is done by the setup.sh script bundled by Ranger 
component currently.
@@ -684,70 +685,72 @@ def setup_ranger_audit_solr():
 content=Template("ranger_solr_jaas_conf.j2"),
 owner=params.unix_user
   )
+  try:
+check_znode()
+
+if params.stack_supports_ranger_solr_configs:
+  Logger.info('Solr configrations supported,creating solr-configurations.')
+  File(format("{ranger_solr_conf}/solrconfig.xml"),
+   content=InlineTemplate(params.ranger_solr_config_content),
+   owner=params.unix_user,
+   group=params.unix_group,
+   mode=0644
+  )
 
-  check_znode()
-
-  if params.stack_supports_ranger_solr_configs:
-Logger.info('Solr configrations supported,creating solr-configurations.')
-File(format("{ranger_solr_conf}/solrconfig.xml"),
- content=InlineTemplate(params.ranger_solr_config_content),
- owner=params.unix_user,
- group=params.unix_group,
- mode=0644
-)
-
-solr_cloud_util.upload_configuration_to_zk(
-  zookeeper_quorum = params.zookeeper_quorum,
-  solr_znode = params.solr_znode,
-  config_set = params.ranger_solr_config_set,
-  config_set_dir = params.ranger_solr_conf,
-  tmp_dir = params.tmp_dir,
-  java64_home = params.java_home,
-  solrconfig_content = InlineTemplate(params.ranger_solr_config_content),
-  jaas_file=params.solr_jaas_file,
-  retry=30, interval=5
-)
+  solr_cloud_util.upload_configuration_to_zk(
+zookeeper_quorum = params.zookeeper_quorum,
+solr_znode = params.solr_znode,
+config_set = params.ranger_solr_config_set,
+config_set_dir = params.ranger_solr_conf,
+tmp_dir = params.tmp_dir,
+java64_home = params.java_home,
+solrconfig_content = InlineTemplate(params.ranger_solr_config_content),
+jaas_file=params.solr_jaas_file,
+retry=30, interval=5
+  )
 
-  else:
-Logger.info('Solr configrations not supported, skipping 
solr-configurations.')
-solr_cloud_util.upload_configuration_to_zk(
+else:
+  Logger.info('Solr configrations not supported, skipping 
solr-configurations.')
+  solr_cloud_util.upload_configuration_to_zk(
+zookeeper_quorum = params.zookeeper_quorum,
+solr_znode = params.solr_znode,
+config_set = params.ranger_solr_config_set,
+config_set_dir = params.ranger_solr_conf,
+tmp_dir = params.tmp_dir,
+java64_home = params.java_home,
+jaas_file=params.solr_jaas_file,
+retry=30, interval=5)
+
+if params.security_enabled and params.has_infra_solr \
+  and not params.is_external_solrCloud_enabl

ambari git commit: AMBARI-20920: Atlas restart fails due to missing hbase dependency in role-command (Vishal Suvagia via mugdha)

2017-05-03 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 0971f4139 -> 254996365


AMBARI-20920: Atlas restart fails due to missing hbase dependency in 
role-command (Vishal Suvagia via mugdha)


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

Branch: refs/heads/trunk
Commit: 25499636535a658499460deb968981d55797d7df
Parents: 0971f41
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Tue May 2 20:00:50 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Thu May 4 10:40:51 2017 +0530

--
 .../common-services/ATLAS/0.7.0.2.5/role_command_order.json| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/25499636/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/role_command_order.json
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/role_command_order.json
index 372cd21..4d66dfc 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/role_command_order.json
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/role_command_order.json
@@ -2,6 +2,6 @@
   "general_deps" : {
 "_comment" : "dependencies for ATLAS",
 "ATLAS_SERVICE_CHECK-SERVICE_CHECK": ["ATLAS_SERVER-START"],
-"ATLAS_SERVER-START": ["KAFKA_BROKER-START", "LOGSEARCH_SOLR-START", 
"HBASE_MASTER-START", "HBASE_REGIONSERVER-START"]
+"ATLAS_SERVER-START": ["KAFKA_BROKER-START", "INFRA_SOLR-START", 
"HBASE_MASTER-START", "HBASE_REGIONSERVER-START"]
   }
 }



ambari git commit: AMBARI-20779 Create Ranger KMS HDFS audit folder as part of install. FIX UT (mugdha)

2017-05-02 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 731b1a06b -> 42c73f02e


AMBARI-20779 Create Ranger KMS HDFS audit folder as part of install. FIX UT 
(mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 42c73f02ee48227d6d6e23fda78e0c01ff996e9d
Parents: 731b1a0
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Wed May 3 00:39:52 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Wed May 3 10:44:24 2017 +0530

--
 .../test/java/org/apache/ambari/server/stack/StackManagerTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/42c73f02/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java
index 86ff263..c9d3d2b 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java
@@ -921,12 +921,12 @@ public class StackManagerTest {
 ArrayList rangerKmsBlockers = 
(ArrayList)generalDeps.get(kmsRoleCommand);
 
 assertTrue(kmsRoleCommand + " should be dependent of " + 
rangerAdminRoleCommand, rangerKmsBlockers.contains(rangerAdminRoleCommand));
+assertTrue(kmsRoleCommand + " should be dependent of " + 
nameNodeRoleCommand, rangerKmsBlockers.contains(nameNodeRoleCommand));
 
 // Ranger User Sync
 ArrayList rangerUserSyncBlockers = 
(ArrayList)generalDeps.get(rangerUserSyncRoleCommand);
 
 assertTrue(rangerUserSyncRoleCommand + " should be dependent of " + 
rangerAdminRoleCommand, 
rangerUserSyncBlockers.contains(rangerAdminRoleCommand));
-assertTrue(rangerUserSyncRoleCommand + " should be dependent of " + 
kmsRoleCommand, rangerUserSyncBlockers.contains(kmsRoleCommand));
   }
   //todo: component override assertions
 



ambari git commit: AMBARI-20779 Create Ranger KMS HDFS audit folder as part of install. FIX UT (mugdha)

2017-05-02 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 331aad44e -> 05cf0dd72


AMBARI-20779 Create Ranger KMS HDFS audit folder as part of install. FIX UT 
(mugdha)


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

Branch: refs/heads/trunk
Commit: 05cf0dd72707b8bc05c8462f35ddaf992e271b9d
Parents: 331aad4
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Wed May 3 01:10:50 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Wed May 3 10:42:11 2017 +0530

--
 .../test/java/org/apache/ambari/server/stack/StackManagerTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/05cf0dd7/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java
index d8c02dc..0a0404a 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java
@@ -937,12 +937,12 @@ public class StackManagerTest {
 ArrayList rangerKmsBlockers = 
(ArrayList)generalDeps.get(kmsRoleCommand);
 
 assertTrue(kmsRoleCommand + " should be dependent of " + 
rangerAdminRoleCommand, rangerKmsBlockers.contains(rangerAdminRoleCommand));
+assertTrue(kmsRoleCommand + " should be dependent of " + 
nameNodeRoleCommand, rangerKmsBlockers.contains(nameNodeRoleCommand));
 
 // Ranger User Sync
 ArrayList rangerUserSyncBlockers = 
(ArrayList)generalDeps.get(rangerUserSyncRoleCommand);
 
 assertTrue(rangerUserSyncRoleCommand + " should be dependent of " + 
rangerAdminRoleCommand, 
rangerUserSyncBlockers.contains(rangerAdminRoleCommand));
-assertTrue(rangerUserSyncRoleCommand + " should be dependent of " + 
kmsRoleCommand, rangerUserSyncBlockers.contains(kmsRoleCommand));
   }
   //todo: component override assertions
 



ambari git commit: AMBARI-20816 Create Ranger Hive Service during Hive Metastore restart (mugdha)

2017-04-24 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk e5fff5825 -> 150ab25eb


AMBARI-20816 Create Ranger Hive Service during Hive Metastore restart (mugdha)


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

Branch: refs/heads/trunk
Commit: 150ab25eb18fa031658bfdb698929bc5bff88926
Parents: e5fff58
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Fri Apr 21 18:04:05 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Mon Apr 24 11:42:18 2017 +0530

--
 .../package/scripts/hive_metastore.py   |  3 +
 .../0.12.0.2.0/package/scripts/params_linux.py  |  7 +++
 .../package/scripts/setup_ranger_hive.py| 58 
 .../2.1.0.3.0/package/scripts/hive_metastore.py |  3 +
 .../2.1.0.3.0/package/scripts/params_linux.py   |  7 +++
 .../package/scripts/setup_ranger_hive.py| 58 
 6 files changed, 136 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/150ab25e/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
index 2dc6906..99eb8b5 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
@@ -35,6 +35,7 @@ from resource_management.libraries.functions.security_commons 
import get_params_
 from resource_management.libraries.functions.security_commons import 
validate_security_config_properties
 from resource_management.libraries.functions.security_commons import 
FILE_TYPE_XML
 from resource_management.core.resources.system import File
+from setup_ranger_hive import setup_ranger_hive_metastore_service
 
 from hive import create_metastore_schema, hive, jdbc_connector
 from hive_service import hive_service
@@ -61,6 +62,8 @@ class HiveMetastore(Script):
 
 hive_service('metastore', action='start', upgrade_type=upgrade_type)
 
+# below function call is used for cluster depolyed in cloud env to create 
ranger hive service in ranger admin.
+setup_ranger_hive_metastore_service()
 
   def stop(self, env, upgrade_type=None):
 import params

http://git-wip-us.apache.org/repos/asf/ambari/blob/150ab25e/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index 84bac38..7615ee7 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -824,3 +824,10 @@ if enable_ranger_hive:
 xa_audit_db_is_enabled = False
 
 # ranger hive plugin section end
+
+# below property is used for cluster deployed in cloud env to create ranger 
hive service in ranger admin
+# need to add it as custom property
+ranger_hive_metastore_lookup = 
default('/configurations/ranger-hive-plugin-properties/ranger.service.config.param.enable.hive.metastore.lookup',
 False)
+
+if security_enabled:
+  hive_metastore_principal_with_host = 
hive_metastore_principal.replace('_HOST', hostname.lower())
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/150ab25e/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py
index 80bd7c8..379b4ac 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py
@@ -18,6 +18,9 @@ limitations under the License.
 
 """
 from resource_management.core.logger import Logger
+from resource_management.libraries.functions.

ambari git commit: AMBARI-20816 Create Ranger Hive Service during Hive Metastore restart (mugdha)

2017-04-24 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 853ea8dbd -> 09e56c4b1


AMBARI-20816 Create Ranger Hive Service during Hive Metastore restart (mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 09e56c4b15c98d07071e50f7d3546ac6f7ad9263
Parents: 853ea8d
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Thu Apr 20 18:56:36 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Mon Apr 24 11:40:08 2017 +0530

--
 .../package/scripts/hive_metastore.py   |  3 +
 .../0.12.0.2.0/package/scripts/params_linux.py  |  7 +++
 .../package/scripts/setup_ranger_hive.py| 58 
 3 files changed, 68 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/09e56c4b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
index db7bb4a..633e82e 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
@@ -35,6 +35,7 @@ from resource_management.libraries.functions.security_commons 
import get_params_
 from resource_management.libraries.functions.security_commons import 
validate_security_config_properties
 from resource_management.libraries.functions.security_commons import 
FILE_TYPE_XML
 from resource_management.core.resources.system import File
+from setup_ranger_hive import setup_ranger_hive_metastore_service
 
 from hive import create_metastore_schema, hive, jdbc_connector
 from hive_service import hive_service
@@ -61,6 +62,8 @@ class HiveMetastore(Script):
 
 hive_service('metastore', action='start', upgrade_type=upgrade_type)
 
+# below function call is used for cluster depolyed in cloud env to create 
ranger hive service in ranger admin.
+setup_ranger_hive_metastore_service()
 
   def stop(self, env, upgrade_type=None):
 import params

http://git-wip-us.apache.org/repos/asf/ambari/blob/09e56c4b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index 5f2a36d..64cdfed 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -823,3 +823,10 @@ if enable_ranger_hive:
 xa_audit_db_is_enabled = False
 
 # ranger hive plugin section end
+
+# below property is used for cluster deployed in cloud env to create ranger 
hive service in ranger admin
+# need to add it as custom property
+ranger_hive_metastore_lookup = 
default('/configurations/ranger-hive-plugin-properties/ranger.service.config.param.enable.hive.metastore.lookup',
 False)
+
+if security_enabled:
+  hive_metastore_principal_with_host = 
hive_metastore_principal.replace('_HOST', hostname.lower())
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/09e56c4b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py
index 80bd7c8..379b4ac 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py
@@ -18,6 +18,9 @@ limitations under the License.
 
 """
 from resource_management.core.logger import Logger
+from resource_management.libraries.functions.is_empty import is_empty
+from resource_management.libraries.functions.ranger_functions_v2 import 
RangeradminV2
+from resource_management.libraries.functions.setup_ranger_plugin_xml import 
generate_ranger_service_config
 
 def 

ambari git commit: AMBARI-20792: Atlas admin username and password should be configurable through ambari (Vishal Suvagia via mugdha)

2017-04-21 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 b6ff72400 -> cc90b3d9c


AMBARI-20792: Atlas admin username and password should be configurable through 
ambari (Vishal Suvagia via mugdha)


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

Branch: refs/heads/branch-2.5
Commit: cc90b3d9cb18e5d3698b75b3baa459bf33873805
Parents: b6ff724
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Thu Apr 20 10:36:26 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Apr 21 16:08:25 2017 +0530

--
 .../ATLAS/0.1.0.2.3/package/scripts/metadata.py | 14 ++-
 .../ATLAS/0.1.0.2.3/package/scripts/params.py   |  3 ++
 .../services/ATLAS/configuration/atlas-env.xml  | 41 
 3 files changed, 56 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cc90b3d9/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
index c25445c..36c4598 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
@@ -18,6 +18,7 @@ limitations under the License.
 
 """
 import os
+import hashlib
 
 from resource_management import Package
 from resource_management import StackFeature
@@ -31,11 +32,13 @@ from resource_management.libraries.functions.stack_features 
import check_stack_f
 from resource_management.libraries.resources.properties_file import 
PropertiesFile
 from resource_management.libraries.resources.template_config import 
TemplateConfig
 from resource_management.libraries.resources.xml_config import XmlConfig
+from resource_management.libraries.functions.is_empty import is_empty
+from resource_management.libraries.resources.modify_properties_file import 
ModifyPropertiesFile
 
 
 def metadata(type='server'):
 import params
-
+
 # Needed by both Server and Client
 Directory(params.conf_dir,
   mode=0755,
@@ -97,7 +100,14 @@ def metadata(type='server'):
mode=0755,
content=InlineTemplate(params.metadata_env_content)
   )
- 
+
+  if not is_empty(params.atlas_admin_username) and not 
is_empty(params.atlas_admin_password):
+psswd_output = hashlib.sha256(params.atlas_admin_password).hexdigest()
+ModifyPropertiesFile(format("{conf_dir}/users-credentials.properties"),
+properties = {format('{atlas_admin_username}') : 
format('ROLE_ADMIN::{psswd_output}')},
+owner = params.metadata_user
+)
+
   files_to_chown = [format("{conf_dir}/policy-store.txt"), 
format("{conf_dir}/users-credentials.properties")]
   for file in files_to_chown:
 if os.path.exists(file):

http://git-wip-us.apache.org/repos/asf/ambari/blob/cc90b3d9/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index e243662..a8bfeb7 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -410,3 +410,6 @@ if stack_supports_atlas_ranger_plugin and 
enable_ranger_atlas:
 'type': 'atlas',
 }
 # ranger atlas plugin section end
+# atlas admin login username password
+atlas_admin_username = 
config['configurations']['atlas-env']['atlas.admin.username']
+atlas_admin_password = 
config['configurations']['atlas-env']['atlas.admin.password']

http://git-wip-us.apache.org/repos/asf/ambari/blob/cc90b3d9/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
new file mode 100644
index 000..d54cf15
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/

ambari git commit: AMBARI-20792: Atlas admin username and password should be configurable through ambari (Vishal Suvagia via mugdha)

2017-04-21 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 836c78995 -> 3d5da62cb


AMBARI-20792: Atlas admin username and password should be configurable through 
ambari (Vishal Suvagia via mugdha)


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

Branch: refs/heads/trunk
Commit: 3d5da62cbbc673034f8db54fbad8d6a83afe57cb
Parents: 836c789
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Thu Apr 20 10:36:26 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Fri Apr 21 16:07:03 2017 +0530

--
 .../ATLAS/0.1.0.2.3/package/scripts/metadata.py | 14 ++-
 .../ATLAS/0.1.0.2.3/package/scripts/params.py   |  3 ++
 .../services/ATLAS/configuration/atlas-env.xml  | 41 
 3 files changed, 56 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3d5da62c/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
index c25445c..36c4598 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
@@ -18,6 +18,7 @@ limitations under the License.
 
 """
 import os
+import hashlib
 
 from resource_management import Package
 from resource_management import StackFeature
@@ -31,11 +32,13 @@ from resource_management.libraries.functions.stack_features 
import check_stack_f
 from resource_management.libraries.resources.properties_file import 
PropertiesFile
 from resource_management.libraries.resources.template_config import 
TemplateConfig
 from resource_management.libraries.resources.xml_config import XmlConfig
+from resource_management.libraries.functions.is_empty import is_empty
+from resource_management.libraries.resources.modify_properties_file import 
ModifyPropertiesFile
 
 
 def metadata(type='server'):
 import params
-
+
 # Needed by both Server and Client
 Directory(params.conf_dir,
   mode=0755,
@@ -97,7 +100,14 @@ def metadata(type='server'):
mode=0755,
content=InlineTemplate(params.metadata_env_content)
   )
- 
+
+  if not is_empty(params.atlas_admin_username) and not 
is_empty(params.atlas_admin_password):
+psswd_output = hashlib.sha256(params.atlas_admin_password).hexdigest()
+ModifyPropertiesFile(format("{conf_dir}/users-credentials.properties"),
+properties = {format('{atlas_admin_username}') : 
format('ROLE_ADMIN::{psswd_output}')},
+owner = params.metadata_user
+)
+
   files_to_chown = [format("{conf_dir}/policy-store.txt"), 
format("{conf_dir}/users-credentials.properties")]
   for file in files_to_chown:
 if os.path.exists(file):

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d5da62c/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index bf4848b..d26df33 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -412,3 +412,6 @@ if stack_supports_atlas_ranger_plugin and 
enable_ranger_atlas:
 'type': 'atlas',
 }
 # ranger atlas plugin section end
+# atlas admin login username password
+atlas_admin_username = 
config['configurations']['atlas-env']['atlas.admin.username']
+atlas_admin_password = 
config['configurations']['atlas-env']['atlas.admin.password']

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d5da62c/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
new file mode 100644
index 000..d54cf15
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/

ambari git commit: AMBARI-20505 ADDENDUM : Changes needed to handle AMBARI-19623 in EU/RU scenario (Vishal Suvagia via mugdha)

2017-04-11 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk c0424b9f6 -> 504e0b03d


AMBARI-20505 ADDENDUM : Changes needed to handle AMBARI-19623 in EU/RU scenario 
(Vishal Suvagia via mugdha)


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

Branch: refs/heads/trunk
Commit: 504e0b03d6d7c19f201379d0ae326a76c85e2bd1
Parents: c0424b9
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Thu Mar 30 16:07:04 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Wed Apr 12 11:05:56 2017 +0530

--
 .../resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/504e0b03/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
index 0f05089..d5387c6 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
@@ -319,7 +319,7 @@
 
   
 
-  
+  
 
   Updating Atlas zookeeper timeout values
 



ambari git commit: AMBARI-20505 : Changes needed to handle AMBARI-19623 in EU/RU scenario (Vishal Suvagia via mugdha)

2017-04-11 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 7643475cd -> 1b75e371d


AMBARI-20505 : Changes needed to handle AMBARI-19623 in EU/RU scenario (Vishal 
Suvagia via mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 1b75e371dcbe4ec739a55318d9cee06ca90b917a
Parents: 7643475
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Thu Mar 30 17:20:08 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Wed Apr 12 10:59:20 2017 +0530

--
 .../main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml | 7 +++
 .../stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml| 6 ++
 .../stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml| 6 ++
 .../main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml| 1 +
 .../main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml| 1 +
 5 files changed, 21 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1b75e371/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
index 9e4abb3..1762d15 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
@@ -112,6 +112,13 @@
 application-properties
 
   
+
+  
+application-properties
+
+
+
+  
 
   
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b75e371/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
index 23c4a76..1f31564 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
@@ -312,6 +312,12 @@
   Updating Atlas TLS Exclude Protocols to exclude TLS 
v1.2
 
   
+
+  
+
+  Updating Atlas zookeeper timeout values
+
+  
 
 
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b75e371/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
index 7fbd337..0bc85f1 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
@@ -952,6 +952,7 @@
   
 
   
+  
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b75e371/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
index 0f6656b..879fe0f 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
@@ -1093,6 +1093,7 @@
 
   
   
+  
 
 
 



ambari git commit: AMBARI-20629 Take Ambari Cluster Name as a property in Ranger plugin configs (mugdha)

2017-04-04 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 ddec834f4 -> 0a6dee672


AMBARI-20629 Take Ambari Cluster Name as a property in Ranger plugin configs 
(mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 0a6dee67283a354e127a38b6d2cc5e1561fcd54b
Parents: ddec834
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Tue Apr 4 10:32:19 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Tue Apr 4 18:22:14 2017 +0530

--
 .../0.96.0.2.0/package/scripts/params_linux.py  |   3 +
 .../2.1.0.2.0/package/scripts/params_linux.py   |   5 +-
 .../KAFKA/0.8.1/package/scripts/params.py   |   3 +
 .../0.5.0.2.2/package/scripts/params_linux.py   |   3 +
 .../0.5.0.2.3/package/scripts/params.py |   5 +-
 .../2.1.0.2.0/package/scripts/params_linux.py   |   3 +
 .../ATLAS/configuration/ranger-atlas-audit.xml  |  33 ++
 .../HBASE/configuration/ranger-hbase-audit.xml  |  33 ++
 .../HDFS/configuration/ranger-hdfs-audit.xml|  33 ++
 .../HIVE/configuration/ranger-hive-audit.xml|  33 ++
 .../KAFKA/configuration/ranger-kafka-audit.xml  |  33 ++
 .../KNOX/configuration/ranger-knox-audit.xml|  33 ++
 .../configuration/ranger-kms-audit.xml  |  33 ++
 .../STORM/configuration/ranger-storm-audit.xml  |  33 ++
 .../YARN/configuration/ranger-yarn-audit.xml|  33 ++
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  | 108 +++
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |  53 -
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml |  33 ++
 18 files changed, 507 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0a6dee67/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
index bae6161..081fda1 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
@@ -408,6 +408,9 @@ if enable_ranger_hbase:
   if has_ranger_admin and stack_supports_ranger_audit_db and 
xa_audit_db_flavor.lower() == 'sqla':
 xa_audit_db_is_enabled = False
 
+# need this to capture cluster name from where ranger hbase plugin is enabled
+cluster_name = config['clusterName']
+
 # ranger hbase plugin section end
 
 create_hbase_home_directory = 
check_stack_feature(StackFeature.HBASE_HOME_DIRECTORY, stack_version_formatted)

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a6dee67/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
index 35ad895..94093b4 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
@@ -548,4 +548,7 @@ if enable_ranger_hdfs:
   if has_ranger_admin and stack_supports_ranger_audit_db and 
xa_audit_db_flavor.lower() == 'sqla':
 xa_audit_db_is_enabled = False
 
-# ranger hdfs plugin section end
+# need this to capture cluster name from where ranger hdfs plugin is enabled
+cluster_name = config['clusterName']
+
+# ranger hdfs plugin section end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a6dee67/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py
index f56c2b7..23c65b7 100644
--- 
a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py
@@ -296,6 +296,9 @@ if enable_ranger_kafka and is_supported_kafka_ranger:
   if has_ranger_admin and stack_supports_

ambari git commit: AMBARI-20629 Take Ambari Cluster Name as a property in Ranger plugin configs (mugdha)

2017-04-04 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk e0e8a041b -> d711d7a1f


AMBARI-20629 Take Ambari Cluster Name as a property in Ranger plugin configs 
(mugdha)


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

Branch: refs/heads/trunk
Commit: d711d7a1f90074ab65431e6f58c6551e224df43b
Parents: e0e8a04
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Tue Apr 4 10:33:57 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Tue Apr 4 18:15:09 2017 +0530

--
 .../0.96.0.2.0/package/scripts/params_linux.py  |   3 +
 .../2.1.0.2.0/package/scripts/params_linux.py   |   5 +-
 .../configuration/ranger-hdfs-audit.xml |   9 ++
 .../3.0.0.3.0/package/scripts/params_linux.py   |   3 +
 .../configuration/ranger-hive-audit.xml |   9 ++
 .../KAFKA/0.8.1/package/scripts/params.py   |   3 +
 .../0.5.0.2.2/package/scripts/params_linux.py   |   3 +
 .../0.5.0.2.3/package/scripts/params.py |   5 +-
 .../2.1.0.2.0/package/scripts/params_linux.py   |   3 +
 .../configuration/ranger-yarn-audit.xml |   9 ++
 .../3.0.0.3.0/package/scripts/params_linux.py   |   3 +
 .../ATLAS/configuration/ranger-atlas-audit.xml  |  33 ++
 .../HBASE/configuration/ranger-hbase-audit.xml  |  33 ++
 .../HDFS/configuration/ranger-hdfs-audit.xml|  33 ++
 .../HIVE/configuration/ranger-hive-audit.xml|  33 ++
 .../KAFKA/configuration/ranger-kafka-audit.xml  |  33 ++
 .../KNOX/configuration/ranger-knox-audit.xml|  33 ++
 .../configuration/ranger-kms-audit.xml  |  33 ++
 .../STORM/configuration/ranger-storm-audit.xml  |  33 ++
 .../YARN/configuration/ranger-yarn-audit.xml|  33 ++
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  | 108 +++
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |  53 -
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml |  33 ++
 23 files changed, 540 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d711d7a1/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
index e78bfc2..3177643 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
@@ -408,6 +408,9 @@ if enable_ranger_hbase:
   if has_ranger_admin and stack_supports_ranger_audit_db and 
xa_audit_db_flavor.lower() == 'sqla':
 xa_audit_db_is_enabled = False
 
+# need this to capture cluster name from where ranger hbase plugin is enabled
+cluster_name = config['clusterName']
+
 # ranger hbase plugin section end
 
 create_hbase_home_directory = 
check_stack_feature(StackFeature.HBASE_HOME_DIRECTORY, stack_version_formatted)

http://git-wip-us.apache.org/repos/asf/ambari/blob/d711d7a1/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
index b8785f3..f0566d7 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
@@ -547,4 +547,7 @@ if enable_ranger_hdfs:
   if has_ranger_admin and stack_supports_ranger_audit_db and 
xa_audit_db_flavor.lower() == 'sqla':
 xa_audit_db_is_enabled = False
 
-# ranger hdfs plugin section end
+# need this to capture cluster name from where ranger hdfs plugin is enabled
+cluster_name = config['clusterName']
+
+# ranger hdfs plugin section end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/d711d7a1/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/configuration/ranger-hdfs-audit.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/configuration/ranger-hdfs-audit.xml
 
b/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/configuration/ranger-hdfs-audit.xml
index 731b136..02b195f 100644
--- 
a/am

ambari git commit: AMBARI-20636 Allow users to add custom configs for Ranger service in all plugins (mugdha)

2017-04-03 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk b88512e71 -> 3bab2125f


AMBARI-20636 Allow users to add custom configs for Ranger service in all 
plugins (mugdha)


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

Branch: refs/heads/trunk
Commit: 3bab2125fc9570398ed1514aa11d9b1d910ecde1
Parents: b88512e
Author: Mugdha Varadkar <mug...@apache.org>
Authored: Fri Mar 31 14:45:55 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Mon Apr 3 11:40:04 2017 +0530

--
 .../libraries/functions/setup_ranger_plugin_xml.py  | 16 ++--
 .../ATLAS/0.1.0.2.3/package/scripts/params.py   |  5 +
 .../0.96.0.2.0/package/scripts/params_linux.py  |  6 +-
 .../HDFS/2.1.0.2.0/package/scripts/params_linux.py  |  6 +-
 .../HDFS/3.0.0.3.0/package/scripts/params_linux.py  |  6 +-
 .../HIVE/0.12.0.2.0/package/scripts/params_linux.py |  6 +-
 .../HIVE/2.1.0.3.0/package/scripts/params_linux.py  |  6 +-
 .../KAFKA/0.8.1/package/scripts/params.py   |  6 +-
 .../KNOX/0.5.0.2.2/package/scripts/params_linux.py  |  8 ++--
 .../RANGER_KMS/0.5.0.2.3/package/scripts/params.py  |  5 +
 .../STORM/0.9.1/package/scripts/params_linux.py |  6 +-
 .../YARN/2.1.0.2.0/package/scripts/params_linux.py  |  6 +-
 .../YARN/3.0.0.3.0/package/scripts/params_linux.py  |  6 +-
 13 files changed, 75 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3bab2125/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
index 04a5bb1..c510dac 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_ranger_plugin_xml.py
@@ -17,7 +17,7 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 
 """
-__all__ = ["setup_ranger_plugin", "get_audit_configs"]
+__all__ = ["setup_ranger_plugin", "get_audit_configs", 
"generate_ranger_service_config"]
 
 import os
 import ambari_simplejson as json
@@ -279,4 +279,16 @@ def get_audit_configs(config):
 audit_jdbc_url = 
format('jdbc:sqlanywhere:database={xa_audit_db_name};host={xa_db_host}')
 jdbc_driver = "sap.jdbc4.sqlanywhere.IDriver"
 
-  return jdbc_jar_name, previous_jdbc_jar_name, audit_jdbc_url, jdbc_driver
\ No newline at end of file
+  return jdbc_jar_name, previous_jdbc_jar_name, audit_jdbc_url, jdbc_driver
+
+def generate_ranger_service_config(ranger_plugin_properties):
+  custom_service_config_dict = {}
+  ranger_plugin_properties_copy = {}
+  ranger_plugin_properties_copy.update(ranger_plugin_properties)
+
+  for key, value in ranger_plugin_properties_copy.iteritems():
+if key.startswith("ranger.service.config.param."):
+  modify_key_name = key.replace("ranger.service.config.param.","")
+  custom_service_config_dict[modify_key_name] = value
+
+  return custom_service_config_dict

http://git-wip-us.apache.org/repos/asf/ambari/blob/3bab2125/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index 21d172b..bf4848b 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -33,6 +33,7 @@ from resource_management.libraries.functions.stack_features 
import check_stack_f
 from resource_management.libraries.functions import StackFeature
 from resource_management.libraries.functions.is_empty import is_empty
 from resource_management.libraries.functions.expect import expect
+from resource_management.libraries.functions.setup_ranger_plugin_xml import 
generate_ranger_service_config
 
 
 def configs_for_ha(atlas_hosts, metadata_port, is_atlas_ha_enabled, 
metadata_protocol):
@@ -395,6 +396,10 @@ if stack_supports_atlas_ranger_plugin and 
enable_ranger_atlas:

  1   2   >