ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oleew...@apache.org
Subject [35/50] [abbrv] ambari git commit: AMBARI-20346 Log Search Upgrade should modify keystore / truststore path if it wasn't used (mgergely)
Date Thu, 09 Mar 2017 16:40:04 GMT
AMBARI-20346 Log Search Upgrade should modify keystore / truststore path if it wasn't used
(mgergely)

Change-Id: Ib5614acea9667205b2eaecbd57e3d4ec3c560f5f


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

Branch: refs/heads/branch-dev-logsearch
Commit: 546225f326323a5d6e6013c8413a36180e0b0d32
Parents: 63dad09
Author: Miklos Gergely <mgergely@hortonworks.com>
Authored: Wed Mar 8 16:32:28 2017 +0100
Committer: Miklos Gergely <mgergely@hortonworks.com>
Committed: Wed Mar 8 16:33:58 2017 +0100

----------------------------------------------------------------------
 .../ambari/server/upgrade/UpgradeCatalog250.java    |  7 +++++++
 .../LOGSEARCH/0.5.0/package/scripts/params.py       |  2 +-
 .../server/upgrade/UpgradeCatalog250Test.java       | 16 +++++++++++-----
 3 files changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/546225f3/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
index 36160ca..00d1c31 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
@@ -1006,6 +1006,13 @@ public class UpgradeCatalog250 extends AbstractUpgradeCatalog {
               newProperties.put("content", content);
             }
             
+            if ("http".equals(logsearchEnvProperties.getProperties().get("logsearch_ui_protocol"))
&&
+                "/etc/security/serverKeys/logsearch.trustStore.jks".equals(logsearchEnvProperties.getProperties().get("logsearch_truststore_location"))
&&
+                "/etc/security/serverKeys/logsearch.keyStore.jks".equals(logsearchEnvProperties.getProperties().get("logsearch_keystore_location")))
{
+              newProperties.put("logsearch_truststore_location", "/etc/ambari-logsearch-portal/conf/keys/logsearch.jks");
+              newProperties.put("logsearch_keystore_location", "/etc/ambari-logsearch-portal/conf/keys/logsearch.jks");
+            }
+            
             Set<String> removeProperties = new HashSet<>();
             removeProperties.add("logsearch_solr_audit_logs_use_ranger");
             removeProperties.add("logsearch_solr_audit_logs_zk_node");

http://git-wip-us.apache.org/repos/asf/ambari/blob/546225f3/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
index 17c536e..8dac69a 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
@@ -336,7 +336,7 @@ logfeeder_custom_config_file_names = ['input.config-%s.json' % (tag.replace('-lo
                                       for tag, content in logfeeder_metadata.iteritems()
if any(logfeeder_metadata)]
 
 if logfeeder_system_log_enabled:
-  default_config_files = ','.join(['output.json','input.config-ambari.json'] + logfeeder_default_config_file_names
+ logfeeder_custom_config_file_names
+  default_config_files = ','.join(['output.config.json','input.config-ambari.json'] + logfeeder_default_config_file_names
+ logfeeder_custom_config_file_names
                                   + ['input.config-system_messages.json', 'input.config-secure_log.json'])
 else:
   default_config_files = ','.join(['output.config.json','input.config-ambari.json'] + logfeeder_default_config_file_names
+ logfeeder_custom_config_file_names)

http://git-wip-us.apache.org/repos/asf/ambari/blob/546225f3/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
index cb2e5f6..1a87433 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
@@ -1235,13 +1235,19 @@ public class UpgradeCatalog250Test {
     expect(controller.createConfig(anyObject(Cluster.class), anyString(), capture(logFeederEnvCapture),
anyString(),
         EasyMock.<Map<String, Map<String, String>>>anyObject())).andReturn(config).once();
 
-    Map<String, String> oldLogSearchEnv = ImmutableMap.of(
-        "logsearch_solr_audit_logs_use_ranger", "false",
-        "logsearch_solr_audit_logs_zk_node", "zk_node",
-        "logsearch_solr_audit_logs_zk_quorum", "zk_quorum",
-        "content", "infra_solr_ssl_enabled or logsearch_ui_protocol == 'https'");
+    Map<String, String> oldLogSearchEnv = new HashMap<>();
+    oldLogSearchEnv.put("logsearch_solr_audit_logs_use_ranger", "false");
+    oldLogSearchEnv.put("logsearch_solr_audit_logs_zk_node", "zk_node");
+    oldLogSearchEnv.put("logsearch_solr_audit_logs_zk_quorum", "zk_quorum");
+    oldLogSearchEnv.put("logsearch_ui_protocol", "http");
+    oldLogSearchEnv.put("logsearch_truststore_location", "/etc/security/serverKeys/logsearch.trustStore.jks");
+    oldLogSearchEnv.put("logsearch_keystore_location", "/etc/security/serverKeys/logsearch.keyStore.jks");
+    oldLogSearchEnv.put("content", "infra_solr_ssl_enabled or logsearch_ui_protocol == 'https'");
 
     Map<String, String> expectedLogSearchEnv = ImmutableMap.of(
+        "logsearch_ui_protocol", "http",
+        "logsearch_truststore_location", "/etc/ambari-logsearch-portal/conf/keys/logsearch.jks",
+        "logsearch_keystore_location", "/etc/ambari-logsearch-portal/conf/keys/logsearch.jks",
         "content", "logsearch_use_ssl");
 
     Config mockLogSearchEnv = easyMockSupport.createNiceMock(Config.class);


Mime
View raw message