[ambari] branch trunk updated: AMBARI-24644. ADDENDUM - Log Search - Fix IP address setter
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 7289a4f AMBARI-24644. ADDENDUM - Log Search - Fix IP address setter 7289a4f is described below commit 7289a4faa8389b112abfd318133bf2c53ae2cba8 Author: Oliver Szabo AuthorDate: Mon Sep 17 22:09:19 2018 +0200 AMBARI-24644. ADDENDUM - Log Search - Fix IP address setter --- .../src/main/java/org/apache/ambari/logsearch/conf/AuthPropsConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/AuthPropsConfig.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/AuthPropsConfig.java index 300a57f..b9c4f94 100644 --- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/AuthPropsConfig.java +++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/AuthPropsConfig.java @@ -399,7 +399,7 @@ public class AuthPropsConfig { return proxyIp; } - public void setProxyIP(List proxyIp) { + public void setProxyIp(List proxyIp) { this.proxyIp = proxyIp; } }
[ambari] branch branch-2.7 updated: AMBARI-24646 'ambari-server setup-ldap' fails with AttributeError when master_key is not persisted (#2330)
This is an automated email from the ASF dual-hosted git repository. dmitriusan 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 80ecad6 AMBARI-24646 'ambari-server setup-ldap' fails with AttributeError when master_key is not persisted (#2330) 80ecad6 is described below commit 80ecad698d0bb1c43788bc09b77d539fb937e402 Author: Lisnichenko Dmitro AuthorDate: Mon Sep 17 19:13:01 2018 +0300 AMBARI-24646 'ambari-server setup-ldap' fails with AttributeError when master_key is not persisted (#2330) * AMBARI-24646. 'ambari-server setup-ldap' fails with AttributeError when master_key is not persisted (dlysnichenko) * AMBARI-24646 'ambari-server setup-ldap' fails with AttributeError when master_key is not persisted - small fix --- .../src/main/python/ambari_server/serverConfiguration.py | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ambari-server/src/main/python/ambari_server/serverConfiguration.py b/ambari-server/src/main/python/ambari_server/serverConfiguration.py index ca140d4..005966c 100644 --- a/ambari-server/src/main/python/ambari_server/serverConfiguration.py +++ b/ambari-server/src/main/python/ambari_server/serverConfiguration.py @@ -908,7 +908,7 @@ def read_passwd_for_alias(alias, masterKey="", options=None): with open(tempFilePath, 'w+'): os.chmod(tempFilePath, stat.S_IREAD | stat.S_IWRITE) -if options is not None and options.master_key is not None and options.master_key: +if options is not None and hasattr(options, 'master_key') and options.master_key is not None and options.master_key: masterKey = options.master_key if masterKey is None or masterKey == "": masterKey = "None" @@ -1019,11 +1019,13 @@ def get_original_master_key(properties, options = None): masterKey = None while(input): try: - if options is not None and options.master_key is not None and options.master_key: + if options is not None and hasattr(options, 'master_key') and options.master_key is not None and options.master_key: masterKey = options.master_key if masterKey is None: masterKey = get_validated_string_input('Enter current Master Key: ', "", ".*", "", True, False) +if options is not None: + options.master_key = masterKey except KeyboardInterrupt: print_warning_msg('Exiting...') sys.exit(1) @@ -1048,6 +1050,9 @@ def get_original_master_key(properties, options = None): if alias and masterKey: password = read_passwd_for_alias(alias, masterKey, options) if not password: +masterKey = None +if options is not None: + options.master_key = None print_error_msg ("ERROR: Master key does not match.") continue
[ambari] 02/02: AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (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 commit f4417ffa9b81c0072181295a6738129cf6a61bd8 Author: Aleksandr Kovalenko AuthorDate: Fri Sep 14 18:36:40 2018 +0300 AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko) --- .../common/configs/config_versions_control_view_test.js | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ambari-web/test/views/common/configs/config_versions_control_view_test.js b/ambari-web/test/views/common/configs/config_versions_control_view_test.js index c3d2372..eff49ae 100644 --- a/ambari-web/test/views/common/configs/config_versions_control_view_test.js +++ b/ambari-web/test/views/common/configs/config_versions_control_view_test.js @@ -101,12 +101,12 @@ describe('App.ConfigVersionsControlView', function () { view.sendRevertCall.restore(); }); it('context passed', function () { - view.makeCurrent({contexts: [ -Em.Object.create({ - version: 1, - serviceName: 'S1' -}) - ]}); + view.set('displayedServiceVersion', Em.Object.create({ +version: 1, +serviceName: 'S1' + })); + + view.makeCurrent(); expect(App.ModalPopup.show.calledOnce).to.be.true; expect(view.sendRevertCall.calledWith(Em.Object.create({
[ambari] branch trunk updated (9d307c8 -> f4417ff)
This is an automated email from the ASF dual-hosted git repository. akovalenko pushed a change to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git. from 9d307c8 AMBARI-24644. Log Search: support trusted knox proxy. (#2327) new 60f0b5e AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko) new f4417ff AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko) The 2 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: .../app/templates/common/configs/config_versions_control.hbs | 2 +- .../app/views/common/configs/config_versions_control_view.js | 4 ++-- .../common/configs/config_versions_control_view_test.js | 12 ++-- 3 files changed, 9 insertions(+), 9 deletions(-)
[ambari] 01/02: AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko)
This is an automated email from the ASF dual-hosted git repository. akovalenko pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 74d801e99a58f5cb7d0bf6176fe1af19a1f4e8e8 Author: Aleksandr Kovalenko AuthorDate: Thu Sep 13 19:18:37 2018 +0300 AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko) --- ambari-web/app/templates/common/configs/config_versions_control.hbs | 2 +- ambari-web/app/views/common/configs/config_versions_control_view.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ambari-web/app/templates/common/configs/config_versions_control.hbs b/ambari-web/app/templates/common/configs/config_versions_control.hbs index e5dbcef..90b3083 100644 --- a/ambari-web/app/templates/common/configs/config_versions_control.hbs +++ b/ambari-web/app/templates/common/configs/config_versions_control.hbs @@ -34,7 +34,7 @@ {{else}} {{view App.ConfigVersionsDropdownView serviceVersionsBinding="view.serviceVersions"}} {{#unless view.displayedServiceVersion.isCurrent}} - + {{t dashboard.configHistory.info-bar.revert.button}} {{/unless}} diff --git a/ambari-web/app/views/common/configs/config_versions_control_view.js b/ambari-web/app/views/common/configs/config_versions_control_view.js index 5fb9732..6cf4523 100644 --- a/ambari-web/app/views/common/configs/config_versions_control_view.js +++ b/ambari-web/app/views/common/configs/config_versions_control_view.js @@ -155,9 +155,9 @@ App.ConfigVersionsControlView = Em.View.extend({ /** * revert config values to chosen version and apply reverted configs to server */ - makeCurrent: function (event) { + makeCurrent: function () { const self = this; -const serviceConfigVersion = event.contexts[0]; +const serviceConfigVersion = this.get('displayedServiceVersion'); const versionText = serviceConfigVersion.get('versionText'); return App.ModalPopup.show({ header: Em.I18n.t('dashboard.configHistory.info-bar.makeCurrent.popup.title'),
[ambari] 01/02: AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (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 commit 60f0b5edb2e5d53e47b008148678c56d5ff47b0e Author: Aleksandr Kovalenko AuthorDate: Thu Sep 13 19:18:37 2018 +0300 AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko) --- ambari-web/app/templates/common/configs/config_versions_control.hbs | 2 +- ambari-web/app/views/common/configs/config_versions_control_view.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ambari-web/app/templates/common/configs/config_versions_control.hbs b/ambari-web/app/templates/common/configs/config_versions_control.hbs index e5dbcef..90b3083 100644 --- a/ambari-web/app/templates/common/configs/config_versions_control.hbs +++ b/ambari-web/app/templates/common/configs/config_versions_control.hbs @@ -34,7 +34,7 @@ {{else}} {{view App.ConfigVersionsDropdownView serviceVersionsBinding="view.serviceVersions"}} {{#unless view.displayedServiceVersion.isCurrent}} - + {{t dashboard.configHistory.info-bar.revert.button}} {{/unless}} diff --git a/ambari-web/app/views/common/configs/config_versions_control_view.js b/ambari-web/app/views/common/configs/config_versions_control_view.js index 5fb9732..6cf4523 100644 --- a/ambari-web/app/views/common/configs/config_versions_control_view.js +++ b/ambari-web/app/views/common/configs/config_versions_control_view.js @@ -155,9 +155,9 @@ App.ConfigVersionsControlView = Em.View.extend({ /** * revert config values to chosen version and apply reverted configs to server */ - makeCurrent: function (event) { + makeCurrent: function () { const self = this; -const serviceConfigVersion = event.contexts[0]; +const serviceConfigVersion = this.get('displayedServiceVersion'); const versionText = serviceConfigVersion.get('versionText'); return App.ModalPopup.show({ header: Em.I18n.t('dashboard.configHistory.info-bar.makeCurrent.popup.title'),
[ambari] branch branch-2.7 updated (57df9fe -> 9177549)
This is an automated email from the ASF dual-hosted git repository. akovalenko pushed a change to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git. from 57df9fe AMBARI-24638. Ambari-agent process consuming more memory. (aonishuk) new 74d801e AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko) new 9177549 AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko) The 2 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: .../app/templates/common/configs/config_versions_control.hbs | 2 +- .../app/views/common/configs/config_versions_control_view.js | 4 ++-- .../common/configs/config_versions_control_view_test.js | 12 ++-- 3 files changed, 9 insertions(+), 9 deletions(-)
[ambari] 02/02: AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko)
This is an automated email from the ASF dual-hosted git repository. akovalenko pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git commit 9177549950acb645a73b3e0d9bccfc1e81232a69 Author: Aleksandr Kovalenko AuthorDate: Fri Sep 14 18:36:40 2018 +0300 AMBARI-24635. Web Client Chooses Wrong Version When Reverting Configs (akovalenko) --- .../common/configs/config_versions_control_view_test.js | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ambari-web/test/views/common/configs/config_versions_control_view_test.js b/ambari-web/test/views/common/configs/config_versions_control_view_test.js index c3d2372..eff49ae 100644 --- a/ambari-web/test/views/common/configs/config_versions_control_view_test.js +++ b/ambari-web/test/views/common/configs/config_versions_control_view_test.js @@ -101,12 +101,12 @@ describe('App.ConfigVersionsControlView', function () { view.sendRevertCall.restore(); }); it('context passed', function () { - view.makeCurrent({contexts: [ -Em.Object.create({ - version: 1, - serviceName: 'S1' -}) - ]}); + view.set('displayedServiceVersion', Em.Object.create({ +version: 1, +serviceName: 'S1' + })); + + view.makeCurrent(); expect(App.ModalPopup.show.calledOnce).to.be.true; expect(view.sendRevertCall.calledWith(Em.Object.create({
[ambari] branch trunk updated: AMBARI-24644. Log Search: support trusted knox proxy. (#2327)
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 9d307c8 AMBARI-24644. Log Search: support trusted knox proxy. (#2327) 9d307c8 is described below commit 9d307c8758088cde7e7fb9a960525c9e6bc7f799 Author: Olivér Szabó AuthorDate: Mon Sep 17 14:51:40 2018 +0200 AMBARI-24644. Log Search: support trusted knox proxy. (#2327) * AMBARI-24644. Log Search: support trusted knox proxy. * AMBARI-24644. Add javadoc for trusted proxy filter. * AMBARI-24644. Stop if non null header found. --- .../ambari/logsearch/conf/AuthPropsConfig.java | 90 +- .../ambari/logsearch/conf/SecurityConfig.java | 11 +- .../web/filters/LogsearchTrustedProxyFilter.java | 191 + ambari-logsearch/docker/Dockerfile | 2 +- .../test-config/logsearch/logsearch-sso.properties | 3 + 5 files changed, 294 insertions(+), 3 deletions(-) diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/AuthPropsConfig.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/AuthPropsConfig.java index 2facf86..300a57f 100644 --- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/AuthPropsConfig.java +++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/AuthPropsConfig.java @@ -21,7 +21,6 @@ package org.apache.ambari.logsearch.conf; import org.apache.ambari.logsearch.config.api.LogSearchPropertyDescription; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; - import java.util.List; import static org.apache.ambari.logsearch.common.LogSearchConstants.LOGSEARCH_PROPERTIES_FILE; @@ -187,6 +186,55 @@ public class AuthPropsConfig { ) private boolean redirectForward; + @Value("${logsearch.auth.trusted.proxy:false}") + @LogSearchPropertyDescription( +name = "logsearch.auth.trusted.proxy", +description = "A boolean property to enable/disable trusted-proxy 'knox' authentication", +examples = {"true"}, +defaultValue = "false", +sources = {LOGSEARCH_PROPERTIES_FILE} + ) + private boolean trustedProxy; + + @Value("#{propertiesSplitter.parseList('${logsearch.auth.proxyuser.users:knox}')}") + @LogSearchPropertyDescription( +name = "logsearch.auth.proxyuser.users", +description = "List of users which the trusted-proxy user ‘knox’ can proxy for", +examples = {"knox,hdfs"}, +defaultValue = "knox", +sources = {LOGSEARCH_PROPERTIES_FILE} + ) + private List proxyUsers; + + @Value("#{propertiesSplitter.parseList('${logsearch.auth.proxyuser.groups:*}')}") + @LogSearchPropertyDescription( +name = "logsearch.auth.proxyuser.groups", +description = "List of user-groups which trusted-proxy user ‘knox’ can proxy for", +examples = {"admin,user"}, +defaultValue = "*", +sources = {LOGSEARCH_PROPERTIES_FILE} + ) + private List proxyUserGroups; + + @Value("#{propertiesSplitter.parseList('${logsearch.auth.proxyuser.hosts:*}')}") + @LogSearchPropertyDescription( +name = "logsearch.auth.proxyuser.hosts", +description = "List of hosts from which trusted-proxy user ‘knox’ can connect from", +examples = {"host1,host2"}, +defaultValue = "*", +sources = {LOGSEARCH_PROPERTIES_FILE} + ) + private List proxyUserHosts; + + @Value("#{propertiesSplitter.parseList('${logsearch.auth.proxyserver.ip:}')}") + @LogSearchPropertyDescription( +name = "logsearch.auth.proxyserver.ip", +description = "IP of trusted Knox Proxy server(s) that Log Search will trust on", +examples = {"192.168.0.1,192.168.0.2"}, +sources = {LOGSEARCH_PROPERTIES_FILE} + ) + private List proxyIp; + public boolean isAuthFileEnabled() { return authFileEnabled; } @@ -314,4 +362,44 @@ public class AuthPropsConfig { public void setUserAgentList(List userAgentList) { this.userAgentList = userAgentList; } + + public boolean isTrustedProxy() { +return trustedProxy; + } + + public void setTrustedProxy(boolean trustedProxy) { +this.trustedProxy = trustedProxy; + } + + public List getProxyUsers() { +return proxyUsers; + } + + public void setProxyUsers(List proxyUsers) { +this.proxyUsers = proxyUsers; + } + + public List getProxyUserGroups() { +return proxyUserGroups; + } + + public void setProxyUserGroups(List proxyUserGroups) { +this.proxyUserGroups = proxyUserGroups; + } + + public List getProxyUserHosts() { +return proxyUserHosts; + } + + public void setProxyUserHosts(List proxyUserHosts) { +this.proxyUserHosts = proxyUserHosts; + } + + public List getProxyIp() { +return proxyIp; + } + + public void
[ambari] branch trunk updated: AMBARI-24638. Ambari-agent process consuming more memory. (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 4db8904 AMBARI-24638. Ambari-agent process consuming more memory. (aonishuk) 4db8904 is described below commit 4db8904e67cd814bd775243717e049d95e2f92e1 Author: Andrew Onishuk AuthorDate: Fri Sep 14 11:07:30 2018 +0300 AMBARI-24638. Ambari-agent process consuming more memory. (aonishuk) --- ambari-common/src/main/python/ambari_ws4py/websocket.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ambari-common/src/main/python/ambari_ws4py/websocket.py b/ambari-common/src/main/python/ambari_ws4py/websocket.py index 78d233e..53f1a43 100644 --- a/ambari-common/src/main/python/ambari_ws4py/websocket.py +++ b/ambari-common/src/main/python/ambari_ws4py/websocket.py @@ -480,7 +480,8 @@ class WebSocket(object): if not bytes and self.reading_buffer_size > 0: return False -self.reading_buffer_size = s.parser.send(bytes) or DEFAULT_READING_SIZE +with self.lock: + self.reading_buffer_size = s.parser.send(bytes) or DEFAULT_READING_SIZE if s.closing is not None: logger.info("Closing message received (%d) '%s'" % (s.closing.code, s.closing.reason))
[ambari] branch branch-2.7 updated: AMBARI-24638. Ambari-agent process consuming more memory. (aonishuk)
This is an automated email from the ASF dual-hosted git repository. aonishuk 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 57df9fe AMBARI-24638. Ambari-agent process consuming more memory. (aonishuk) 57df9fe is described below commit 57df9febbbf6bec44efd67b198d9d0e0f8a69d8a Author: Andrew Onishuk AuthorDate: Fri Sep 14 11:08:52 2018 +0300 AMBARI-24638. Ambari-agent process consuming more memory. (aonishuk) --- ambari-common/src/main/python/ambari_ws4py/websocket.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ambari-common/src/main/python/ambari_ws4py/websocket.py b/ambari-common/src/main/python/ambari_ws4py/websocket.py index 78d233e..53f1a43 100644 --- a/ambari-common/src/main/python/ambari_ws4py/websocket.py +++ b/ambari-common/src/main/python/ambari_ws4py/websocket.py @@ -480,7 +480,8 @@ class WebSocket(object): if not bytes and self.reading_buffer_size > 0: return False -self.reading_buffer_size = s.parser.send(bytes) or DEFAULT_READING_SIZE +with self.lock: + self.reading_buffer_size = s.parser.send(bytes) or DEFAULT_READING_SIZE if s.closing is not None: logger.info("Closing message received (%d) '%s'" % (s.closing.code, s.closing.reason))
[ambari] branch branch-2.7 updated: AMBARI-24647. [PERF] Host checks taking longer time than previous releases (aonishuk)
This is an automated email from the ASF dual-hosted git repository. aonishuk 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 eb515fa AMBARI-24647. [PERF] Host checks taking longer time than previous releases (aonishuk) eb515fa is described below commit eb515fa4f85a56c7f0d1f2a16a9fcd0cd5e2ed7f Author: Andrew Onishuk AuthorDate: Mon Sep 17 11:11:03 2018 +0300 AMBARI-24647. [PERF] Host checks taking longer time than previous releases (aonishuk) --- .../src/main/resources/stacks/PERF/check_host.sed| 20 contrib/utils/perf/deploy-gce-perf-cluster.py| 7 --- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/ambari-server/src/main/resources/stacks/PERF/check_host.sed b/ambari-server/src/main/resources/stacks/PERF/check_host.sed new file mode 100644 index 000..2e41c70 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/PERF/check_host.sed @@ -0,0 +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. +/Logger.info("Check execute list: " + str(check_execute_list))/{i\ +if CHECK_INSTALLED_PACKAGES in check_execute_list: check_execute_list.remove(CHECK_INSTALLED_PACKAGES)\ +if CHECK_INSTALLED_PACKAGES in check_execute_list: check_execute_list.remove(CHECK_EXISTING_REPOS)\ +Logger.info("Check execute list: " + str(check_execute_list)) +d +} \ No newline at end of file diff --git a/contrib/utils/perf/deploy-gce-perf-cluster.py b/contrib/utils/perf/deploy-gce-perf-cluster.py index beab106..a1259eb 100644 --- a/contrib/utils/perf/deploy-gce-perf-cluster.py +++ b/contrib/utils/perf/deploy-gce-perf-cluster.py @@ -28,7 +28,7 @@ import re import socket cluster_prefix = "perf" -ambari_repo_file_url = "http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos7/2.x/updates/2.6.2.0/ambaribn.repo; +ambari_repo_file_url = "http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos7/2.x/updates/2.7.1.0/ambaribn.repo; public_hostname_script = "foo" hostname_script = "foo" @@ -280,7 +280,7 @@ def create_vms(args, number_of_nodes): :param number_of_nodes: Number of VMs to request. """ print "Creating server VM {0}-server-{1} with xxlarge nodes on centos7...".format(cluster_prefix, args.cluster_suffix) - execute_command(args, args.controller, "/opt/gce-utils/gce up {0}-server-{1} 1 --centos7 --xlarge --ex --disk-xxlarge --ssd".format(cluster_prefix, args.cluster_suffix), + execute_command(args, args.controller, "/opt/gce-utils/gce up {0}-server-{1} 1 --centos7 --xxlarge --ex --disk-xxlarge --ssd".format(cluster_prefix, args.cluster_suffix), "Failed to create server, probably not enough resources!", "-tt") time.sleep(10) @@ -405,7 +405,8 @@ def create_agent_script(server_host_name): "yum clean all; yum install krb5-workstation git ambari-agent -y\n" + \ "mkdir /home ; cd /home; git clone https://github.com/apache/ambari.git ; cd ambari ; git checkout branch-2.5\n" + \ "cp -r /home/ambari/ambari-server/src/main/resources/stacks/PERF /var/lib/ambari-agent/cache/stacks/PERF\n" + \ - "sed -i -f /var/lib/ambari-agent/cache/stacks/PERF/PythonExecutor.sed /usr/lib/python2.6/site-packages/ambari_agent/PythonExecutor.py\n" + \ + "sed -i -f /var/lib/ambari-agent/cache/stacks/PERF/PythonExecutor.sed /usr/lib/ambari-agent/lib/ambari_agent/PythonExecutor.py\n" + \ + "sed -i -f /var/lib/ambari-agent/cache/stacks/PERF/check_host.sed /var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py\n" + \ "sed -i -e 's/hostname=localhost/hostname={0}/g' /etc/ambari-agent/conf/ambari-agent.ini\n".format(server_host_name) + \ "sed -i -e 's/agent]/agent]\\nhostname_script={0}\\npublic_hostname_script={1}\\n/1' /etc/ambari-agent/conf/ambari-agent.ini\n".format(hostname_script, public_hostname_script) + \ "python /home/ambari/ambari-agent/conf/unix/agent-multiplier.py start\n" + \
[ambari] branch trunk updated: AMBARI-24647. [PERF] Host checks taking longer time than previous releases (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 10706cb AMBARI-24647. [PERF] Host checks taking longer time than previous releases (aonishuk) 10706cb is described below commit 10706cb851cba628f3fd415620e82dce955a66b9 Author: Andrew Onishuk AuthorDate: Mon Sep 17 11:10:54 2018 +0300 AMBARI-24647. [PERF] Host checks taking longer time than previous releases (aonishuk) --- .../src/main/resources/stacks/PERF/check_host.sed| 20 contrib/utils/perf/deploy-gce-perf-cluster.py| 7 --- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/ambari-server/src/main/resources/stacks/PERF/check_host.sed b/ambari-server/src/main/resources/stacks/PERF/check_host.sed new file mode 100644 index 000..2e41c70 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/PERF/check_host.sed @@ -0,0 +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. +/Logger.info("Check execute list: " + str(check_execute_list))/{i\ +if CHECK_INSTALLED_PACKAGES in check_execute_list: check_execute_list.remove(CHECK_INSTALLED_PACKAGES)\ +if CHECK_INSTALLED_PACKAGES in check_execute_list: check_execute_list.remove(CHECK_EXISTING_REPOS)\ +Logger.info("Check execute list: " + str(check_execute_list)) +d +} \ No newline at end of file diff --git a/contrib/utils/perf/deploy-gce-perf-cluster.py b/contrib/utils/perf/deploy-gce-perf-cluster.py index beab106..a1259eb 100644 --- a/contrib/utils/perf/deploy-gce-perf-cluster.py +++ b/contrib/utils/perf/deploy-gce-perf-cluster.py @@ -28,7 +28,7 @@ import re import socket cluster_prefix = "perf" -ambari_repo_file_url = "http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos7/2.x/updates/2.6.2.0/ambaribn.repo; +ambari_repo_file_url = "http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos7/2.x/updates/2.7.1.0/ambaribn.repo; public_hostname_script = "foo" hostname_script = "foo" @@ -280,7 +280,7 @@ def create_vms(args, number_of_nodes): :param number_of_nodes: Number of VMs to request. """ print "Creating server VM {0}-server-{1} with xxlarge nodes on centos7...".format(cluster_prefix, args.cluster_suffix) - execute_command(args, args.controller, "/opt/gce-utils/gce up {0}-server-{1} 1 --centos7 --xlarge --ex --disk-xxlarge --ssd".format(cluster_prefix, args.cluster_suffix), + execute_command(args, args.controller, "/opt/gce-utils/gce up {0}-server-{1} 1 --centos7 --xxlarge --ex --disk-xxlarge --ssd".format(cluster_prefix, args.cluster_suffix), "Failed to create server, probably not enough resources!", "-tt") time.sleep(10) @@ -405,7 +405,8 @@ def create_agent_script(server_host_name): "yum clean all; yum install krb5-workstation git ambari-agent -y\n" + \ "mkdir /home ; cd /home; git clone https://github.com/apache/ambari.git ; cd ambari ; git checkout branch-2.5\n" + \ "cp -r /home/ambari/ambari-server/src/main/resources/stacks/PERF /var/lib/ambari-agent/cache/stacks/PERF\n" + \ - "sed -i -f /var/lib/ambari-agent/cache/stacks/PERF/PythonExecutor.sed /usr/lib/python2.6/site-packages/ambari_agent/PythonExecutor.py\n" + \ + "sed -i -f /var/lib/ambari-agent/cache/stacks/PERF/PythonExecutor.sed /usr/lib/ambari-agent/lib/ambari_agent/PythonExecutor.py\n" + \ + "sed -i -f /var/lib/ambari-agent/cache/stacks/PERF/check_host.sed /var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py\n" + \ "sed -i -e 's/hostname=localhost/hostname={0}/g' /etc/ambari-agent/conf/ambari-agent.ini\n".format(server_host_name) + \ "sed -i -e 's/agent]/agent]\\nhostname_script={0}\\npublic_hostname_script={1}\\n/1' /etc/ambari-agent/conf/ambari-agent.ini\n".format(hostname_script, public_hostname_script) + \ "python /home/ambari/ambari-agent/conf/unix/agent-multiplier.py start\n" + \
[ambari] branch branch-2.7 updated: AMBARI-24641. Stackadvisor error while trying to add atlas service. E… (#2323) (#2333)
This is an automated email from the ASF dual-hosted git repository. amagyar 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 b18e295 AMBARI-24641. Stackadvisor error while trying to add atlas service. E… (#2323) (#2333) b18e295 is described below commit b18e2954b4f58e8725c2bef93862da9a4f80b84d Author: Attila Magyar AuthorDate: Mon Sep 17 13:58:44 2018 +0200 AMBARI-24641. Stackadvisor error while trying to add atlas service. E… (#2323) (#2333) * AMBARI-24641. Stackadvisor error while trying to add atlas service. Error - "if mountPoints[mountPoint] < reqiuredDiskSpace: KeyError: None" (amagyar) * AMBARI-24641. Stackadvisor error while trying to add atlas service. Error - "if mountPoints[mountPoint] < reqiuredDiskSpace: KeyError: None" (amagyar) --- ambari-agent/src/main/python/ambari_agent/Hardware.py | 6 +++--- ambari-agent/src/test/python/ambari_agent/TestHardware.py | 4 ++-- ambari-server/src/main/resources/stacks/stack_advisor.py| 3 +++ .../src/main/resources/stacks/HDF/2.0/services/stack_advisor.py | 3 +++ .../src/main/resources/stacks/ODPi/2.0/services/stack_advisor.py| 3 +++ 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ambari-agent/src/main/python/ambari_agent/Hardware.py b/ambari-agent/src/main/python/ambari_agent/Hardware.py index 0742d70..b5adb6c 100644 --- a/ambari-agent/src/main/python/ambari_agent/Hardware.py +++ b/ambari-agent/src/main/python/ambari_agent/Hardware.py @@ -103,11 +103,11 @@ class Hardware: def _check_remote_mounts(self): """Verify if remote mount allowed to be processed or not""" if self.config and self.config.has_option(AmbariConfig.AMBARI_PROPERTIES_CATEGORY, Hardware.CHECK_REMOTE_MOUNTS_KEY) and \ - self.config.get(AmbariConfig.AMBARI_PROPERTIES_CATEGORY, Hardware.CHECK_REMOTE_MOUNTS_KEY).lower() == "false": + self.config.get(AmbariConfig.AMBARI_PROPERTIES_CATEGORY, Hardware.CHECK_REMOTE_MOUNTS_KEY).lower() == "true": - return False + return True -return True +return False def _is_mount_blacklisted(self, blacklist, mount_point): """ diff --git a/ambari-agent/src/test/python/ambari_agent/TestHardware.py b/ambari-agent/src/test/python/ambari_agent/TestHardware.py index 8de2c02..f015ea3 100644 --- a/ambari-agent/src/test/python/ambari_agent/TestHardware.py +++ b/ambari-agent/src/test/python/ambari_agent/TestHardware.py @@ -154,11 +154,11 @@ class TestHardware(TestCase): get_os_version_mock.return_value = "11" Hardware(cache_info=False).osdisks() timeout = 10 -shell_call_mock.assert_called_with(['timeout', str(timeout), "df", "-kPT"], stdout = subprocess32.PIPE, stderr = subprocess32.PIPE, timeout = timeout, quiet = True) +shell_call_mock.assert_called_with(['timeout', str(timeout), "df", "-kPT", "-l"], stdout = subprocess32.PIPE, stderr = subprocess32.PIPE, timeout = timeout, quiet = True) config = AmbariConfig() Hardware(config=config, cache_info=False).osdisks() -shell_call_mock.assert_called_with(['timeout', str(timeout), "df", "-kPT"], stdout = subprocess32.PIPE, stderr = subprocess32.PIPE, timeout = timeout, quiet = True) +shell_call_mock.assert_called_with(['timeout', str(timeout), "df", "-kPT", "-l"], stdout = subprocess32.PIPE, stderr = subprocess32.PIPE, timeout = timeout, quiet = True) config.add_section(AmbariConfig.AMBARI_PROPERTIES_CATEGORY) config.set(AmbariConfig.AMBARI_PROPERTIES_CATEGORY, Hardware.CHECK_REMOTE_MOUNTS_KEY, "true") diff --git a/ambari-server/src/main/resources/stacks/stack_advisor.py b/ambari-server/src/main/resources/stacks/stack_advisor.py index eaac73a..850c21c 100644 --- a/ambari-server/src/main/resources/stacks/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/stack_advisor.py @@ -2999,6 +2999,9 @@ class DefaultStackAdvisor(StackAdvisor): if not mountPoints: return self.getErrorItem("No disk info found on host %s" % hostInfo["host_name"]) +if mountPoint is None: + return self.getErrorItem("No mount point in directory %s. Mount points: %s" % (dir, ', '.join(mountPoints.keys( + if mountPoints[mountPoint] < reqiuredDiskSpace: msg = "Ambari Metrics disk space requirements not met. \n" \ "Recommended disk space for partition {0} is {1}G" diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/services/stack_advisor.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/services/stack_advisor.py index e21a149..70862cd 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/services/stack_advisor.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/services/stack_advisor.py @@ -1511,6 +1511,9 @@ class
[ambari] branch trunk updated: AMBARI-24641. Stackadvisor error while trying to add atlas service. E… (#2323)
This is an automated email from the ASF dual-hosted git repository. amagyar 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 cbb50ad AMBARI-24641. Stackadvisor error while trying to add atlas service. E… (#2323) cbb50ad is described below commit cbb50ad120ac05f89b19cfe1f1bc819860dfd1bb Author: Attila Magyar AuthorDate: Mon Sep 17 13:01:24 2018 +0200 AMBARI-24641. Stackadvisor error while trying to add atlas service. E… (#2323) * AMBARI-24641. Stackadvisor error while trying to add atlas service. Error - "if mountPoints[mountPoint] < reqiuredDiskSpace: KeyError: None" (amagyar) * AMBARI-24641. Stackadvisor error while trying to add atlas service. Error - "if mountPoints[mountPoint] < reqiuredDiskSpace: KeyError: None" (amagyar) --- ambari-agent/src/main/python/ambari_agent/Hardware.py | 6 +++--- ambari-agent/src/test/python/ambari_agent/TestHardware.py | 4 ++-- ambari-server/src/main/resources/stacks/stack_advisor.py| 3 +++ .../src/main/resources/stacks/HDF/2.0/services/stack_advisor.py | 3 +++ .../src/main/resources/stacks/ODPi/2.0/services/stack_advisor.py| 3 +++ 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ambari-agent/src/main/python/ambari_agent/Hardware.py b/ambari-agent/src/main/python/ambari_agent/Hardware.py index 0742d70..b5adb6c 100644 --- a/ambari-agent/src/main/python/ambari_agent/Hardware.py +++ b/ambari-agent/src/main/python/ambari_agent/Hardware.py @@ -103,11 +103,11 @@ class Hardware: def _check_remote_mounts(self): """Verify if remote mount allowed to be processed or not""" if self.config and self.config.has_option(AmbariConfig.AMBARI_PROPERTIES_CATEGORY, Hardware.CHECK_REMOTE_MOUNTS_KEY) and \ - self.config.get(AmbariConfig.AMBARI_PROPERTIES_CATEGORY, Hardware.CHECK_REMOTE_MOUNTS_KEY).lower() == "false": + self.config.get(AmbariConfig.AMBARI_PROPERTIES_CATEGORY, Hardware.CHECK_REMOTE_MOUNTS_KEY).lower() == "true": - return False + return True -return True +return False def _is_mount_blacklisted(self, blacklist, mount_point): """ diff --git a/ambari-agent/src/test/python/ambari_agent/TestHardware.py b/ambari-agent/src/test/python/ambari_agent/TestHardware.py index 8de2c02..f015ea3 100644 --- a/ambari-agent/src/test/python/ambari_agent/TestHardware.py +++ b/ambari-agent/src/test/python/ambari_agent/TestHardware.py @@ -154,11 +154,11 @@ class TestHardware(TestCase): get_os_version_mock.return_value = "11" Hardware(cache_info=False).osdisks() timeout = 10 -shell_call_mock.assert_called_with(['timeout', str(timeout), "df", "-kPT"], stdout = subprocess32.PIPE, stderr = subprocess32.PIPE, timeout = timeout, quiet = True) +shell_call_mock.assert_called_with(['timeout', str(timeout), "df", "-kPT", "-l"], stdout = subprocess32.PIPE, stderr = subprocess32.PIPE, timeout = timeout, quiet = True) config = AmbariConfig() Hardware(config=config, cache_info=False).osdisks() -shell_call_mock.assert_called_with(['timeout', str(timeout), "df", "-kPT"], stdout = subprocess32.PIPE, stderr = subprocess32.PIPE, timeout = timeout, quiet = True) +shell_call_mock.assert_called_with(['timeout', str(timeout), "df", "-kPT", "-l"], stdout = subprocess32.PIPE, stderr = subprocess32.PIPE, timeout = timeout, quiet = True) config.add_section(AmbariConfig.AMBARI_PROPERTIES_CATEGORY) config.set(AmbariConfig.AMBARI_PROPERTIES_CATEGORY, Hardware.CHECK_REMOTE_MOUNTS_KEY, "true") diff --git a/ambari-server/src/main/resources/stacks/stack_advisor.py b/ambari-server/src/main/resources/stacks/stack_advisor.py index eaac73a..850c21c 100644 --- a/ambari-server/src/main/resources/stacks/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/stack_advisor.py @@ -2999,6 +2999,9 @@ class DefaultStackAdvisor(StackAdvisor): if not mountPoints: return self.getErrorItem("No disk info found on host %s" % hostInfo["host_name"]) +if mountPoint is None: + return self.getErrorItem("No mount point in directory %s. Mount points: %s" % (dir, ', '.join(mountPoints.keys( + if mountPoints[mountPoint] < reqiuredDiskSpace: msg = "Ambari Metrics disk space requirements not met. \n" \ "Recommended disk space for partition {0} is {1}G" diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/services/stack_advisor.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/services/stack_advisor.py index e21a149..70862cd 100644 --- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/services/stack_advisor.py +++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/services/stack_advisor.py @@ -1511,6 +1511,9 @@ class