[ambari] branch trunk updated: Ambari-23041. Increase config combo widget width

2018-02-21 Thread akovalenko
This is an automated email from the ASF dual-hosted git repository.

akovalenko 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 e0c066e  Ambari-23041. Increase config combo widget width
e0c066e is described below

commit e0c066ee1270a0482dfc613e3f7a45c80797a657
Author: Aleksandr Kovalenko 
AuthorDate: Wed Feb 21 21:21:29 2018 +0200

Ambari-23041. Increase config combo widget width
---
 ambari-web/app/styles/widgets.less |  2 +-
 ambari-web/app/styles/wizard.less  | 14 --
 2 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/ambari-web/app/styles/widgets.less 
b/ambari-web/app/styles/widgets.less
index 3f4a707..6f65dfe 100644
--- a/ambari-web/app/styles/widgets.less
+++ b/ambari-web/app/styles/widgets.less
@@ -19,7 +19,7 @@
 
 @undo-btn-margin: 10px;
 @controls-min-width: 55px;
-@combo-widget-width: 100px;
+@combo-widget-width: 200px;
 @overriden-property-bg-color: rgba(211, 237, 247, 0.39);
 @overriden-property-widget-padding: 8px;
 @green: #6ebd45;
diff --git a/ambari-web/app/styles/wizard.less 
b/ambari-web/app/styles/wizard.less
index 4e231a6..dcf5947 100644
--- a/ambari-web/app/styles/wizard.less
+++ b/ambari-web/app/styles/wizard.less
@@ -963,20 +963,6 @@
   }
 }
 
