Repository: ambari Updated Branches: refs/heads/branch-1.7.0 b7a2691ef -> 14f19ed1e refs/heads/trunk d5d898a93 -> 8c0ab9fb4
AMBARI-8204. No zoo.cfg file on hosts and no 'Custom zoo.cfg' in Zookeeper config tab (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8c0ab9fb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8c0ab9fb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8c0ab9fb Branch: refs/heads/trunk Commit: 8c0ab9fb49846a8e8303b7bc1e94a8b35610a4bc Parents: d5d898a Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Nov 7 17:20:51 2014 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Nov 7 17:20:51 2014 +0200 ---------------------------------------------------------------------- .../services/NAGIOS/package/scripts/params.py | 2 +- .../ZOOKEEPER/configuration/zoo.cfg.xml | 49 ++++++++++++++++++++ .../ZOOKEEPER/configuration/zookeeper-env.xml | 26 ----------- .../HDP/1.3.2/services/ZOOKEEPER/metainfo.xml | 1 + .../ZOOKEEPER/package/scripts/params.py | 7 +-- .../ZOOKEEPER/package/templates/zoo.cfg.j2 | 35 ++++---------- .../services/NAGIOS/package/scripts/params.py | 2 +- .../ZOOKEEPER/configuration/zoo.cfg.xml | 49 ++++++++++++++++++++ .../ZOOKEEPER/configuration/zookeeper-env.xml | 26 +---------- .../ZOOKEEPER/package/scripts/params.py | 7 +-- .../ZOOKEEPER/package/templates/zoo.cfg.j2 | 26 ++--------- .../python/stacks/1.3.2/configs/default.json | 26 ++++++----- .../python/stacks/1.3.2/configs/secured.json | 30 ++++++------ .../python/stacks/2.0.6/configs/default.json | 22 +++++---- .../python/stacks/2.0.6/configs/secured.json | 18 +++---- .../cluster_level_actual_configs.json | 2 +- .../configurations/cluster_level_configs.json | 2 +- .../app/controllers/wizard/step8_controller.js | 20 +------- ambari-web/app/data/HDP2/site_properties.js | 12 ++--- ambari-web/app/data/site_properties.js | 12 ++--- ambari-web/app/models/service_config.js | 4 +- ambari-web/app/utils/config.js | 2 +- .../test/controllers/wizard/step8_test.js | 24 ---------- 23 files changed, 192 insertions(+), 212 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/params.py index 2384e3a..8eeb181 100644 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/params.py @@ -74,7 +74,7 @@ mapred_local_dir = config['configurations']['mapred-site']['mapred.local.dir'] # this is different for HDP2 nn_metrics_property = "FSNamesystemMetrics" -clientPort = config['configurations']['zookeeper-env']['clientPort'] #ZK +clientPort = config['configurations']['zoo.cfg']['clientPort'] #ZK java64_home = config['hostLevelParams']['java_home'] http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/configuration/zoo.cfg.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/configuration/zoo.cfg.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/configuration/zoo.cfg.xml new file mode 100644 index 0000000..3449e41 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/configuration/zoo.cfg.xml @@ -0,0 +1,49 @@ +<?xml version="1.0"?> +<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> +<!-- +/** + * 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. + */ +--> + +<configuration> + <property> + <name>tickTime</name> + <value>2000</value> + <description>The length of a single tick in milliseconds, which is the basic time unit used by ZooKeeper</description> + </property> + <property> + <name>initLimit</name> + <value>10</value> + <description>Ticks to allow for sync at Init.</description> + </property> + <property> + <name>syncLimit</name> + <value>5</value> + <description>Ticks to allow for sync at Runtime.</description> + </property> + <property> + <name>clientPort</name> + <value>2181</value> + <description>Port for running ZK Server.</description> + </property> + <property> + <name>dataDir</name> + <value>/hadoop/zookeeper</value> + <description>Data directory for ZooKeeper.</description> + </property> +</configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/configuration/zookeeper-env.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/configuration/zookeeper-env.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/configuration/zookeeper-env.xml index b0d55e6..d3c12c0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/configuration/zookeeper-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/configuration/zookeeper-env.xml @@ -28,11 +28,6 @@ <description>ZooKeeper User.</description> </property> <property> - <name>zk_data_dir</name> - <value>/hadoop/zookeeper</value> - <description>Data directory for ZooKeeper.</description> - </property> - <property> <name>zk_log_dir</name> <value>/var/log/zookeeper</value> <description>ZooKeeper Log Dir</description> @@ -42,27 +37,6 @@ <value>/var/run/zookeeper</value> <description>ZooKeeper Pid Dir</description> </property> - <property> - <name>tickTime</name> - <value>2000</value> - <description>The length of a single tick in milliseconds, which is the basic time unit used by ZooKeeper</description> - </property> - <property> - <name>initLimit</name> - <value>10</value> - <description>Ticks to allow for sync at Init.</description> - </property> - <property> - <name>syncLimit</name> - <value>5</value> - <description>Ticks to allow for sync at Runtime.</description> - </property> - <property> - <name>clientPort</name> - <value>2181</value> - <description>Port for running ZK Server.</description> - </property> - <!-- zookeeper-env.sh --> <property> <name>content</name> http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/metainfo.xml index 21234db..3ed6270 100644 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/metainfo.xml @@ -81,6 +81,7 @@ <configuration-dependencies> <config-type>zookeeper-env</config-type> <config-type>zookeeper-log4j</config-type> + <config-type>zoo.cfg</config-type> </configuration-dependencies> <restartRequiredAfterChange>true</restartRequiredAfterChange> </service> http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/params.py index 2dc3792..a376014 100644 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/scripts/params.py @@ -36,15 +36,12 @@ zk_env_sh_template = config['configurations']['zookeeper-env']['content'] smoke_script = "/usr/lib/zookeeper/bin/zkCli.sh" zk_log_dir = config['configurations']['zookeeper-env']['zk_log_dir'] -zk_data_dir = config['configurations']['zookeeper-env']['zk_data_dir'] +zk_data_dir = config['configurations']['zoo.cfg']['dataDir'] zk_pid_dir = status_params.zk_pid_dir zk_pid_file = status_params.zk_pid_file zk_server_heapsize = "-Xmx1024m" -tickTime = config['configurations']['zookeeper-env']['tickTime'] -initLimit = config['configurations']['zookeeper-env']['initLimit'] -syncLimit = config['configurations']['zookeeper-env']['syncLimit'] -clientPort = config['configurations']['zookeeper-env']['clientPort'] +clientPort = config['configurations']['zoo.cfg']['clientPort'] if 'zoo.cfg' in config['configurations']: zoo_cfg_properties_map = config['configurations']['zoo.cfg'] http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/templates/zoo.cfg.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/templates/zoo.cfg.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/templates/zoo.cfg.j2 index f4bb32f..5ab1fa9 100644 --- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/templates/zoo.cfg.j2 +++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/ZOOKEEPER/package/templates/zoo.cfg.j2 @@ -16,7 +16,6 @@ # limitations under the License. #} - # # # Licensed to the Apache Software Foundation (ASF) under one @@ -39,32 +38,16 @@ # # -# The number of milliseconds of each tick -tickTime={{tickTime}} -# The number of ticks that the initial -# synchronization phase can take -initLimit={{initLimit}} -# The number of ticks that can pass between -# sending a request and getting an acknowledgement -syncLimit={{syncLimit}} -# the directory where the snapshot is stored. -dataDir={{zk_data_dir}} -# the port at which the clients will connect -clientPort={{clientPort}} +{% for key, value in zoo_cfg_properties_map.iteritems() %} + {{key}}={{value}} +{% endfor %} {% for host in zookeeper_hosts %} -server.{{loop.index}}={{host}}:2888:3888 + server.{{loop.index}}={{host}}:2888:3888 {% endfor %} {% if security_enabled %} -authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider -jaasLoginRenew=3600000 -kerberos.removeHostFromPrincipal=true -kerberos.removeRealmFromPrincipal=true -{% endif %} - -{% if zoo_cfg_properties_map_length > 0 %} -# Custom properties -{% endif %} -{% for key, value in zoo_cfg_properties_map.iteritems() %} -{{key}}={{value}} -{% endfor %} + authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider + jaasLoginRenew=3600000 + kerberos.removeHostFromPrincipal=true + kerberos.removeRealmFromPrincipal=true +{% endif %} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py index ba91cfb..778d830 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py @@ -219,7 +219,7 @@ if has_namenode: # this is different for HDP1 nn_metrics_property = "FSNamesystem" -clientPort = config['configurations']['zookeeper-env']['clientPort'] #ZK +clientPort = config['configurations']['zoo.cfg']['clientPort'] #ZK java64_home = config['hostLevelParams']['java_home'] http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zoo.cfg.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zoo.cfg.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zoo.cfg.xml new file mode 100644 index 0000000..3449e41 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zoo.cfg.xml @@ -0,0 +1,49 @@ +<?xml version="1.0"?> +<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> +<!-- +/** + * 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. + */ +--> + +<configuration> + <property> + <name>tickTime</name> + <value>2000</value> + <description>The length of a single tick in milliseconds, which is the basic time unit used by ZooKeeper</description> + </property> + <property> + <name>initLimit</name> + <value>10</value> + <description>Ticks to allow for sync at Init.</description> + </property> + <property> + <name>syncLimit</name> + <value>5</value> + <description>Ticks to allow for sync at Runtime.</description> + </property> + <property> + <name>clientPort</name> + <value>2181</value> + <description>Port for running ZK Server.</description> + </property> + <property> + <name>dataDir</name> + <value>/hadoop/zookeeper</value> + <description>Data directory for ZooKeeper.</description> + </property> +</configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml index 4c305b0..608f504 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml @@ -28,11 +28,6 @@ <description>ZooKeeper User.</description> </property> <property> - <name>zk_data_dir</name> - <value>/hadoop/zookeeper</value> - <description>Data directory for ZooKeeper.</description> - </property> - <property> <name>zk_log_dir</name> <value>/var/log/zookeeper</value> <description>ZooKeeper Log Dir</description> @@ -42,26 +37,7 @@ <value>/var/run/zookeeper</value> <description>ZooKeeper Pid Dir</description> </property> - <property> - <name>tickTime</name> - <value>2000</value> - <description>The length of a single tick in milliseconds, which is the basic time unit used by ZooKeeper</description> - </property> - <property> - <name>initLimit</name> - <value>10</value> - <description>Ticks to allow for sync at Init.</description> - </property> - <property> - <name>syncLimit</name> - <value>5</value> - <description>Ticks to allow for sync at Runtime.</description> - </property> - <property> - <name>clientPort</name> - <value>2181</value> - <description>Port for running ZK Server.</description> - </property> + <!-- zookeeper-env.sh --> <property> http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py index a14207f..4348d5f 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py @@ -48,15 +48,12 @@ user_group = config['configurations']['cluster-env']['user_group'] zk_env_sh_template = config['configurations']['zookeeper-env']['content'] zk_log_dir = config['configurations']['zookeeper-env']['zk_log_dir'] -zk_data_dir = config['configurations']['zookeeper-env']['zk_data_dir'] +zk_data_dir = config['configurations']['zoo.cfg']['dataDir'] zk_pid_dir = status_params.zk_pid_dir zk_pid_file = status_params.zk_pid_file zk_server_heapsize = "-Xmx1024m" -tickTime = config['configurations']['zookeeper-env']['tickTime'] -initLimit = config['configurations']['zookeeper-env']['initLimit'] -syncLimit = config['configurations']['zookeeper-env']['syncLimit'] -clientPort = config['configurations']['zookeeper-env']['clientPort'] +clientPort = config['configurations']['zoo.cfg']['clientPort'] if 'zoo.cfg' in config['configurations']: zoo_cfg_properties_map = config['configurations']['zoo.cfg'] http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/templates/zoo.cfg.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/templates/zoo.cfg.j2 b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/templates/zoo.cfg.j2 index beb4730..1fbc0cc 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/templates/zoo.cfg.j2 +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/templates/zoo.cfg.j2 @@ -38,32 +38,16 @@ # # -# The number of milliseconds of each tick -tickTime={{tickTime}} -# The number of ticks that the initial -# synchronization phase can take -initLimit={{initLimit}} -# The number of ticks that can pass between -# sending a request and getting an acknowledgement -syncLimit={{syncLimit}} -# the directory where the snapshot is stored. -dataDir={{zk_data_dir}} -# the port at which the clients will connect -clientPort={{clientPort}} -{% for host in zookeeper_hosts %} +{% for key, value in zoo_cfg_properties_map.iteritems() -%} + {{key}}={{value}} +{% endfor %} +{% for host in zookeeper_hosts -%} server.{{loop.index}}={{host}}:2888:3888 {% endfor %} -{% if security_enabled %} +{% if security_enabled -%} authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider jaasLoginRenew=3600000 kerberos.removeHostFromPrincipal=true kerberos.removeRealmFromPrincipal=true {% endif %} - -{% if zoo_cfg_properties_map_length > 0 %} -# Custom properties -{% endif %} -{% for key, value in zoo_cfg_properties_map.iteritems() %} -{{key}}={{value}} -{% endfor %} http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-server/src/test/python/stacks/1.3.2/configs/default.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/1.3.2/configs/default.json b/ambari-server/src/test/python/stacks/1.3.2/configs/default.json index a39d51d..d9f9f71 100644 --- a/ambari-server/src/test/python/stacks/1.3.2/configs/default.json +++ b/ambari-server/src/test/python/stacks/1.3.2/configs/default.json @@ -404,18 +404,22 @@ "rrdcached_write_threads": "4", "rrdcached_delay": "1800", "rrdcached_timeout": "3600" - }, + }, "zookeeper-env": { - "clientPort": "2181", - "zk_user": "zookeeper", - "zk_log_dir": "/var/log/zookeeper", - "syncLimit": "5", - "content": "\nexport JAVA_HOME={{java64_home}}\nexport ZOO_LOG_DIR={{zk_log_dir}}\nexport ZOOPIDFILE={{zk_pid_file}}\nexport SERVER_JVMFLAGS={{zk_server_heapsize}}\nexport JAVA=$JAVA_HOME/bin/java\nexport CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*\n\n{% if security_enabled %}\nexport SERVER_JVMFLAGS=\"$SERVER_JVMFLAGS -Djava.security.auth.login.config={{zk_server_jaas_file}}\"\nexport CLIENT_JVMFLAGS=\"$CLIENT_JVMFLAGS -Djava.security.auth.login.config={{zk_client_jaas_file}}\"\n{% endif %}\n ", - "initLimit": "10", - "zk_pid_dir": "/var/run/zookeeper", - "zk_data_dir": "/hadoop/zookeeper", - "tickTime": "2000" - }, + "zk_user": "zookeeper", + "zk_log_dir": "/var/log/zookeeper", + "content": "\nexport JAVA_HOME={{java64_home}}\nexport ZOO_LOG_DIR={{zk_log_dir}}\nexport ZOOPIDFILE={{zk_pid_file}}\nexport SERVER_JVMFLAGS={{zk_server_heapsize}}\nexport JAVA=$JAVA_HOME/bin/java\nexport CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*\n\n{% if security_enabled %}\nexport SERVER_JVMFLAGS=\"$SERVER_JVMFLAGS -Djava.security.auth.login.config={{zk_server_jaas_file}}\"\nexport CLIENT_JVMFLAGS=\"$CLIENT_JVMFLAGS -Djava.security.auth.login.config={{zk_client_jaas_file}}\"\n{% endif %}", + "zk_pid_dir": "/var/run/zookeeper", + "zookeeper_principal_name": "zookeeper/_h...@example.com", + "zookeeper_keytab_path": "/etc/security/keytabs/zk.service.keytab" + }, + "zoo.cfg": { + "clientPort": "2181", + "syncLimit": "5", + "initLimit": "10", + "dataDir": "/hadoop/zookeeper", + "tickTime": "2000" + }, "hdfs-log4j": { "content": "log4jproperties\nline2" }, http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-server/src/test/python/stacks/1.3.2/configs/secured.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/1.3.2/configs/secured.json b/ambari-server/src/test/python/stacks/1.3.2/configs/secured.json index 3e84df6..3c08702 100644 --- a/ambari-server/src/test/python/stacks/1.3.2/configs/secured.json +++ b/ambari-server/src/test/python/stacks/1.3.2/configs/secured.json @@ -585,20 +585,22 @@ "rrdcached_write_threads": "4", "rrdcached_delay": "1800", "rrdcached_timeout": "3600" - }, - "zookeeper-env": { - "clientPort": "2181", - "zk_user": "zookeeper", - "zk_log_dir": "/var/log/zookeeper", - "syncLimit": "5", - "content": "\nexport JAVA_HOME={{java64_home}}\nexport ZOO_LOG_DIR={{zk_log_dir}}\nexport ZOOPIDFILE={{zk_pid_file}}\nexport SERVER_JVMFLAGS={{zk_server_heapsize}}\nexport JAVA=$JAVA_HOME/bin/java\nexport CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*\n\n{% if security_enabled %}\nexport SERVER_JVMFLAGS=\"$SERVER_JVMFLAGS -Djava.security.auth.login.config={{zk_server_jaas_file}}\"\nexport CLIENT_JVMFLAGS=\"$CLIENT_JVMFLAGS -Djava.security.auth.login.config={{zk_client_jaas_file}}\"\n{% endif %}\n ", - "initLimit": "10", - "zk_pid_dir": "/var/run/zookeeper", - "zk_data_dir": "/hadoop/zookeeper", - "tickTime": "2000", - "zookeeper_principal_name": "zookeeper/_h...@example.com", - "zookeeper_keytab_path": "/etc/security/keytabs/zk.service.keytab" - }, + }, + "zookeeper-env": { + "zk_user": "zookeeper", + "zk_log_dir": "/var/log/zookeeper", + "content": "\nexport JAVA_HOME={{java64_home}}\nexport ZOO_LOG_DIR={{zk_log_dir}}\nexport ZOOPIDFILE={{zk_pid_file}}\nexport SERVER_JVMFLAGS={{zk_server_heapsize}}\nexport JAVA=$JAVA_HOME/bin/java\nexport CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*\n\n{% if security_enabled %}\nexport SERVER_JVMFLAGS=\"$SERVER_JVMFLAGS -Djava.security.auth.login.config={{zk_server_jaas_file}}\"\nexport CLIENT_JVMFLAGS=\"$CLIENT_JVMFLAGS -Djava.security.auth.login.config={{zk_client_jaas_file}}\"\n{% endif %}", + "zk_pid_dir": "/var/run/zookeeper", + "zookeeper_principal_name": "zookeeper/_h...@example.com", + "zookeeper_keytab_path": "/etc/security/keytabs/zk.service.keytab" + }, + "zoo.cfg": { + "clientPort": "2181", + "syncLimit": "5", + "initLimit": "10", + "dataDir": "/hadoop/zookeeper", + "tickTime": "2000" + }, "hdfs-log4j": { "content": "log4jproperties\nline2" }, http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-server/src/test/python/stacks/2.0.6/configs/default.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json index 6b68e0b..83e36ae 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json @@ -488,15 +488,19 @@ "rrdcached_timeout": "3600" }, "zookeeper-env": { - "clientPort": "2181", - "zk_user": "zookeeper", - "zk_log_dir": "/var/log/zookeeper", - "syncLimit": "5", - "content": "\nexport JAVA_HOME={{java64_home}}\nexport ZOO_LOG_DIR={{zk_log_dir}}\nexport ZOOPIDFILE={{zk_pid_file}}\nexport SERVER_JVMFLAGS={{zk_server_heapsize}}\nexport JAVA=$JAVA_HOME/bin/java\nexport CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*\n\n{% if security_enabled %}\nexport SERVER_JVMFLAGS=\"$SERVER_JVMFLAGS -Djava.security.auth.login.config={{zk_server_jaas_file}}\"\nexport CLIENT_JVMFLAGS=\"$CLIENT_JVMFLAGS -Djava.security.auth.login.config={{zk_client_jaas_file}}\"\n{% endif %}", - "initLimit": "10", - "zk_pid_dir": "/var/run/zookeeper", - "zk_data_dir": "/hadoop/zookeeper", - "tickTime": "2000" + "zk_user": "zookeeper", + "zk_log_dir": "/var/log/zookeeper", + "content": "\nexport JAVA_HOME={{java64_home}}\nexport ZOO_LOG_DIR={{zk_log_dir}}\nexport ZOOPIDFILE={{zk_pid_file}}\nexport SERVER_JVMFLAGS={{zk_server_heapsize}}\nexport JAVA=$JAVA_HOME/bin/java\nexport CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*\n\n{% if security_enabled %}\nexport SERVER_JVMFLAGS=\"$SERVER_JVMFLAGS -Djava.security.auth.login.config={{zk_server_jaas_file}}\"\nexport CLIENT_JVMFLAGS=\"$CLIENT_JVMFLAGS -Djava.security.auth.login.config={{zk_client_jaas_file}}\"\n{% endif %}", + "zk_pid_dir": "/var/run/zookeeper", + "zookeeper_principal_name": "zookeeper/_h...@example.com", + "zookeeper_keytab_path": "/etc/security/keytabs/zk.service.keytab" + }, + "zoo.cfg": { + "clientPort": "2181", + "syncLimit": "5", + "initLimit": "10", + "dataDir": "/hadoop/zookeeper", + "tickTime": "2000" }, "mapred-env": { "content": "\n# export JAVA_HOME=/home/y/libexec/jdk1.6.0/\n\nexport HADOOP_JOB_HISTORYSERVER_HEAPSIZE={{jobhistory_heapsize}}\n\nexport HADOOP_MAPRED_ROOT_LOGGER=INFO,RFA\n\n#export HADOOP_JOB_HISTORYSERVER_OPTS=\n#export HADOOP_MAPRED_LOG_DIR=\"\" # Where log files are stored. $HADOOP_MAPRED_HOME/logs by default.\n#export HADOOP_JHS_LOGGER=INFO,RFA # Hadoop JobSummary logger.\n#export HADOOP_MAPRED_PID_DIR= # The pid files are stored. /tmp by default.\n#export HADOOP_MAPRED_IDENT_STRING= #A string representing this instance of hadoop. $USER by default\n#export HADOOP_MAPRED_NICENESS= #The scheduling priority for daemons. Defaults to 0.", http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json index 83b9b9e..dba36e5 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json @@ -540,18 +540,20 @@ "rrdcached_timeout": "3600" }, "zookeeper-env": { - "clientPort": "2181", "zk_user": "zookeeper", - "zk_log_dir": "/var/log/zookeeper", - "syncLimit": "5", - "content": "\nexport JAVA_HOME={{java64_home}}\nexport ZOO_LOG_DIR={{zk_log_dir}}\nexport ZOOPIDFILE={{zk_pid_file}}\nexport SERVER_JVMFLAGS={{zk_server_heapsize}}\nexport JAVA=$JAVA_HOME/bin/java\nexport CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*\n\n{% if security_enabled %}\nexport SERVER_JVMFLAGS=\"$SERVER_JVMFLAGS -Djava.security.auth.login.config={{zk_server_jaas_file}}\"\nexport CLIENT_JVMFLAGS=\"$CLIENT_JVMFLAGS -Djava.security.auth.login.config={{zk_client_jaas_file}}\"\n{% endif %}", - "initLimit": "10", - "zk_pid_dir": "/var/run/zookeeper", - "zk_data_dir": "/hadoop/zookeeper", - "tickTime": "2000", + "zk_log_dir": "/var/log/zookeeper", + "content": "\nexport JAVA_HOME={{java64_home}}\nexport ZOO_LOG_DIR={{zk_log_dir}}\nexport ZOOPIDFILE={{zk_pid_file}}\nexport SERVER_JVMFLAGS={{zk_server_heapsize}}\nexport JAVA=$JAVA_HOME/bin/java\nexport CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*\n\n{% if security_enabled %}\nexport SERVER_JVMFLAGS=\"$SERVER_JVMFLAGS -Djava.security.auth.login.config={{zk_server_jaas_file}}\"\nexport CLIENT_JVMFLAGS=\"$CLIENT_JVMFLAGS -Djava.security.auth.login.config={{zk_client_jaas_file}}\"\n{% endif %}", + "zk_pid_dir": "/var/run/zookeeper", "zookeeper_principal_name": "zookeeper/_h...@example.com", "zookeeper_keytab_path": "/etc/security/keytabs/zk.service.keytab" }, + "zoo.cfg": { + "clientPort": "2181", + "syncLimit": "5", + "initLimit": "10", + "dataDir": "/hadoop/zookeeper", + "tickTime": "2000" + }, "mapred-env": { "content": "\n# export JAVA_HOME=/home/y/libexec/jdk1.6.0/\n\nexport HADOOP_JOB_HISTORYSERVER_HEAPSIZE={{jobhistory_heapsize}}\n\nexport HADOOP_MAPRED_ROOT_LOGGER=INFO,RFA\n\n#export HADOOP_JOB_HISTORYSERVER_OPTS=\n#export HADOOP_MAPRED_LOG_DIR=\"\" # Where log files are stored. $HADOOP_MAPRED_HOME/logs by default.\n#export HADOOP_JHS_LOGGER=INFO,RFA # Hadoop JobSummary logger.\n#export HADOOP_MAPRED_PID_DIR= # The pid files are stored. /tmp by default.\n#export HADOOP_MAPRED_IDENT_STRING= #A string representing this instance of hadoop. $USER by default\n#export HADOOP_MAPRED_NICENESS= #The scheduling priority for daemons. Defaults to 0.", "mapred_pid_dir_prefix": "/var/run/hadoop-mapreduce", http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-web/app/assets/data/configurations/cluster_level_actual_configs.json ---------------------------------------------------------------------- diff --git a/ambari-web/app/assets/data/configurations/cluster_level_actual_configs.json b/ambari-web/app/assets/data/configurations/cluster_level_actual_configs.json index ebbcbec..4ce42ce 100644 --- a/ambari-web/app/assets/data/configurations/cluster_level_actual_configs.json +++ b/ambari-web/app/assets/data/configurations/cluster_level_actual_configs.json @@ -149,7 +149,7 @@ "nagios_contact" : "n...@n.com", "mapred_cluster_red_mem_mb" : "-1", "hive_ambari_database" : "MySQL", - "zk_data_dir" : "/hadoop/zookeeper", + "dataDir" : "/hadoop/zookeeper", "hive_pid_dir" : "/var/run/hive", "mysql_connector_url" : "${download_url}/mysql-connector-java-5.1.18.zip", "jtnode_opt_maxnewsize" : "200m", http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-web/app/assets/data/configurations/cluster_level_configs.json ---------------------------------------------------------------------- diff --git a/ambari-web/app/assets/data/configurations/cluster_level_configs.json b/ambari-web/app/assets/data/configurations/cluster_level_configs.json index d50658b..355c33c 100644 --- a/ambari-web/app/assets/data/configurations/cluster_level_configs.json +++ b/ambari-web/app/assets/data/configurations/cluster_level_configs.json @@ -426,7 +426,7 @@ "nagios_contact" : "n...@n.com", "mapred_cluster_red_mem_mb" : "-1", "hive_ambari_database" : "MySQL", - "zk_data_dir" : "/hadoop/zookeeper", + "dataDir" : "/hadoop/zookeeper", "hive_pid_dir" : "/var/run/hive", "mysql_connector_url" : "${download_url}/mysql-connector-java-5.1.18.zip", "jtnode_opt_maxnewsize" : "200m", http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-web/app/controllers/wizard/step8_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js index 4f37625..0f593e8 100644 --- a/ambari-web/app/controllers/wizard/step8_controller.js +++ b/ambari-web/app/controllers/wizard/step8_controller.js @@ -1411,11 +1411,7 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, { var obj = this.createStormSiteObj(tag); obj.service_config_version_note = serviceVersionNotes; this.get('serviceConfigTags').pushObject(obj); - } else if (type === 'zoo.cfg') { - var obj = this.createZooCfgObj(tag); - obj.service_config_version_note = serviceVersionNotes; - this.get('serviceConfigTags').pushObject(obj); - } else { + } else { var obj = this.createSiteObj(type, tag); obj.service_config_version_note = serviceVersionNotes; this.get('serviceConfigTags').pushObject(obj); @@ -1683,20 +1679,6 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, { }, /** - * Create ZooKeeper Cfg Object - * @param tag - * @returns {{type: string, tag: string, properties: {}}} - * @method createZooCfgObj - */ - createZooCfgObj: function (tag) { - var configs = this.get('configs').filterProperty('filename', 'zoo.cfg'); - var csProperties = {}; - configs.forEach(function (_configProperty) { - csProperties[_configProperty.name] = _configProperty.value; - }, this); - return {type: 'zoo.cfg', tag: tag, properties: csProperties}; - }, - /** * Create site obj for Storm * Some config-properties should be modified in custom way * @param tag http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-web/app/data/HDP2/site_properties.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js index 6ed2240..373f03e 100644 --- a/ambari-web/app/data/HDP2/site_properties.js +++ b/ambari-web/app/data/HDP2/site_properties.js @@ -3409,7 +3409,7 @@ module.exports = }, { "id": "puppet var", - "name": "zk_data_dir", + "name": "dataDir", "displayName": "ZooKeeper directory", "description": "Data directory for ZooKeeper", "defaultValue": "", @@ -3418,7 +3418,7 @@ module.exports = "displayType": "directory", "isVisible": true, "serviceName": "ZOOKEEPER", - "filename": "zookeeper-env.xml", + "filename": "zoo.cfg.xml", "category": "ZOOKEEPER_SERVER", "index": 1 }, @@ -3433,7 +3433,7 @@ module.exports = "isOverridable": false, "isVisible": true, "serviceName": "ZOOKEEPER", - "filename": "zookeeper-env.xml", + "filename": "zoo.cfg.xml", "category": "ZOOKEEPER_SERVER", "index": 2 }, @@ -3447,7 +3447,7 @@ module.exports = "isOverridable": false, "isVisible": true, "serviceName": "ZOOKEEPER", - "filename": "zookeeper-env.xml", + "filename": "zoo.cfg.xml", "category": "ZOOKEEPER_SERVER", "index": 3 }, @@ -3461,7 +3461,7 @@ module.exports = "isOverridable": false, "isVisible": true, "serviceName": "ZOOKEEPER", - "filename": "zookeeper-env.xml", + "filename": "zoo.cfg.xml", "category": "ZOOKEEPER_SERVER", "index": 4 }, @@ -3475,7 +3475,7 @@ module.exports = "isOverridable": false, "isVisible": true, "serviceName": "ZOOKEEPER", - "filename": "zookeeper-env.xml", + "filename": "zoo.cfg.xml", "category": "ZOOKEEPER_SERVER", "index": 5 }, http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-web/app/data/site_properties.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/data/site_properties.js b/ambari-web/app/data/site_properties.js index ae844f5..4151250 100644 --- a/ambari-web/app/data/site_properties.js +++ b/ambari-web/app/data/site_properties.js @@ -2173,7 +2173,7 @@ module.exports = }, { "id": "puppet var", - "name": "zk_data_dir", + "name": "dataDir", "displayName": "ZooKeeper directory", "description": "Data directory for ZooKeeper", "defaultValue": "", @@ -2182,7 +2182,7 @@ module.exports = "displayType": "directory", "isVisible": true, "serviceName": "ZOOKEEPER", - "filename": "zookeeper-env.xml", + "filename": "zoo.cfg.xml", "category": "ZOOKEEPER_SERVER", "index": 1 }, @@ -2197,7 +2197,7 @@ module.exports = "isOverridable": false, "isVisible": true, "serviceName": "ZOOKEEPER", - "filename": "zookeeper-env.xml", + "filename": "zoo.cfg.xml", "category": "ZOOKEEPER_SERVER", "index": 2 }, @@ -2211,7 +2211,7 @@ module.exports = "isOverridable": false, "isVisible": true, "serviceName": "ZOOKEEPER", - "filename": "zookeeper-env.xml", + "filename": "zoo.cfg.xml", "category": "ZOOKEEPER_SERVER", "index": 3 }, @@ -2225,7 +2225,7 @@ module.exports = "isOverridable": false, "isVisible": true, "serviceName": "ZOOKEEPER", - "filename": "zookeeper-env.xml", + "filename": "zoo.cfg.xml", "category": "ZOOKEEPER_SERVER", "index": 4 }, @@ -2239,7 +2239,7 @@ module.exports = "isOverridable": false, "isVisible": true, "serviceName": "ZOOKEEPER", - "filename": "zookeeper-env.xml", + "filename": "zoo.cfg.xml", "category": "ZOOKEEPER_SERVER", "index": 5 }, http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-web/app/models/service_config.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/service_config.js b/ambari-web/app/models/service_config.js index d652410..c1670e0 100644 --- a/ambari-web/app/models/service_config.js +++ b/ambari-web/app/models/service_config.js @@ -540,7 +540,7 @@ App.ServiceConfigProperty = Ember.Object.extend({ case 'fs.checkpoint.dir': case 'dfs.namenode.checkpoint.dir': case 'yarn.timeline-service.leveldb-timeline-store.path': - case 'zk_data_dir': + case 'dataDir': case 'oozie_data_dir': case 'hbase.tmp.dir': case 'storm.local.dir': @@ -629,7 +629,7 @@ App.ServiceConfigProperty = Ember.Object.extend({ setOfHostNames.push(component.hostName); }, this); break; - case 'zk_data_dir': + case 'dataDir': components = masterComponentHostsInDB.filterProperty('component', 'ZOOKEEPER_SERVER'); components.forEach(function (component) { setOfHostNames.push(component.hostName); http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-web/app/utils/config.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js index 3d1b8d8..470d42b 100644 --- a/ambari-web/app/utils/config.js +++ b/ambari-web/app/utils/config.js @@ -28,7 +28,7 @@ App.config = Em.Object.create({ /** * filename exceptions used to support substandard sitenames which don't have "xml" extension */ - filenameExceptions: ['zoo.cfg'], + filenameExceptions: [], preDefinedServiceConfigs: [], /** http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0ab9fb/ambari-web/test/controllers/wizard/step8_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/wizard/step8_test.js b/ambari-web/test/controllers/wizard/step8_test.js index b3edf46..ff248b6 100644 --- a/ambari-web/test/controllers/wizard/step8_test.js +++ b/ambari-web/test/controllers/wizard/step8_test.js @@ -905,30 +905,6 @@ describe('App.WizardStep8Controller', function () { }); }); - describe('#createZooCfgObj', function() { - it('should affect zoo.cfg properties', function() { - var configs = [ - {filename: 'zoo.cfg', value: 'a&b', name: 'p1'}, - {filename: 'zoo.cfg', value: 'a<b', name: 'p2'}, - {filename: 'zoo.cfg', value: 'a>b', name: 'p3'}, - {filename: 'zoo.cfg', value: 'a"b', name: 'p4'}, - {filename: 'zoo.cfg', value: 'a'b', name: 'p5'} - ], - expected = { - type: 'zoo.cfg', - tag: 'version1', - properties: { - p1: 'a&b', - p2: 'a<b', - p3: 'a>b', - p4: 'a"b', - p5: 'a'b' - } - }; - installerStep8Controller.reopen({configs: configs}); - expect(installerStep8Controller.createZooCfgObj('version1')).to.eql(expected); - }); - }); describe('#createStormSiteObj', function() { it('should replace quote \'"\' to "\'" for some properties', function() {