ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [1/3] ambari git commit: AMBARI-18642. During HDP upgrade, Ambari does not allow redirecting the /tmp/upgrade directory elsewhere (aonishuk)
Date Mon, 24 Oct 2016 15:30:55 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 e828fcbbe -> b48cb475d
  refs/heads/branch-2.5 4e99af88d -> 4b980f36a
  refs/heads/trunk 0aed64644 -> 65ef86910


AMBARI-18642. During HDP upgrade, Ambari does not allow redirecting the /tmp/upgrade directory
elsewhere (aonishuk)


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

Branch: refs/heads/trunk
Commit: 65ef869102aa312595c8ab84e08aa0be64256da9
Parents: 0aed646
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Mon Oct 24 18:30:42 2016 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Mon Oct 24 18:30:42 2016 +0300

----------------------------------------------------------------------
 .../HDFS/2.1.0.2.0/configuration/hadoop-env.xml                | 6 ++++++
 .../HDFS/2.1.0.2.0/package/scripts/namenode_upgrade.py         | 2 +-
 .../HDFS/2.1.0.2.0/package/scripts/params_linux.py             | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/65ef8691/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
index 8ca1e2e..32442d9 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
@@ -222,6 +222,12 @@
     <on-ambari-upgrade add="true"/>
   </property>
   <property>
+    <name>namenode_backup_dir</name>
+    <description>Local directory for storing backup copy of NameNode images during
upgrade</description>
+    <value>/tmp/upgrades</value>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
     <name>hdfs_user_keytab</name>
     <description>HDFS keytab path</description>
     <on-ambari-upgrade add="true"/>

http://git-wip-us.apache.org/repos/asf/ambari/blob/65ef8691/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode_upgrade.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode_upgrade.py
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode_upgrade.py
index 958afe2..f683dcc 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode_upgrade.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode_upgrade.py
@@ -114,7 +114,7 @@ def prepare_upgrade_backup_namenode_dir():
   i = 0
   failed_paths = []
   nn_name_dirs = params.dfs_name_dir.split(',')
-  backup_destination_root_dir = "/tmp/upgrades/{0}".format(params.stack_version_unformatted)
+  backup_destination_root_dir = "{0}/{1}".format(params.namenode_backup_dir, params.stack_version_unformatted)
   if len(nn_name_dirs) > 0:
     Logger.info("Backup the NameNode name directory's CURRENT folder.")
   for nn_dir in nn_name_dirs:

http://git-wip-us.apache.org/repos/asf/ambari/blob/65ef8691/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
index d54c298..55544e0 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
@@ -90,6 +90,7 @@ dfs_dn_ipc_address = config['configurations']['hdfs-site']['dfs.datanode.ipc.add
 secure_dn_ports_are_in_use = False
 
 hdfs_tmp_dir = config['configurations']['hadoop-env']['hdfs_tmp_dir']
+namenode_backup_dir = default("/configurations/hadoop-env/namenode_backup_dir", "/tmp/upgrades")
 
 # hadoop default parameters
 mapreduce_libs_path = "/usr/lib/hadoop-mapreduce/*"


Mime
View raw message