ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject git commit: AMBARI-6320. Nagios failed to start on stack upgraded cluster (Jonathan Hurley via ncole)
Date Tue, 01 Jul 2014 18:07:32 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.6.1 86fbfce4a -> 7c3c88d44


AMBARI-6320. Nagios failed to start on stack upgraded cluster (Jonathan Hurley via ncole)


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

Branch: refs/heads/branch-1.6.1
Commit: 7c3c88d44816fb9a91f58ef51406cbe8fe3639f1
Parents: 86fbfce
Author: Nate Cole <ncole@hortonworks.com>
Authored: Tue Jul 1 14:07:23 2014 -0400
Committer: Nate Cole <ncole@hortonworks.com>
Committed: Tue Jul 1 14:07:23 2014 -0400

----------------------------------------------------------------------
 .../ambari/server/upgrade/UpgradeCatalog160.java      |  8 --------
 ambari-server/src/main/python/UpgradeHelper_HDP2.py   |  4 +++-
 .../2.0.6/services/NAGIOS/package/scripts/params.py   | 14 ++++++++++++--
 .../ambari/server/upgrade/UpgradeCatalog160Test.java  |  8 --------
 4 files changed, 15 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7c3c88d4/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog160.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog160.java
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog160.java
index c359afa..c4b0273 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog160.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog160.java
@@ -21,9 +21,7 @@ package org.apache.ambari.server.upgrade;
 import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.configuration.Configuration;
@@ -114,12 +112,6 @@ public class UpgradeCatalog160 extends AbstractUpgradeCatalog {
 
     // Add missing property for YARN
     updateConfigurationProperties("global", Collections.singletonMap("jobhistory_heapsize",
"900"), false);
-
-    // Add missing properties for HDFS
-    Map<String, String> hdfsProperties = new HashMap<String, String>();
-    hdfsProperties.put("dfs.namenode.checkpoint.period", "21600");
-    hdfsProperties.put("dfs.namenode.checkpoint.txns", "1000000");
-    updateConfigurationProperties("hdfs-site", hdfsProperties, false);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/7c3c88d4/ambari-server/src/main/python/UpgradeHelper_HDP2.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/UpgradeHelper_HDP2.py b/ambari-server/src/main/python/UpgradeHelper_HDP2.py
index 0c43850..d0f03a0 100644
--- a/ambari-server/src/main/python/UpgradeHelper_HDP2.py
+++ b/ambari-server/src/main/python/UpgradeHelper_HDP2.py
@@ -578,7 +578,9 @@ HDFS_SITE = {
   "fs.permissions.umask-mode": "022",
   "ipc.server.max.response.size": "DELETE_OLD",
   "ipc.server.read.threadpool.size": "DELETE_OLD",
-  "dfs.support.append": "true"
+  "dfs.support.append": "true",
+  "dfs.namenode.checkpoint.txns": "1000000",
+  "dfs.namenode.checkpoint.period": "21600"
 }
 
 CORE_SITE = {

http://git-wip-us.apache.org/repos/asf/ambari/blob/7c3c88d4/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 cb3d5c1..e833bca 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
@@ -102,8 +102,18 @@ supervisor_port = "56431"
 storm_rest_api_port = "8745"
 falcon_port = config['configurations']['global']['falcon_port']
 ahs_port = get_port_from_url(config['configurations']['yarn-site']['yarn.timeline-service.webapp.address'])
-dfs_namenode_checkpoint_period = config['configurations']['hdfs-site']['dfs.namenode.checkpoint.period']
-dfs_namenode_checkpoint_txns = config['configurations']['hdfs-site']['dfs.namenode.checkpoint.txns']
+
+# use sensible defaults for checkpoint as they are required by Nagios and 
+# may not be part of hdfs-site.xml on an upgrade
+if 'dfs.namenode.checkpoint.period' in config['configurations']['hdfs-site']:
+  dfs_namenode_checkpoint_period = config['configurations']['hdfs-site']['dfs.namenode.checkpoint.period']
+else:
+  dfs_namenode_checkpoint_period = '21600'
+  
+if 'dfs.namenode.checkpoint.txns' in config['configurations']['hdfs-site']:
+  dfs_namenode_checkpoint_txns = config['configurations']['hdfs-site']['dfs.namenode.checkpoint.txns']
+else:
+  dfs_namenode_checkpoint_txns = '1000000'
 
 # this is different for HDP1
 nn_metrics_property = "FSNamesystem"

http://git-wip-us.apache.org/repos/asf/ambari/blob/7c3c88d4/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
index 59c73f2..3d54874 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
@@ -36,7 +36,6 @@ import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.sql.SQLException;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -99,14 +98,7 @@ public class UpgradeCatalog160Test {
 
     upgradeCatalog.updateConfigurationProperties("global",
       Collections.singletonMap("jobhistory_heapsize", "900"), false);
-    expectLastCall();
 
-    upgradeCatalog.updateConfigurationProperties(
-      "hdfs-site", new HashMap<String, String>() {{
-        put("dfs.namenode.checkpoint.txns", "1000000");
-        put("dfs.namenode.checkpoint.period", "21600");
-      }}, false
-    );
     expectLastCall();
 
     replay(upgradeCatalog, dbAccessor, configuration);


Mime
View raw message