You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by st...@apache.org on 2016/03/21 21:39:52 UTC
ambari git commit: AMBARI-15489. Configuration with tag
'TOPOLOGY_RESOLVED' exists for 'cluster-env' error when creating Kerberized
cluster with Blueprints. (stoader)
Repository: ambari
Updated Branches:
refs/heads/branch-2.2 fbbeb5108 -> 4dfcaf886
AMBARI-15489. Configuration with tag 'TOPOLOGY_RESOLVED' exists for 'cluster-env' error when creating Kerberized cluster with Blueprints. (stoader)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4dfcaf88
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4dfcaf88
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4dfcaf88
Branch: refs/heads/branch-2.2
Commit: 4dfcaf8864b211fd8cbf1fc522f2b8fe0e8a3782
Parents: fbbeb51
Author: Toader, Sebastian <st...@hortonworks.com>
Authored: Mon Mar 21 19:23:53 2016 +0100
Committer: Toader, Sebastian <st...@hortonworks.com>
Committed: Mon Mar 21 21:39:00 2016 +0100
----------------------------------------------------------------------
.../server/controller/AmbariManagementControllerImpl.java | 5 +++--
.../main/java/org/apache/ambari/server/state/Cluster.java | 8 ++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/4dfcaf88/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index ac2fb22..8838508 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -1434,8 +1434,9 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
isConfigurationCreationNeeded = true;
break;
} else {
- if (clusterConfig.getServiceConfigVersions().isEmpty()) {
- //If there's no service config versions containing this config, recreate it even if exactly equal
+ if ( cluster.getServiceByConfigType(clusterConfig.getType()) != null && clusterConfig.getServiceConfigVersions().isEmpty() ) {
+
+ //If there's no service config versions containing this config (except cluster configs), recreate it even if exactly equal
LOG.warn("Existing desired config doesn't belong to any service config version, " +
"forcing config recreation, " +
"clusterName={}, type = {}, tag={}", cluster.getClusterName(), clusterConfig.getType(),
http://git-wip-us.apache.org/repos/asf/ambari/blob/4dfcaf88/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java b/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java
index fc9671a..b49f566 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java
@@ -640,4 +640,12 @@ public interface Cluster {
* {@link UpgradeState#SUSPENDED}.
*/
boolean isUpgradeSuspended();
+
+ /**
+ * Returns the name of the service that the passed config type belongs to.
+ * @param configType the config type to look up the service by
+ * @return returns the name of the service that the config type belongs to if there is any
+ * otherwise returns null.
+ */
+ String getServiceByConfigType(String configType);
}