You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2017/04/28 01:57:04 UTC

[jira] [Commented] (AMBARI-20880) Storm Log4J Regex Replacement on Upgrade Fails

    [ https://issues.apache.org/jira/browse/AMBARI-20880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15988038#comment-15988038 ] 

Hadoop QA commented on AMBARI-20880:
------------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12865430/AMBARI-20880_trunk.patch
  against trunk revision .

    {color:red}-1 patch{color}.  Top-level [trunk compilation|https://builds.apache.org/job/Ambari-trunk-test-patch/11523//artifact/patch-work/trunkJavacWarnings.txt] may be broken.

Console output: https://builds.apache.org/job/Ambari-trunk-test-patch/11523//console

This message is automatically generated.

> Storm Log4J Regex Replacement on Upgrade Fails
> ----------------------------------------------
>
>                 Key: AMBARI-20880
>                 URL: https://issues.apache.org/jira/browse/AMBARI-20880
>             Project: Ambari
>          Issue Type: Bug
>            Reporter: Madhuvanthi Radhakrishnan
>            Assignee: Madhuvanthi Radhakrishnan
>             Fix For: 2.5.1
>
>         Attachments: AMBARI-20880_trunk.patch
>
>
> Parameterising log4j - AMBARI-19660 - Branch 2.5, trunk
> <regex-replace> was added to all config-upgrade.xml starting from HDP2.3 upto HDP2.5 to change from log4j values to parameters like storm_log_maxbackupindex
> In order to have a unique "find" key, above code uses
> {noformat}
> find : <RollingFile name="A1"
> 	*fileName="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}"*
> 		filePattern="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}.%i.gz">
>         <PatternLayout>
>             <pattern>${pattern}</pattern>
>         </PatternLayout>
>         <Policies>
>             <SizeBasedTriggeringPolicy size="100 MB"/>
> replace : <RollingFile name="A1"
> 	fileName="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}"
> 	filePattern="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}.%i.gz">
>         <PatternLayout>
>             <pattern>${pattern}</pattern>
>         </PatternLayout>
>         <Policies>
>             <SizeBasedTriggeringPolicy size="{{storm_wrkr_a1_maxfilesize}} MB"/>
> {noformat}
> This logic works well for any upgrade from HDP2.5->HDP2.x
> Because HDP2.5 inherits from Storm 1.0.1
> https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/STORM/1.0.1/configuration/storm-worker-log4j.xml#L116
> The above logic fails for all upgrades from HDP2.x to HDP2.5 because the configs are inherited from Storm 0.10.0
> https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/STORM/0.10.0/configuration/storm-worker-log4j.xml#L115
> https://issues.apache.org/jira/browse/AMBARI-19860 - log4j directory - trunk
> The line change from 
> https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/STORM/1.0.1/configuration/storm-worker-log4j.xml#L116
> to 
> https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/STORM/0.10.0/configuration/storm-worker-log4j.xml#L115 
> was made in upgrade packs 2.3,2.4,2.5
> This change is not required in upgrade pack 2.5 since it already inherits from Storm 1.0.1
> Also, it was added under the storm_worker_log4j definition which is common for upgrade paths 2.3->2.4 as well which is not required. We want the log4j directory to change only for any upgrades happening to 2.5
> Fixes:
> 1. log4j parameterization
> HDP Upgrade packs (config-upgrade) HDP2.3,HDP2.4 should refer to Storm 0.10.0 instead of Storm 1.0.1, for storm-worker-log4j, storm-cluster-log4j.
> a. Change the find key to exclude the dependent line for storm-worker-log4j.
> {noformat}
> find : }.%i.gz">
>         <PatternLayout>
>             <pattern>${pattern}</pattern>
>         </PatternLayout>
>         <Policies>
>             <SizeBasedTriggeringPolicy size="100 MB"/>
> replace : }.%i.gz">
>         <PatternLayout>
>             <pattern>${pattern}</pattern>
>         </PatternLayout>
>         <Policies>
>             <SizeBasedTriggeringPolicy size="{{storm_wrkr_a1_maxfilesize}} MB"/>
> {noformat}
> b. Modify find key to refer storm-cluster-log4j content from common-services/STORM/0.10.0
> c. Better log message in https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigUpgradeChangeDefinition.java#L250
> 2. Resolve issues in https://hortonworks.jira.com/browse/BUG-67697
> a. Change from regex-replace to replace
> b. Remove the entry from HDP/2.5/config-upgrade. 
> c. Create it as a separate entry in the config-upgrade files.
> d. Call this entry only for nonrolling-upgrade-2.5.xml and upgrade-2.5.xml files.
> e. Commit to 2.5.1



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)