-#databases {
-  .config-section-table {
-border-spacing: 20px 0;
-.config-section {
-  padding-top: 0;
-  .combo-widget {
-input {
-  width: 183px;
-}
-  }
-}
-  }
-}
-
 #all-configurations {
   min-height: 650px;
   .config-section {

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


[ambari] branch branch-feature-AMBARI-14714 updated: [AMBARI-23036] Create Lifecycle changes for Upgrade Packs (#430)

2018-02-21 Thread ncole
This is an automated email from the ASF dual-hosted git repository.

ncole pushed a commit to branch branch-feature-AMBARI-14714
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714 by 
this push:
 new 859dbef  [AMBARI-23036] Create Lifecycle changes for Upgrade Packs 
(#430)
859dbef is described below

commit 859dbeff4858ffd33dd2664b8cb27dd724d2eef0
Author: ncole 
AuthorDate: Wed Feb 21 13:55:44 2018 -0500

[AMBARI-23036] Create Lifecycle changes for Upgrade Packs (#430)

* [AMBARI-23036] Create Lifecycle changes for Upgrade Packs

* [AMBARI-23036] Update new enum for ordering (review comments)
---
 .../ambari/annotations/ExperimentalFeature.java|8 +-
 .../apache/ambari/server/state/UpgradeContext.java |3 +-
 .../apache/ambari/server/state/UpgradeHelper.java  |3 +-
 .../ambari/server/state/stack/UpgradePack.java |   55 +-
 .../server/state/stack/upgrade/Lifecycle.java  |  133 +++
 ambari-server/src/main/resources/upgrade-pack.xsd  |   59 +-
 .../ambari/server/state/stack/UpgradePackTest.java |   74 ++
 .../mpacks-v2/upgrade-packs/upgrade-basic.xml  | 1147 
 8 files changed, 1439 insertions(+), 43 deletions(-)

diff --git 
a/ambari-server/src/main/java/org/apache/ambari/annotations/ExperimentalFeature.java
 
b/ambari-server/src/main/java/org/apache/ambari/annotations/ExperimentalFeature.java
index 35c3c2f..94be177 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/annotations/ExperimentalFeature.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/annotations/ExperimentalFeature.java
@@ -45,5 +45,11 @@ public enum ExperimentalFeature {
   /**
* For code that is for multi-service
*/
-  MULTI_SERVICE
+  MULTI_SERVICE,
+
+  /**
+   * For code that is for upgrading Mpacks.  Use this to mark code that may 
ultimately
+   * be removed.
+   */
+  MPACK_UPGRADES
 }
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java
index befa31b..7525e6f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java
@@ -74,6 +74,7 @@ import org.apache.ambari.server.state.stack.upgrade.Grouping;
 import org.apache.ambari.server.state.stack.upgrade.HostOrderGrouping;
 import org.apache.ambari.server.state.stack.upgrade.HostOrderItem;
 import 
org.apache.ambari.server.state.stack.upgrade.HostOrderItem.HostOrderActionType;
+import org.apache.ambari.server.state.stack.upgrade.Lifecycle;
 import org.apache.ambari.server.state.stack.upgrade.UpgradeScope;
 import org.apache.ambari.server.state.stack.upgrade.UpgradeType;
 import org.apache.commons.collections.CollectionUtils;
@@ -1296,7 +1297,7 @@ public class UpgradeContext {
   // verify that the upgradepack has the required grouping and set the
   // action items on it
   HostOrderGrouping hostOrderGrouping = null;
-  List groupings = upgradePack.getGroups(direction);
+  List groupings = 
upgradePack.getGroups(Lifecycle.LifecycleType.UPGRADE, direction);
   for (Grouping grouping : groupings) {
 if (grouping instanceof HostOrderGrouping) {
   hostOrderGrouping = (HostOrderGrouping) grouping;
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java 
b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
index 0af6840..bad222c 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
@@ -61,6 +61,7 @@ import org.apache.ambari.server.state.stack.UpgradePack;
 import org.apache.ambari.server.state.stack.UpgradePack.ProcessingComponent;
 import org.apache.ambari.server.state.stack.upgrade.Direction;
 import org.apache.ambari.server.state.stack.upgrade.Grouping;
+import org.apache.ambari.server.state.stack.upgrade.Lifecycle;
 import org.apache.ambari.server.state.stack.upgrade.ManualTask;
 import org.apache.ambari.server.state.stack.upgrade.RestartTask;
 import org.apache.ambari.server.state.stack.upgrade.ServiceCheckGrouping;
@@ -301,7 +302,7 @@ public class UpgradeHelper {
 List groups = new ArrayList<>();
 
 UpgradeGroupHolder previousGroupHolder = null;
-for (Grouping group : upgradePack.getGroups(context.getDirection())) {
+for (Grouping group : 
upgradePack.getGroups(Lifecycle.LifecycleType.UPGRADE, context.getDirection())) 
{
 
   // !!! grouping is not scoped to context
   if (!context.isScoped(group.scope)) {
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
index 

[ambari] branch trunk updated: [AMBARI-23043] Table or view not found error with livy/livy2 interpreter on upgraded cluster to Fenton-M30 (#429)

2018-02-21 Thread vbrodetskyi
This is an automated email from the ASF dual-hosted git repository.

vbrodetskyi 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 9be99ce  [AMBARI-23043] Table or view not found error with livy/livy2 
interpreter on upgraded cluster to Fenton-M30 (#429)
9be99ce is described below

commit 9be99cec9b0ad7aaa0290309ba9c56927498c8f6
Author: vbrodetskyi 
AuthorDate: Wed Feb 21 21:43:37 2018 +0200

[AMBARI-23043] Table or view not found error with livy/livy2 interpreter on 
upgraded cluster to Fenton-M30 (#429)
---
 .../ZEPPELIN/0.7.0/package/scripts/master.py   | 33 ++
 1 file changed, 33 insertions(+)

diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
index 26a7ba2..c85a0e4 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
@@ -298,6 +298,39 @@ class Master(Script):
   if setting_key not in interpreter_settings:
 interpreter_settings[setting_key] = interpreter_json_template[
   setting_key]
+  else:
+templateGroups = 
interpreter_json_template[setting_key]['interpreterGroup']
+groups = interpreter_settings[setting_key]['interpreterGroup']
+
+templateProperties = 
interpreter_json_template[setting_key]['properties']
+properties = interpreter_settings[setting_key]['properties']
+
+templateOptions = interpreter_json_template[setting_key]['option']
+options = interpreter_settings[setting_key]['option']
+
+# search for difference in groups from current interpreter and 
template interpreter
+# if any group exists in template but doesn't exist in current 
interpreter, it will be added
+group_names = []
+for group in groups:
+  group_names.append(group['name'])
+
+for template_group in templateGroups:
+  if not template_group['name'] in group_names:
+groups.append(template_group)
+
+
+# search for difference in properties from current interpreter and 
template interpreter
+# if any property exists in template but doesn't exist in current 
interpreter, it will be added
+for template_property in templateProperties:
+  if not template_property in properties:
+properties[template_property] = 
templateProperties[template_property]
+
+
+# search for difference in options from current interpreter and 
template interpreter
+# if any option exists in template but doesn't exist in current 
interpreter, it will be added
+for template_option in templateOptions:
+  if not template_option in options:
+options[template_option] = templateOptions[template_option]
 
 self.set_interpreter_settings(config_data)
 

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


[ambari] branch branch-2.6 updated: [AMBARI-23043] Table or view not found error' with livy/livy2 interpreter on upgraded cluster to Fenton-M30

2018-02-21 Thread vbrodetskyi
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/branch-2.6 by this push:
 new c386567  [AMBARI-23043] Table or view not found error' with livy/livy2 
interpreter on upgraded cluster to Fenton-M30
c386567 is described below

commit c3865676200a55fdbbcaf8377068d87162141532
Author: vbrodetskyi 
AuthorDate: Wed Feb 21 18:59:52 2018 +0200

[AMBARI-23043] Table or view not found error' with livy/livy2 interpreter 
on upgraded cluster to Fenton-M30
---
 .../ZEPPELIN/0.7.0/package/scripts/master.py   | 33 ++
 1 file changed, 33 insertions(+)

diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
index 56ed31c..6607c4c 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
@@ -292,6 +292,39 @@ class Master(Script):
   if setting_key not in interpreter_settings:
 interpreter_settings[setting_key] = interpreter_json_template[
   setting_key]
+  else:
+templateGroups = 
interpreter_json_template[setting_key]['interpreterGroup']
+groups = interpreter_settings[setting_key]['interpreterGroup']
+
+templateProperties = 
interpreter_json_template[setting_key]['properties']
+properties = interpreter_settings[setting_key]['properties']
+
+templateOptions = interpreter_json_template[setting_key]['option']
+options = interpreter_settings[setting_key]['option']
+
+# search for difference in groups from current interpreter and 
template interpreter
+# if any group exists in template but doesn't exist in current 
interpreter, it will be added
+group_names = []
+for group in groups:
+  group_names.append(group['name'])
+
+for template_group in templateGroups:
+  if not template_group['name'] in group_names:
+groups.append(template_group)
+
+
+# search for difference in properties from current interpreter and 
template interpreter
+# if any property exists in template but doesn't exist in current 
interpreter, it will be added
+for template_property in templateProperties:
+  if not template_property in properties:
+properties[template_property] = 
templateProperties[template_property]
+
+
+# search for difference in options from current interpreter and 
template interpreter
+# if any option exists in template but doesn't exist in current 
interpreter, it will be added
+for template_option in templateOptions:
+  if not template_option in options:
+options[template_option] = templateOptions[template_option]
 
 self.set_interpreter_settings(config_data)
 

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


[ambari] branch trunk updated: AMBARI-23040. Deploy fails during Atlas Client installation (aonishuk)

2018-02-21 Thread aonishuk
This is an automated email from the ASF dual-hosted git repository.

aonishuk 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 713e6de  AMBARI-23040. Deploy fails during Atlas Client installation 
(aonishuk)
713e6de is described below

commit 713e6de022aef58c96184ab50382d64d410eef4d
Author: Andrew Onishuk 
AuthorDate: Wed Feb 21 13:53:25 2018 +0200

AMBARI-23040. Deploy fails during Atlas Client installation (aonishuk)
---
 .../src/main/python/resource_management/libraries/script/script.py   | 1 -
 1 file changed, 1 deletion(-)

diff --git 
a/ambari-common/src/main/python/resource_management/libraries/script/script.py 
b/ambari-common/src/main/python/resource_management/libraries/script/script.py
index 98e69a4..b8aade9 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/script/script.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/script/script.py
@@ -559,7 +559,6 @@ class Script(object):
 if package_version is None:
   package_version = default("hostLevelParams/package_version", None)
 
-package_version = None
 if (package_version is None or '-' not in package_version) and 
default('/repositoryFile', None):
   self.load_available_packages()
   package_name = self.get_package_from_available(name, 
self.available_packages_in_repos)

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


[ambari] branch branch-2.6 updated: [AMBARI-23035] HDFS Balancer via Ambari fails when FIPS mode is activated on the OS

2018-02-21 Thread rlevas
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/branch-2.6 by this push:
 new a3d5788  [AMBARI-23035] HDFS Balancer via Ambari fails when FIPS mode 
is activated on the OS
a3d5788 is described below

commit a3d578816ad470b94c128606320a0a8033beb2ce
Author: Robert Levas 
AuthorDate: Tue Feb 20 15:23:54 2018 -0500

[AMBARI-23035] HDFS Balancer via Ambari fails when FIPS mode is activated 
on the OS
---
 .../src/main/python/ambari_agent/alerts/web_alert.py  | 15 +--
 .../HDFS/2.1.0.2.0/package/scripts/namenode.py| 19 +--
 .../1.10.3-10/package/scripts/service_check.py| 16 +---
 .../test/python/stacks/2.0.6/HDFS/test_namenode.py|  2 +-
 4 files changed, 12 insertions(+), 40 deletions(-)

diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py 
b/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py
index be743f6..a5225a6 100644
--- a/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py
+++ b/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py
@@ -37,17 +37,6 @@ from ambari_commons.inet_utils import resolve_address, 
ensure_ssl_using_protocol
 from ambari_commons.constants import AGENT_TMP_DIR
 from ambari_agent.AmbariConfig import AmbariConfig
 
-# hashlib is supplied as of Python 2.5 as the replacement interface for md5
-# and other secure hashes.  In 2.6, md5 is deprecated.  Import hashlib if
-# available, avoiding a deprecation warning under 2.6.  Import md5 otherwise,
-# preserving 2.4 compatibility.
-try:
-  import hashlib
-  _md5 = hashlib.md5
-except ImportError:
-  import md5
-  _md5 = md5.new
-
 logger = logging.getLogger(__name__)
 
 # default timeout
@@ -189,9 +178,7 @@ class WebAlert(BaseAlert):
   
   if kerberos_principal is not None and kerberos_keytab is not None \
 and security_enabled is not None and security_enabled.lower() == 
"true":
-# Create the kerberos credentials cache (ccache) file and set it in 
the environment to use
-# when executing curl. Use the md5 hash of the combination of the 
principal and keytab file
-# to generate a (relatively) unique cache filename so that we can use 
it as needed.
+
 tmp_dir = AGENT_TMP_DIR
 if tmp_dir is None:
   tmp_dir = gettempdir()
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
index 89719cf..3f39a49 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
@@ -21,6 +21,7 @@ import sys
 import os
 import json
 import tempfile
+import hashlib
 from datetime import datetime
 import ambari_simplejson as json # simplejson is much faster comparing to 
Python 2.6 json module and has the same functions set.
 
@@ -51,18 +52,8 @@ from hdfs import hdfs
 import hdfs_rebalance
 from utils import initiate_safe_zkfc_failover, get_hdfs_binary, 
get_dfsadmin_base_command
 
-
-
-# hashlib is supplied as of Python 2.5 as the replacement interface for md5
-# and other secure hashes.  In 2.6, md5 is deprecated.  Import hashlib if
-# available, avoiding a deprecation warning under 2.6.  Import md5 otherwise,
-# preserving 2.4 compatibility.
-try:
-  import hashlib
-  _md5 = hashlib.md5
-except ImportError:
-  import md5
-  _md5 = md5.new
+# The hash algorithm to use to generate digests/hashes
+HASH_ALGORITHM = hashlib.sha224
 
 class NameNode(Script):
 
@@ -222,11 +213,11 @@ class NameNodeDefault(NameNode):
 
 if params.security_enabled:
   # Create the kerberos credentials cache (ccache) file and set it in the 
environment to use
-  # when executing HDFS rebalance command. Use the md5 hash of the 
combination of the principal and keytab file
+  # when executing HDFS rebalance command. Use the sha224 hash of the 
combination of the principal and keytab file
   # to generate a (relatively) unique cache filename so that we can use it 
as needed.
   # TODO: params.tmp_dir=/var/lib/ambari-agent/tmp. However hdfs user 
doesn't have access to this path.
   # TODO: Hence using /tmp
-  ccache_file_name = "hdfs_rebalance_cc_" + 
_md5(format("{hdfs_principal_name}|{hdfs_user_keytab}")).hexdigest()
+  ccache_file_name = "hdfs_rebalance_cc_" + 
HASH_ALGORITHM(format("{hdfs_principal_name}|{hdfs_user_keytab}")).hexdigest()
   ccache_file_path = os.path.join(tempfile.gettempdir(), ccache_file_name)
   rebalance_env['KRB5CCNAME'] = ccache_file_path
 
diff --git 
a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/service_check.py
 

[ambari] branch trunk updated: [AMBARI-23035] HDFS Balancer via Ambari fails when FIPS mode is activated on the OS

2018-02-21 Thread rlevas
This is an automated email from the ASF dual-hosted git repository.

rlevas 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 03de6ee  [AMBARI-23035] HDFS Balancer via Ambari fails when FIPS mode 
is activated on the OS
03de6ee is described below

commit 03de6ee318a303c02e3ca5d48f4c600605e94831
Author: Robert Levas 
AuthorDate: Tue Feb 20 13:31:52 2018 -0500

[AMBARI-23035] HDFS Balancer via Ambari fails when FIPS mode is activated 
on the OS
---
 .../src/main/python/ambari_agent/alerts/web_alert.py  | 15 +--
 .../HDFS/2.1.0.2.0/package/scripts/namenode.py| 19 +--
 .../1.10.3-10/package/scripts/service_check.py| 18 --
 .../1.10.3-30/package/scripts/service_check.py| 18 --
 .../test/python/stacks/2.0.6/HDFS/test_namenode.py|  2 +-
 5 files changed, 15 insertions(+), 57 deletions(-)

diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py 
b/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py
index 6cfac78..8fc2744 100644
--- a/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py
+++ b/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py
@@ -35,17 +35,6 @@ from ambari_commons.inet_utils import resolve_address, 
ensure_ssl_using_protocol
 from ambari_commons.constants import AGENT_TMP_DIR
 from ambari_agent.AmbariConfig import AmbariConfig
 
-# hashlib is supplied as of Python 2.5 as the replacement interface for md5
-# and other secure hashes.  In 2.6, md5 is deprecated.  Import hashlib if
-# available, avoiding a deprecation warning under 2.6.  Import md5 otherwise,
-# preserving 2.4 compatibility.
-try:
-  import hashlib
-  _md5 = hashlib.md5
-except ImportError:
-  import md5
-  _md5 = md5.new
-
 logger = logging.getLogger(__name__)
 
 # default timeout
@@ -189,9 +178,7 @@ class WebAlert(BaseAlert):
 
   if kerberos_principal is not None and kerberos_keytab is not None \
 and security_enabled is not None and security_enabled.lower() == 
"true":
-# Create the kerberos credentials cache (ccache) file and set it in 
the environment to use
-# when executing curl. Use the md5 hash of the combination of the 
principal and keytab file
-# to generate a (relatively) unique cache filename so that we can use 
it as needed.
+
 tmp_dir = AGENT_TMP_DIR
 if tmp_dir is None:
   tmp_dir = gettempdir()
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
index 291da05..197bd2e 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
@@ -21,6 +21,7 @@ import sys
 import os
 import json
 import tempfile
+import hashlib
 from datetime import datetime
 import ambari_simplejson as json # simplejson is much faster comparing to 
Python 2.6 json module and has the same functions set.
 
@@ -51,18 +52,8 @@ from hdfs import hdfs, reconfig
 import hdfs_rebalance
 from utils import initiate_safe_zkfc_failover, get_hdfs_binary, 
get_dfsadmin_base_command
 
-
-
-# hashlib is supplied as of Python 2.5 as the replacement interface for md5
-# and other secure hashes.  In 2.6, md5 is deprecated.  Import hashlib if
-# available, avoiding a deprecation warning under 2.6.  Import md5 otherwise,
-# preserving 2.4 compatibility.
-try:
-  import hashlib
-  _md5 = hashlib.md5
-except ImportError:
-  import md5
-  _md5 = md5.new
+# The hash algorithm to use to generate digests/hashes
+HASH_ALGORITHM = hashlib.sha224
 
 class NameNode(Script):
 
@@ -239,11 +230,11 @@ class NameNodeDefault(NameNode):
 
 if params.security_enabled:
   # Create the kerberos credentials cache (ccache) file and set it in the 
environment to use
-  # when executing HDFS rebalance command. Use the md5 hash of the 
combination of the principal and keytab file
+  # when executing HDFS rebalance command. Use the sha224 hash of the 
combination of the principal and keytab file
   # to generate a (relatively) unique cache filename so that we can use it 
as needed.
   # TODO: params.tmp_dir=/var/lib/ambari-agent/tmp. However hdfs user 
doesn't have access to this path.
   # TODO: Hence using /tmp
-  ccache_file_name = "hdfs_rebalance_cc_" + 
_md5(format("{hdfs_principal_name}|{hdfs_user_keytab}")).hexdigest()
+  ccache_file_name = "hdfs_rebalance_cc_" + 
HASH_ALGORITHM(format("{hdfs_principal_name}|{hdfs_user_keytab}")).hexdigest()
   ccache_file_path = os.path.join(tempfile.gettempdir(), ccache_file_name)
   rebalance_env['KRB5CCNAME'] = ccache_file_path
 
diff --git 

[ambari] 01/01: Merge pull request #405 from smolnar82/AMBARI-23020

2018-02-21 Thread dmitriusan
This is an automated email from the ASF dual-hosted git repository.

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

commit 80d3dca600253820468d0d940bdd95ba76ef88d2
Merge: ef35fb0 55b3001
Author: Lisnichenko Dmitro 
AuthorDate: Wed Feb 21 15:26:09 2018 +0200

Merge pull request #405 from smolnar82/AMBARI-23020

[AMBARI-23020] Decreasing the log level from WARN to DEBUG in case we use 
the default value of an undefined LDAP configuration element

 .../org/apache/ambari/server/ldap/domain/AmbariLdapConfiguration.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


[ambari] branch trunk updated (ef35fb0 -> 80d3dca)

2018-02-21 Thread dmitriusan
This is an automated email from the ASF dual-hosted git repository.

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


from ef35fb0  Merge pull request #403 from smolnar82/AMBARI-22944
 add 55b3001  AMBARI-23020. Decreasing the log level from WARN to DEBUG in 
case we use the default value of an undefined LDAP configuration element
 new 80d3dca  Merge pull request #405 from smolnar82/AMBARI-23020

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:
 .../org/apache/ambari/server/ldap/domain/AmbariLdapConfiguration.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


[ambari] branch trunk updated (957dd89 -> ef35fb0)

2018-02-21 Thread dmitriusan
This is an automated email from the ASF dual-hosted git repository.

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


from 957dd89  AMBARI-23025. NN Federation Wizard: implement step2 
(akovalenko)
 add eebcfed  AMBARI-22944. Using the proper variable when checking 
emptiness
 new ef35fb0  Merge pull request #403 from smolnar82/AMBARI-22944

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:
 .../apache/ambari/server/state/kerberos/KerberosKeytabDescriptor.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


[ambari] 01/01: Merge pull request #403 from smolnar82/AMBARI-22944

2018-02-21 Thread dmitriusan
This is an automated email from the ASF dual-hosted git repository.

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

commit ef35fb0da672e53a03038581af7ac6d0f73048bb
Merge: 957dd89 eebcfed
Author: Lisnichenko Dmitro 
AuthorDate: Wed Feb 21 15:25:19 2018 +0200

Merge pull request #403 from smolnar82/AMBARI-22944

[AMBARI-22944] Using the proper variable when checking emptiness

 .../apache/ambari/server/state/kerberos/KerberosKeytabDescriptor.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


[ambari] branch trunk updated: AMBARI-23025. NN Federation Wizard: implement step2 (akovalenko)

2018-02-21 Thread akovalenko
This is an automated email from the ASF dual-hosted git repository.

akovalenko 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 957dd89  AMBARI-23025. NN Federation Wizard: implement step2 
(akovalenko)
957dd89 is described below

commit 957dd89cbc4910386a803a4faf512ceac3407291
Author: Aleksandr Kovalenko 
AuthorDate: Mon Feb 19 20:03:05 2018 +0200

AMBARI-23025. NN Federation Wizard: implement step2 (akovalenko)
---
 .../controllers/main/admin/federation/step2_controller.js | 15 ++-
 ambari-web/app/routes/namenode_federation_routes.js   | 10 ++
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git 
a/ambari-web/app/controllers/main/admin/federation/step2_controller.js 
b/ambari-web/app/controllers/main/admin/federation/step2_controller.js
index 1312b95..ea6b7a8 100644
--- a/ambari-web/app/controllers/main/admin/federation/step2_controller.js
+++ b/ambari-web/app/controllers/main/admin/federation/step2_controller.js
@@ -20,6 +20,19 @@ var App = require('app');
 
 App.NameNodeFederationWizardStep2Controller = 
Em.Controller.extend(App.AssignMasterComponents, {
 
-  name: "nameNodeFederationWizardStep2Controller"
+  name: "nameNodeFederationWizardStep2Controller",
+
+  useServerValidation: false,
+
+  mastersToShow: ['NAMENODE'],
+
+  mastersToAdd: ['NAMENODE', 'NAMENODE'],
+
+  showCurrentPrefix: ['NAMENODE'],
+
+  showAdditionalPrefix: ['NAMENODE'],
+
+  showInstalledMastersFirst: true
+
 });
 
diff --git a/ambari-web/app/routes/namenode_federation_routes.js 
b/ambari-web/app/routes/namenode_federation_routes.js
index 21b31b2..2b55174 100644
--- a/ambari-web/app/routes/namenode_federation_routes.js
+++ b/ambari-web/app/routes/namenode_federation_routes.js
@@ -111,6 +111,16 @@ module.exports = App.WizardRoute.extend({
   return false;
 },
 next: function (router) {
+  var wizardController = router.get('nameNodeFederationWizardController');
+  var stepController = 
router.get('nameNodeFederationWizardStep2Controller');
+  var currentNN = 
stepController.get('servicesMasters').filterProperty('component_name', 
'NAMENODE').filterProperty('isInstalled', true);
+  var additionalNN = 
stepController.get('servicesMasters').filterProperty('component_name', 
'NAMENODE').filterProperty('isInstalled', false);
+  var rmHost = {
+currentNN: currentNN.mapProperty('selectedHost'),
+additionalNN: additionalNN.mapProperty('selectedHost')
+  };
+  wizardController.saveSelectedHosts(rmHost);
+  wizardController.saveMasterComponentHosts(stepController);
   router.transitionTo('step3');
 },
 back: function (router) {

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


[ambari] branch trunk updated: AMBARI-23027. Rename copy-dist to copy-dest.

2018-02-21 Thread oleewere
This is an automated email from the ASF dual-hosted git repository.

oleewere 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 1ee683b  AMBARI-23027. Rename copy-dist to copy-dest.
1ee683b is described below

commit 1ee683b272ea3c6b81f659a3fa4e5d599859aed4
Author: Oliver Szabo 
AuthorDate: Wed Feb 21 12:06:00 2018 +0100

AMBARI-23027. Rename copy-dist to copy-dest.
---
 .../src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudCLI.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudCLI.java
 
b/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudCLI.java
index 5ffac97..ca8569f 100644
--- 
a/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudCLI.java
+++ 
b/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudCLI.java
@@ -329,7 +329,7 @@ public class AmbariSolrCloudCLI {
   .build();
 
 final Option copyDestOption = Option.builder("cpd")
-  .longOpt("copy-dist")
+  .longOpt("copy-dest")
   .desc("ZNode or local destination (used for ZNode transfer)")
   .numberOfArgs(1)
   .argName("/myznode | /my/path")

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


[ambari] branch trunk updated: AMBARI-23031 View name is not displayed in ambari-views page

2018-02-21 Thread atkach
This is an automated email from the ASF dual-hosted git repository.

atkach 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 1495e51  AMBARI-23031 View name is not displayed in ambari-views page
1495e51 is described below

commit 1495e513af4b28c2289b69dac079512ea2f086ae
Author: Andrii Tkach 
AuthorDate: Tue Feb 20 17:05:05 2018 +0200

AMBARI-23031 View name is not displayed in ambari-views page
---
 .../src/main/resources/ui/admin-web/app/scripts/i18n.config.js  | 1 +
 .../resources/ui/admin-web/app/views/ambariViews/viewsList.html | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
index 4a13e02..06d2e6f 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
@@ -193,6 +193,7 @@ angular.module('ambariAdminConsole')
 'views.visible': 'Visible',
 'views.description': 'Description',
 'views.shortUrl': 'Short URL',
+'views.urlName': 'URL Name',
 'views.instanceDescription': 'Instance Description',
 'views.clusterConfiguration': 'Cluster Configuration',
 'views.localCluster': 'Local Cluster',
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/viewsList.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/viewsList.html
index 48f445b..ba5803a 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/viewsList.html
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/viewsList.html
@@ -49,7 +49,7 @@
 {{'views.table.viewType' | translate}}
 
 
-{{'urls.viewInstance' | translate}}
+{{'views.urlName' | translate}}
 
 
 {{'common.actions' | translate}}
@@ -60,7 +60,7 @@
 
 
 
-{{instance.short_url_name}}
+{{instance.instance_name}}
 
 
 {{instance.view_name}} {{"{"+instance.version+"}"}} 

 
 
-{{instance.instance_name}}
+{{instance.short_url_name}}
 
 
 

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


[ambari] branch trunk updated: AMBARI-23027. Add backup/copy znode command for infra-solr-client. (#417)

2018-02-21 Thread oleewere
This is an automated email from the ASF dual-hosted git repository.

oleewere 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 ca2064e  AMBARI-23027. Add backup/copy znode command for 
infra-solr-client. (#417)
ca2064e is described below

commit ca2064e267752e5e20e52b585abce916268bfdf3
Author: Olivér Szabó 
AuthorDate: Wed Feb 21 11:16:09 2018 +0100

AMBARI-23027. Add backup/copy znode command for infra-solr-client. (#417)

* AMBARI-23027. Add backup/copy znode command for infra-solr-client.

* AMBARI-23027. Add missing license header.

* AMBARI-23027. Fix transfer-znode flag.

* AMBARI-23027. Fix example.

* AMBARI-23027. Fix arg name

* AMBARI-23027. Add proper descriptions

* AMBARI-23027. Fix imports (do not use *)
---
 .../ambari/infra/solr/AmbariSolrCloudCLI.java  | 57 ++
 .../ambari/infra/solr/AmbariSolrCloudClient.java   | 26 ++
 .../infra/solr/AmbariSolrCloudClientBuilder.java   | 18 +++
 .../solr/commands/TransferZnodeZkCommand.java  | 45 +
 4 files changed, 136 insertions(+), 10 deletions(-)

diff --git 
a/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudCLI.java
 
b/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudCLI.java
index d4567e8..5ffac97 100644
--- 
a/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudCLI.java
+++ 
b/ambari-infra/ambari-infra-solr-client/src/main/java/org/apache/ambari/infra/solr/AmbariSolrCloudCLI.java
@@ -53,6 +53,7 @@ public class AmbariSolrCloudCLI {
   private static final String SECURE_SOLR_ZNODE_COMMAND = "secure-solr-znode";
   private static final String SECURITY_JSON_LOCATION = 
"security-json-location";
   private static final String REMOVE_ADMIN_HANDLERS = "remove-admin-handlers";
+  private static final String TRANSFER_ZNODE_COMMAND = "transfer-znode";
   private static final String CMD_LINE_SYNTAX =
 "\n./solrCloudCli.sh --create-collection -z 
host1:2181,host2:2181/ambari-solr -c collection -cs conf_set"
   + "\n./solrCloudCli.sh --upload-config -z 
host1:2181,host2:2181/ambari-solr -d /tmp/myconfig_dir -cs config_set"
@@ -62,6 +63,7 @@ public class AmbariSolrCloudCLI {
   + "\n./solrCloudCli.sh --remove-admin-handlers -z 
host1:2181,host2:2181/ambari-solr -c collection"
   + "\n./solrCloudCli.sh --create-znode -z host1:2181,host2:2181 -zn 
/ambari-solr"
   + "\n./solrCloudCli.sh --check-znode -z host1:2181,host2:2181 -zn 
/ambari-solr"
+  + "\n./solrCloudCli.sh --transfer-znode -z host1:2181,host2:2181 -cps 
/ambari-solr -cpd /ambari-solr-backup"
   + "\n./solrCloudCli.sh --cluster-prop -z 
host1:2181,host2:2181/ambari-solr -cpn urlScheme -cpn http"
   + "\n./solrCloudCli.sh --secure-znode -z host1:2181,host2:2181 -zn 
/ambari-solr -su logsearch,atlas,ranger --jaas-file /etc/myconf/jaas_file"
   + "\n./solrCloudCli.sh --unsecure-znode -z host1:2181,host2:2181 -zn 
/ambari-solr --jaas-file /etc/myconf/jaas_file"
@@ -144,6 +146,11 @@ public class AmbariSolrCloudCLI {
   .desc("Remove AdminHandlers request handler from solrconfig.xml 
(command)")
   .build();
 
+final Option transferZnodeOption = Option.builder("tz")
+  .longOpt(TRANSFER_ZNODE_COMMAND)
+  .desc("Transfer znode (copy from/to local or to another znode)")
+  .build();
+
 final Option shardNameOption = Option.builder("sn")
   .longOpt("shard-name")
   .desc("Name of the shard for create-shard command")
@@ -307,13 +314,6 @@ public class AmbariSolrCloudCLI {
   .argName("cluster prop value")
   .build();
 
-final Option copyFromZnodeOption = Option.builder("cfz")
-  .longOpt("copy-from-znode")
-  .desc("Copy-from-znode")
-  .numberOfArgs(1)
-  .argName("/ambari-solr-secure")
-  .build();
-
 final Option saslUsersOption = Option.builder("su")
   .longOpt("sasl-users")
   .desc("Sasl users (comma separated list)")
@@ -321,6 +321,27 @@ public class AmbariSolrCloudCLI {
   .argName("atlas,ranger,logsearch-solr")
   .build();
 
+final Option copyScrOption = Option.builder("cps")
+  .longOpt("copy-src")
+  .desc("ZNode or local source (used for ZNode transfer)")
+  .numberOfArgs(1)
+  .argName("/myznode | /my/path")
+  .build();
+
+final Option copyDestOption = Option.builder("cpd")
+  .longOpt("copy-dist")
+  .desc("ZNode or local destination (used for ZNode transfer)")
+  .numberOfArgs(1)
+  .argName("/myznode | /my/path")
+  .build();
+
+final Option transferModeOption = Option.builder("tm")
+  .longOpt("transfer-mode")
+  .desc("Transfer mode, if not used copy znode to znode.")
+  .numberOfArgs(1)
+