AMBARI-6258. Ambari server upgrade fails if oozie, hive or hbase services are 
missing (aonishuk)


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

Branch: refs/heads/branch-1.6.1
Commit: eab9aa7d023aee522b732b189d1d78906af7aa75
Parents: 0de1199
Author: Andrew Onishuk <[email protected]>
Authored: Wed Jun 25 18:32:19 2014 +0300
Committer: Andrew Onishuk <[email protected]>
Committed: Wed Jun 25 18:32:19 2014 +0300

----------------------------------------------------------------------
 .../apache/ambari/server/upgrade/AbstractUpgradeCatalog.java    | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/eab9aa7d/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
index b809b0a..2f01d38 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
@@ -192,6 +192,11 @@ public abstract class AbstractUpgradeCatalog implements 
UpgradeCatalog {
     if (clusterMap != null && !clusterMap.isEmpty()) {
       for (Cluster cluster : clusterMap.values()) {
         Config oldConfig = cluster.getDesiredConfigByType(configType);
+        if (oldConfig == null) {
+          LOG.info("Config " + configType + " not found. Assuming service not 
installed. " +
+              "Skipping configuration properties update");
+          return;
+        }
 
         if (properties != null) {
           Map<String, Config> all = cluster.getConfigsByType(configType);

Reply via email to