You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/02/24 14:19:49 UTC
[42/50] ambari git commit: AMBARI-20120 - Error during EU while
updating Ranger Log4J service configs (jonathanhurley)
AMBARI-20120 - Error during EU while updating Ranger Log4J service configs (jonathanhurley)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5efa6531
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5efa6531
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5efa6531
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 5efa6531d226fe80f717a8997b7a2970cda1ef7c
Parents: 890ad90
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Wed Feb 22 16:06:46 2017 -0500
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Thu Feb 23 08:48:46 2017 -0500
----------------------------------------------------------------------
.../internal/UpgradeResourceProvider.java | 21 ++++-
.../ambari/server/state/ConfigHelper.java | 80 +++++++++++++-------
.../stacks/HDP/2.3/upgrades/config-upgrade.xml | 28 -------
.../HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml | 17 -----
.../HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml | 17 -----
.../HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml | 18 -----
.../stacks/HDP/2.3/upgrades/upgrade-2.4.xml | 15 ----
.../stacks/HDP/2.3/upgrades/upgrade-2.5.xml | 14 ----
.../stacks/HDP/2.3/upgrades/upgrade-2.6.xml | 11 ---
.../stacks/HDP/2.4/upgrades/config-upgrade.xml | 28 -------
.../HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml | 16 ----
.../HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml | 16 ----
.../stacks/HDP/2.4/upgrades/upgrade-2.5.xml | 14 ----
.../stacks/HDP/2.4/upgrades/upgrade-2.6.xml | 11 ---
14 files changed, 71 insertions(+), 235 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/5efa6531/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index 13a6c36..ca9ce07 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -1048,18 +1048,27 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
Set<String> upgradePackServices = new HashSet<>();
Set<String> upgradePackConfigTypes = new HashSet<>();
AmbariMetaInfo ambariMetaInfo = s_metaProvider.get();
- Map<String, ServiceInfo> stackServicesMap = ambariMetaInfo.getServices(targetStack.getStackName(), targetStack.getStackVersion());
+
+ // ensure that we get the service info from the target stack
+ // (since it could include new configuration types for a service)
+ Map<String, ServiceInfo> stackServicesMap = ambariMetaInfo.getServices(
+ targetStack.getStackName(), targetStack.getStackVersion());
+
for (Grouping group : upgradePack.getGroups(direction)) {
for (UpgradePack.OrderService service : group.services) {
if (service.serviceName == null || upgradePackServices.contains(service.serviceName)) {
// No need to re-process service that has already been looked at
continue;
}
+
upgradePackServices.add(service.serviceName);
ServiceInfo serviceInfo = stackServicesMap.get(service.serviceName);
if (serviceInfo == null) {
continue;
}
+
+ // add every configuration type for all services defined in the
+ // upgrade pack
Set<String> serviceConfigTypes = serviceInfo.getConfigTypeAttributes().keySet();
for (String serviceConfigType : serviceConfigTypes) {
if (!upgradePackConfigTypes.contains(serviceConfigType)) {
@@ -1068,6 +1077,9 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
}
}
}
+
+ // build a set of configurations that should not be merged since their
+ // services are not installed
Set<String> servicesNotInUpgradePack = new HashSet<>(stackServicesMap.keySet());
servicesNotInUpgradePack.removeAll(upgradePackServices);
for (String serviceNotInUpgradePack : servicesNotInUpgradePack) {
@@ -1079,7 +1091,9 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
}
}
}
- // Remove unused config-types from 'newConfigurationsByType'
+
+ // remove any configurations from the target stack that are not used
+ // because the services are not installed
Iterator<String> iterator = newConfigurationsByType.keySet().iterator();
while (iterator.hasNext()) {
String configType = iterator.next();
@@ -1118,10 +1132,11 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
// get the existing configurations
Map<String, String> existingConfigurations = currentClusterConfig.getProperties();
- // if the new stack configurations don't have the type, then simple add
+ // if the new stack configurations don't have the type, then simply add
// all of the existing in
Map<String, String> newDefaultConfigurations = newConfigurationsByType.get(
configurationType);
+
if (null == newDefaultConfigurations) {
newConfigurationsByType.put(configurationType, existingConfigurations);
continue;
http://git-wip-us.apache.org/repos/asf/ambari/blob/5efa6531/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
index 6572bbb..d03a4dc 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
@@ -180,7 +180,7 @@ public class ConfigHelper {
clusterDesired = new HashMap<>();
}
- Map<String, Map<String, String>> resolved = new TreeMap<String, Map<String, String>>();
+ Map<String, Map<String, String>> resolved = new TreeMap<>();
// Do not use host component config mappings. Instead, the rules are:
// 1) Use the cluster desired config
@@ -197,7 +197,7 @@ public class ConfigHelper {
continue;
}
- Map<String, String> tags = new LinkedHashMap<String, String>();
+ Map<String, String> tags = new LinkedHashMap<>();
tags.put(CLUSTER_DEFAULT_TAG, config.getTag());
@@ -232,17 +232,17 @@ public class ConfigHelper {
public Map<String, Map<String, String>> getEffectiveConfigProperties(
Cluster cluster, Map<String, Map<String, String>> desiredTags) {
- Map<String, Map<String, String>> properties = new HashMap<String, Map<String, String>>();
+ Map<String, Map<String, String>> properties = new HashMap<>();
if (desiredTags != null) {
for (Entry<String, Map<String, String>> entry : desiredTags.entrySet()) {
String type = entry.getKey();
Map<String, String> propertyMap = properties.get(type);
if (propertyMap == null) {
- propertyMap = new HashMap<String, String>();
+ propertyMap = new HashMap<>();
}
- Map<String, String> tags = new HashMap<String, String>(entry.getValue());
+ Map<String, String> tags = new HashMap<>(entry.getValue());
String clusterTag = tags.get(CLUSTER_DEFAULT_TAG);
// Overrides is only supported if the config type exists at cluster
@@ -282,7 +282,7 @@ public class ConfigHelper {
public Map<String, Map<String, Map<String, String>>> getEffectiveConfigAttributes(
Cluster cluster, Map<String, Map<String, String>> desiredTags) {
- Map<String, Map<String, Map<String, String>>> attributes = new HashMap<String, Map<String, Map<String, String>>>();
+ Map<String, Map<String, Map<String, String>>> attributes = new HashMap<>();
if (desiredTags != null) {
for (Entry<String, Map<String, String>> entry : desiredTags.entrySet()) {
@@ -290,13 +290,13 @@ public class ConfigHelper {
String type = entry.getKey();
Map<String, Map<String, String>> attributesMap = null;
- Map<String, String> tags = new HashMap<String, String>(entry.getValue());
+ Map<String, String> tags = new HashMap<>(entry.getValue());
String clusterTag = tags.get(CLUSTER_DEFAULT_TAG);
if (clusterTag != null) {
Config config = cluster.getConfig(type, clusterTag);
if (config != null) {
- attributesMap = new TreeMap<String, Map<String, String>>();
+ attributesMap = new TreeMap<>();
cloneAttributesMap(config.getPropertiesAttributes(), attributesMap);
}
tags.remove(CLUSTER_DEFAULT_TAG);
@@ -326,7 +326,7 @@ public class ConfigHelper {
public Map<String, String> getMergedConfig(Map<String,
String> persistedClusterConfig, Map<String, String> override) {
- Map<String, String> finalConfig = new HashMap<String, String>(persistedClusterConfig);
+ Map<String, String> finalConfig = new HashMap<>(persistedClusterConfig);
if (override != null && override.size() > 0) {
for (Entry<String, String> entry : override.entrySet()) {
@@ -480,7 +480,7 @@ public class ConfigHelper {
StackInfo stack = ambariMetaInfo.getStack(stackId.getStackName(),
stackId.getStackVersion());
- Set<String> result = new HashSet<String>();
+ Set<String> result = new HashSet<>();
for (Service service : clusters.getCluster(clusterName).getServices().values()) {
Set<PropertyInfo> stackProperties = ambariMetaInfo.getServiceProperties(stack.getName(), stack.getVersion(), service.getName());
@@ -517,8 +517,9 @@ public class ConfigHelper {
Set<PropertyInfo> serviceProperties = ambariMetaInfo.getServiceProperties(stack.getName(), stack.getVersion(), service.getName());
for (PropertyInfo serviceProperty : serviceProperties) {
if (serviceProperty.getPropertyTypes().contains(propertyType)) {
- if (!serviceProperty.getPropertyValueAttributes().isKeyStore())
+ if (!serviceProperty.getPropertyValueAttributes().isKeyStore()) {
continue;
+ }
String stackPropertyConfigType = fileNameToConfigType(serviceProperty.getFilename());
passwordProperties = result.get(stackPropertyConfigType);
if (passwordProperties == null) {
@@ -561,7 +562,7 @@ public class ConfigHelper {
Map<String, ServiceInfo> servicesMap,
Set<PropertyInfo> stackProperties) throws AmbariException {
Map<String, Config> actualConfigs = new HashMap<>();
- Set<String> result = new HashSet<String>();
+ Set<String> result = new HashSet<>();
for (Map.Entry<String, DesiredConfig> desiredConfigEntry : desiredConfigs.entrySet()) {
String configType = desiredConfigEntry.getKey();
@@ -570,7 +571,7 @@ public class ConfigHelper {
}
for (Service service : cluster.getServices().values()) {
- Set<PropertyInfo> serviceProperties = new HashSet<PropertyInfo>(servicesMap.get(service.getName()).getProperties());
+ Set<PropertyInfo> serviceProperties = new HashSet<>(servicesMap.get(service.getName()).getProperties());
for (PropertyInfo serviceProperty : serviceProperties) {
if (serviceProperty.getPropertyTypes().contains(propertyType)) {
String stackPropertyConfigType = fileNameToConfigType(serviceProperty.getFilename());
@@ -724,7 +725,7 @@ public class ConfigHelper {
public Set<PropertyInfo> getServiceProperties(StackId stackId, String serviceName, boolean removeExcluded)
throws AmbariException {
ServiceInfo service = ambariMetaInfo.getService(stackId.getStackName(), stackId.getStackVersion(), serviceName);
- Set<PropertyInfo> properties = new HashSet<PropertyInfo>(service.getProperties());
+ Set<PropertyInfo> properties = new HashSet<>(service.getProperties());
if (removeExcluded) {
Set<String> excludedConfigTypes = service.getExcludedConfigTypes();
@@ -794,9 +795,9 @@ public class ConfigHelper {
Config oldConfig = cluster.getDesiredConfigByType(configType);
Map<String, String> oldConfigProperties;
- Map<String, String> properties = new HashMap<String, String>();
+ Map<String, String> properties = new HashMap<>();
Map<String, Map<String, String>> propertiesAttributes =
- new HashMap<String, Map<String, String>>();
+ new HashMap<>();
if (oldConfig == null) {
oldConfigProperties = null;
@@ -890,7 +891,7 @@ public class ConfigHelper {
Map<String, Map<String, String>> batchProperties, String authenticatedUserName,
String serviceVersionNote) throws AmbariException {
- Map<String, Set<Config>> serviceMapped = new HashMap<String, Set<Config>>();
+ Map<String, Set<Config>> serviceMapped = new HashMap<>();
for (Map.Entry<String, Map<String, String>> entry : batchProperties.entrySet()) {
String type = entry.getKey();
@@ -922,8 +923,33 @@ public class ConfigHelper {
}
- Config createConfig(Cluster cluster, AmbariManagementController controller, String type, String tag,
- Map<String, String> properties, Map<String, Map<String, String>> propertyAttributes) throws AmbariException {
+ /**
+ * Creates a new configuration using the specified tag as the first version
+ * tag. Otherwise, the configuration will be created with {@literal version}
+ * along with the current timestamp.
+ *
+ * @param cluster
+ * the cluster (not {@code null}).
+ * @param controller
+ * the controller which actually creates the configuration (not
+ * {@code null}).
+ * @param type
+ * the new configuration type (not {@code null}).
+ * @param tag
+ * the initial tag; if this configuration already exists, it will use
+ * the timestamp along with {@literal version}.
+ * @param properties
+ * the properties to persist (not {@code null}).
+ * @param propertyAttributes
+ * the attributes to persist, or {@code null} for none.
+ * @return
+ * @throws AmbariException
+ */
+ Config createConfig(Cluster cluster, AmbariManagementController controller, String type,
+ String tag, Map<String, String> properties,
+ Map<String, Map<String, String>> propertyAttributes) throws AmbariException {
+
+ // if the configuration is not new, then create a timestamp tag
if (cluster.getConfigsByType(type) != null) {
tag = "version" + System.currentTimeMillis();
}
@@ -962,7 +988,7 @@ public class ConfigHelper {
*/
public Map<String, Map<String, String>> getDefaultProperties(StackId stack, Cluster cluster, boolean onStackUpgradeFilter)
throws AmbariException {
- Map<String, Map<String, String>> defaultPropertiesByType = new HashMap<String, Map<String, String>>();
+ Map<String, Map<String, String>> defaultPropertiesByType = new HashMap<>();
// populate the stack (non-service related) properties first
Set<org.apache.ambari.server.state.PropertyInfo> stackConfigurationProperties = ambariMetaInfo.getStackProperties(
@@ -1155,8 +1181,8 @@ public class ConfigHelper {
private Collection<String> findChangedKeys(Cluster cluster, String type,
Collection<String> desiredTags, Collection<String> actualTags) {
- Map<String, String> desiredValues = new HashMap<String, String>();
- Map<String, String> actualValues = new HashMap<String, String>();
+ Map<String, String> desiredValues = new HashMap<>();
+ Map<String, String> actualValues = new HashMap<>();
for (String tag : desiredTags) {
Config config = cluster.getConfig(type, tag);
@@ -1172,7 +1198,7 @@ public class ConfigHelper {
}
}
- List<String> keys = new ArrayList<String>();
+ List<String> keys = new ArrayList<>();
for (Entry<String, String> entry : desiredValues.entrySet()) {
String key = entry.getKey();
@@ -1192,7 +1218,7 @@ public class ConfigHelper {
* @return the map of tags for a desired config
*/
private Map<String, String> buildTags(HostConfig hc) {
- Map<String, String> map = new LinkedHashMap<String, String>();
+ Map<String, String> map = new LinkedHashMap<>();
map.put(CLUSTER_DEFAULT_TAG, hc.getDefaultVersionTag());
if (hc.getConfigGroupOverrides() != null) {
for (Entry<Long, String> entry : hc.getConfigGroupOverrides().entrySet()) {
@@ -1217,8 +1243,8 @@ public class ConfigHelper {
desiredTags.remove(CLUSTER_DEFAULT_TAG);
}
- Set<String> desiredSet = new HashSet<String>(desiredTags.values());
- Set<String> actualSet = new HashSet<String>(actualTags.values());
+ Set<String> desiredSet = new HashSet<>(desiredTags.values());
+ Set<String> actualSet = new HashSet<>(actualTags.values());
// Both desired and actual should be exactly the same
return !desiredSet.equals(actualSet);
@@ -1228,7 +1254,7 @@ public class ConfigHelper {
* @return the list of combined config property names
*/
private Collection<String> mergeKeyNames(Cluster cluster, String type, Collection<String> tags) {
- Set<String> names = new HashSet<String>();
+ Set<String> names = new HashSet<>();
for (String tag : tags) {
Config config = cluster.getConfig(type, tag);
http://git-wip-us.apache.org/repos/asf/ambari/blob/5efa6531/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
index 8589e2d..98722c1 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
@@ -287,27 +287,11 @@
<type>ranger-env</type>
<transfer operation="delete" delete-key="bind_anonymous" />
</definition>
- <definition xsi:type="configure" id="admin_log4j_parameterize" summary="Parameterizing Ranger Log4J Properties">
- <type>admin-log4j</type>
- <set key="ranger_xa_log_maxfilesize" value="256"/>
- <set key="ranger_xa_log_maxbackupindex" value="20"/>
- <replace key="content" find="log4j.appender.xa_log_appender=org.apache.log4j.DailyRollingFileAppender" replace-with="log4j.appender.xa_log_appender=org.apache.log4j.DailyRollingFileAppender
log4j.appender.xa_log_appender.MaxFileSize={{ranger_xa_log_maxfilesize}}MB"/>
- <replace key="content" find="log4j.appender.xa_log_appender=org.apache.log4j.DailyRollingFileAppender" replace-with="log4j.appender.xa_log_appender=org.apache.log4j.DailyRollingFileAppender
log4j.appender.xa_log_appender.MaxBackupIndex={{ranger_xa_log_maxbackupindex}}"/>
- </definition>
-
</changes>
</component>
<component name="RANGER_USERSYNC">
<changes>
- <definition xsi:type="configure" id="usersync_log4j_parameterize" summary="Parameterizing Ranger Usersync Log4J Properties">
- <type>usersync-log4j</type>
- <set key="ranger_usersync_log_maxfilesize" value="256"/>
- <set key="ranger_usersync_log_maxbackupindex" value="20"/>
- <replace key="content" find="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender" replace-with="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logFile.MaxFileSize = {{ranger_usersync_log_maxfilesize}}MB"/>
- <replace key="content" find="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender" replace-with="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logFile.MaxBackupIndex = {{ranger_usersync_log_maxbackupindex}}"/>
- </definition>
-
<definition xsi:type="configure" id="hdp_2_6_0_0_disable_delta_sync_during_upgrade">
<type>ranger-ugsync-site</type>
<set key="ranger.usersync.ldap.deltasync" value="false"
@@ -315,18 +299,6 @@
</definition>
</changes>
</component>
-
- <component name="RANGER_TAGSYNC">
- <changes>
- <definition xsi:type="configure" id="tagsync_log4j_parameterize" summary="Parameterizing Ranger Tagsync Log4J Properties">
- <type>tagsync-log4j</type>
- <set key="ranger_tagsync_log_maxfilesize" value="256"/>
- <set key="ranger_tagsync_log_number_of_backup_files" value="20"/>
- <replace key="content" find="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender" replace-with="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logFile.MaxFileSize = {{ranger_tagsync_log_maxfilesize}}MB"/>
- <replace key="content" find="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender" replace-with="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logFile.MaxBackupIndex = {{ranger_tagsync_log_number_of_backup_files}}"/>
- </definition>
- </changes>
- </component>
</service>
<service name="RANGER_KMS">
http://git-wip-us.apache.org/repos/asf/ambari/blob/5efa6531/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
index 52421d9..b95bae5 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml
@@ -412,23 +412,6 @@
</task>
</execute-stage>
- <!--RANGER-->
- <execute-stage service="RANGER" component="RANGER_ADMIN" title="Parameterizing Ranger Admin Log4J Properties">
- <task xsi:type="configure" id="admin_log4j_parameterize">
- <summary>Updating the Ranger admin Log4J properties to include parameterizations</summary>
- </task>
- </execute-stage>
- <execute-stage service="RANGER" component="RANGER_USERSYNC" title="Parameterizing Ranger Usersync Log4J Properties">
- <task xsi:type="configure" id="usersync_log4j_parameterize">
- <summary>Updating the Ranger usersync Log4J properties to include parameterizations</summary>
- </task>
- </execute-stage>
- <execute-stage service="RANGER" component="RANGER_TAGSYNC" title="Parameterizing Ranger Tagsync Log4J Properties">
- <task xsi:type="configure" id="tagsync_log4j_parameterize">
- <summary>Updating the Ranger tagsync Log4J properties to include parameterizations</summary>
- </task>
- </execute-stage>
-
<!--RANGER-KMS-->
<execute-stage service="RANGER_KMS" component="RANGER_KMS_SERVER" title="Parameterizing Ranger Kms Log4J Properties">
<task xsi:type="configure" id="kms_log4j_parameterize">
http://git-wip-us.apache.org/repos/asf/ambari/blob/5efa6531/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml
index 280000d..be2694e 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml
@@ -473,12 +473,6 @@
<task xsi:type="configure" id="hdp_2_5_0_0_set_external_solrCloud_flag"/>
</execute-stage>
- <execute-stage service="RANGER" component="RANGER_ADMIN" title="Parameterizing Ranger Admin Log4J Properties">
- <task xsi:type="configure" id="admin_log4j_parameterize">
- <summary>Updating the Ranger admin Log4J properties to include parameterizations</summary>
- </task>
- </execute-stage>
-
<execute-stage service="RANGER" component="RANGER_ADMIN" title="Calculating Ranger Properties">
<condition xsi:type="security" type="kerberos"/>
<task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.RangerKerberosConfigCalculation">
@@ -492,17 +486,6 @@
</task>
</execute-stage>
- <execute-stage service="RANGER" component="RANGER_USERSYNC" title="Parameterizing Ranger Usersync Log4J Properties">
- <task xsi:type="configure" id="usersync_log4j_parameterize">
- <summary>Updating the Ranger usersync Log4J properties to include parameterizations</summary>
- </task>
- </execute-stage>
- <execute-stage service="RANGER" component="RANGER_TAGSYNC" title="Parameterizing Ranger Tagsync Log4J Properties">
- <task xsi:type="configure" id="tagsync_log4j_parameterize">
- <summary>Updating the Ranger tagsync Log4J properties to include parameterizations</summary>
- </task>
- </execute-stage>
-
<!-- RANGER KMS -->
<execute-stage service="RANGER_KMS" component="RANGER_KMS_SERVER" title="Apply config changes for Ranger KMS Server">
<task xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_kms_audit_db"/>
http://git-wip-us.apache.org/repos/asf/ambari/blob/5efa6531/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
index d675986..e71aa7b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
@@ -535,12 +535,6 @@
<task xsi:type="configure" id="hdp_2_5_0_0_set_external_solrCloud_flag"/>
</execute-stage>
- <execute-stage service="RANGER" component="RANGER_ADMIN" title="Parameterizing Ranger Admin Log4J Properties">
- <task xsi:type="configure" id="admin_log4j_parameterize">
- <summary>Updating the Ranger admin Log4J properties to include parameterizations</summary>
- </task>
- </execute-stage>
-
<execute-stage service="RANGER" component="RANGER_ADMIN" title="Calculating Ranger Properties">
<condition xsi:type="security" type="kerberos"/>
<task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.RangerKerberosConfigCalculation">
@@ -558,22 +552,10 @@
<task xsi:type="configure" id="hdp_2_6_0_0_remove_bind_anonymous"/>
</execute-stage>
- <execute-stage service="RANGER" component="RANGER_USERSYNC" title="Parameterizing Ranger Usersync Log4J Properties">
- <task xsi:type="configure" id="usersync_log4j_parameterize">
- <summary>Updating the Ranger usersync Log4J properties to include parameterizations</summary>
- </task>
- </execute-stage>
-
<execute-stage service="RANGER" component="RANGER_USERSYNC" title="Apply config changes for Ranger Usersync">
<task xsi:type="configure" id="hdp_2_6_0_0_disable_delta_sync_during_upgrade"/>
</execute-stage>
- <execute-stage service="RANGER" component="RANGER_TAGSYNC" title="Parameterizing Ranger Tagsync Log4J Properties">
- <task xsi:type="configure" id="tagsync_log4j_parameterize">
- <summary>Updating the Ranger tagsync Log4J properties to include parameterizations</summary>
- </task>
- </execute-stage>
-
<!-- RANGER KMS -->
<execute-stage service="RANGER_KMS" component="RANGER_KMS_SERVER" title="Apply config changes for Ranger KMS Server">
<task xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_kms_audit_db"/>
http://git-wip-us.apache.org/repos/asf/ambari/blob/5efa6531/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml
index b662b28..91c8cdf 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml
@@ -514,8 +514,6 @@
<function>setup_ranger_java_patches</function>
</task>
- <task xsi:type="configure" id="admin_log4j_parameterize" />
-
</pre-upgrade>
<pre-downgrade copy-upgrade="true" />
@@ -527,24 +525,11 @@
</component>
<component name="RANGER_USERSYNC">
- <pre-upgrade>
- <task xsi:type="configure" id="usersync_log4j_parameterize" />
- </pre-upgrade>
- <pre-downgrade/>
<upgrade>
<task xsi:type="restart-task" />
</upgrade>
</component>
- <component name="RANGER_TAGSYNC">
- <pre-upgrade>
- <task xsi:type="configure" id="tagsync_log4j_parameterize" />
- </pre-upgrade>
- <pre-downgrade />
- <upgrade>
- <task xsi:type="restart-task" />
- </upgrade>
- </component>
</service>
<service name="RANGER_KMS">
http://git-wip-us.apache.org/repos/asf/ambari/blob/5efa6531/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml
index b53ff23..fd93829 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml
@@ -577,7 +577,6 @@
<service name="RANGER">
<component name="RANGER_ADMIN">
<pre-upgrade>
- <task xsi:type="configure" id="admin_log4j_parameterize" />
<task xsi:type="execute" hosts="all">
<summary>Stop Ranger Admin</summary>
<script>scripts/ranger_admin.py</script>
@@ -626,24 +625,11 @@
</component>
<component name="RANGER_USERSYNC">
- <pre-upgrade>
- <task xsi:type="configure" id="usersync_log4j_parameterize" />
- </pre-upgrade>
- <pre-downgrade/>
<upgrade>
<task xsi:type="restart-task" />
</upgrade>
</component>
- <component name="RANGER_TAGSYNC">
- <pre-upgrade>
- <task xsi:type="configure" id="tagsync_log4j_parameterize" />
- </pre-upgrade>
- <pre-downgrade />
- <upgrade>
- <task xsi:type="restart-task" />
- </upgrade>
- </component>
</service>
<service name="RANGER_KMS">
http://git-wip-us.apache.org/repos/asf/ambari/blob/5efa6531/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
index 9917ee1..9f3f42d 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
@@ -617,7 +617,6 @@
<script>scripts/ranger_admin.py</script>
<function>setup_ranger_java_patches</function>
</task>
- <task xsi:type="configure" id="admin_log4j_parameterize" />
</pre-upgrade>
<pre-downgrade/> <!-- no-op to prevent config changes on downgrade -->
@@ -630,7 +629,6 @@
<component name="RANGER_USERSYNC">
<pre-upgrade>
- <task xsi:type="configure" id="usersync_log4j_parameterize" />
<task xsi:type="configure" id="hdp_2_6_0_0_disable_delta_sync_during_upgrade"/>
</pre-upgrade>
<pre-downgrade />
@@ -638,15 +636,6 @@
<task xsi:type="restart-task" />
</upgrade>
</component>
- <component name="RANGER_TAGSYNC">
- <pre-upgrade>
- <task xsi:type="configure" id="tagsync_log4j_parameterize" />
- </pre-upgrade>
- <pre-downgrade />
- <upgrade>
- <task xsi:type="restart-task" />
- </upgrade>
- </component>
</service>
<service name="RANGER_KMS">
http://git-wip-us.apache.org/repos/asf/ambari/blob/5efa6531/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
index 14feab6..36d18ac 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
@@ -177,28 +177,11 @@
<type>ranger-env</type>
<transfer operation="delete" delete-key="bind_anonymous" />
</definition>
-
- <definition xsi:type="configure" id="admin_log4j_parameterize" summary="Parameterizing Ranger Log4J Properties">
- <type>admin-log4j</type>
- <set key="ranger_xa_log_maxfilesize" value="256"/>
- <set key="ranger_xa_log_maxbackupindex" value="20"/>
- <replace key="content" find="log4j.appender.xa_log_appender=org.apache.log4j.DailyRollingFileAppender" replace-with="log4j.appender.xa_log_appender=org.apache.log4j.DailyRollingFileAppender
log4j.appender.xa_log_appender.MaxFileSize={{ranger_xa_log_maxfilesize}}MB"/>
- <replace key="content" find="log4j.appender.xa_log_appender=org.apache.log4j.DailyRollingFileAppender" replace-with="log4j.appender.xa_log_appender=org.apache.log4j.DailyRollingFileAppender
log4j.appender.xa_log_appender.MaxBackupIndex={{ranger_xa_log_maxbackupindex}}"/>
- </definition>
-
</changes>
</component>
<component name="RANGER_USERSYNC">
<changes>
- <definition xsi:type="configure" id="usersync_log4j_parameterize" summary="Parameterizing Ranger Usersync Log4J Properties">
- <type>usersync-log4j</type>
- <set key="ranger_usersync_log_maxfilesize" value="256"/>
- <set key="ranger_usersync_log_maxbackupindex" value="20"/>
- <replace key="content" find="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender" replace-with="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logFile.MaxFileSize = {{ranger_usersync_log_maxfilesize}}MB"/>
- <replace key="content" find="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender" replace-with="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logFile.MaxBackupIndex = {{ranger_usersync_log_maxbackupindex}}"/>
- </definition>
-
<definition xsi:type="configure" id="hdp_2_6_0_0_disable_delta_sync_during_upgrade">
<type>ranger-ugsync-site</type>
<set key="ranger.usersync.ldap.deltasync" value="false"
@@ -206,17 +189,6 @@
</definition>
</changes>
</component>
- <component name="RANGER_TAGSYNC">
- <changes>
- <definition xsi:type="configure" id="tagsync_log4j_parameterize" summary="Parameterizing Ranger Tagsync Log4J Properties">
- <type>tagsync-log4j</type>
- <set key="ranger_tagsync_log_maxfilesize" value="256"/>
- <set key="ranger_tagsync_log_number_of_backup_files" value="20"/>
- <replace key="content" find="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender" replace-with="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logFile.MaxFileSize = {{ranger_tagsync_log_maxfilesize}}MB"/>
- <replace key="content" find="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender" replace-with="log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logFile.MaxBackupIndex = {{ranger_tagsync_log_number_of_backup_files}}"/>
- </definition>
- </changes>
- </component>
</service>
<service name="RANGER_KMS">
http://git-wip-us.apache.org/repos/asf/ambari/blob/5efa6531/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml
index f093cb1..a6c595a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml
@@ -358,22 +358,6 @@
</execute-stage>
<!--RANGER-->
- <execute-stage service="RANGER" component="RANGER_ADMIN" title="Parameterizing Ranger Admin Log4J Properties">
- <task xsi:type="configure" id="admin_log4j_parameterize">
- <summary>Updating the Ranger admin Log4J properties to include parameterizations</summary>
- </task>
- </execute-stage>
- <execute-stage service="RANGER" component="RANGER_USERSYNC" title="Parameterizing Ranger Usersync Log4J Properties">
- <task xsi:type="configure" id="usersync_log4j_parameterize">
- <summary>Updating the Ranger usersync Log4J properties to include parameterizations</summary>
- </task>
- </execute-stage>
- <execute-stage service="RANGER" component="RANGER_TAGSYNC" title="Parameterizing Ranger Tagsync Log4J Properties">
- <task xsi:type="configure" id="tagsync_log4j_parameterize">
- <summary>Updating the Ranger tagsync Log4J properties to include parameterizations</summary>
- </task>
- </execute-stage>
-
<execute-stage service="RANGER" component="RANGER_ADMIN" title="Configuring Ranger Alerts">
<task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.RangerWebAlertConfigAction">
<summary>Configuring Ranger Alerts</summary>
http://git-wip-us.apache.org/repos/asf/ambari/blob/5efa6531/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
index e856288..e6aaf88 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
@@ -381,22 +381,6 @@
<task xsi:type="configure" id="hdp_2_5_0_0_set_external_solrCloud_flag"/>
</execute-stage>
- <execute-stage service="RANGER" component="RANGER_ADMIN" title="Parameterizing Ranger Admin Log4J Properties">
- <task xsi:type="configure" id="admin_log4j_parameterize">
- <summary>Updating the Ranger admin Log4J properties to include parameterizations</summary>
- </task>
- </execute-stage>
- <execute-stage service="RANGER" component="RANGER_USERSYNC" title="Parameterizing Ranger Usersync Log4J Properties">
- <task xsi:type="configure" id="usersync_log4j_parameterize">
- <summary>Updating the Ranger usersync Log4J properties to include parameterizations</summary>
- </task>
- </execute-stage>
- <execute-stage service="RANGER" component="RANGER_TAGSYNC" title="Parameterizing Ranger Tagsync Log4J Properties">
- <task xsi:type="configure" id="tagsync_log4j_parameterize">
- <summary>Updating the Ranger tagsync Log4J properties to include parameterizations</summary>
- </task>
- </execute-stage>
-
<execute-stage service="RANGER" component="RANGER_ADMIN" title="Calculating Ranger Properties">
<condition xsi:type="security" type="kerberos"/>
<task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.RangerKerberosConfigCalculation">
http://git-wip-us.apache.org/repos/asf/ambari/blob/5efa6531/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml
index 2a3e6b2..b1325b9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml
@@ -562,7 +562,6 @@
<service name="RANGER">
<component name="RANGER_ADMIN">
<pre-upgrade>
- <task xsi:type="configure" id="admin_log4j_parameterize" />
<task xsi:type="execute" hosts="all">
<summary>Stop Ranger Admin</summary>
<script>scripts/ranger_admin.py</script>
@@ -611,19 +610,6 @@
</component>
<component name="RANGER_USERSYNC">
- <pre-upgrade>
- <task xsi:type="configure" id="usersync_log4j_parameterize" />
- </pre-upgrade>
- <pre-downgrade/>
- <upgrade>
- <task xsi:type="restart-task" />
- </upgrade>
- </component>
- <component name="RANGER_TAGSYNC">
- <pre-upgrade>
- <task xsi:type="configure" id="tagsync_log4j_parameterize" />
- </pre-upgrade>
- <pre-downgrade />
<upgrade>
<task xsi:type="restart-task" />
</upgrade>
http://git-wip-us.apache.org/repos/asf/ambari/blob/5efa6531/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
index f736796..730e226 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
@@ -579,7 +579,6 @@
<task xsi:type="configure" id="hdp_2_5_0_0_remove_audit_db_ranger_admin_site" />
<task xsi:type="configure" id="hdp_2_5_0_0_remove_sso_property" />
<task xsi:type="configure" id="hdp_2_5_0_0_set_external_solrCloud_flag"/>
- <task xsi:type="configure" id="admin_log4j_parameterize" />
<task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.RangerKerberosConfigCalculation">
<summary>Calculating Ranger Properties</summary>
@@ -619,7 +618,6 @@
<component name="RANGER_USERSYNC">
<pre-upgrade>
- <task xsi:type="configure" id="usersync_log4j_parameterize" />
<task xsi:type="configure" id="hdp_2_6_0_0_disable_delta_sync_during_upgrade"/>
</pre-upgrade>
<pre-downgrade />
@@ -627,15 +625,6 @@
<task xsi:type="restart-task" />
</upgrade>
</component>
- <component name="RANGER_TAGSYNC">
- <pre-upgrade>
- <task xsi:type="configure" id="tagsync_log4j_parameterize" />
- </pre-upgrade>
- <pre-downgrade />
- <upgrade>
- <task xsi:type="restart-task" />
- </upgrade>
- </component>
</service>
<service name="RANGER_KMS">