You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/02/10 18:22:16 UTC
[GitHub] [ozone] adoroszlai opened a new pull request #3073: HDDS-6299. Remove Log4J2 from Ozone FS shaded jars
adoroszlai opened a new pull request #3073:
URL: https://github.com/apache/ozone/pull/3073
## What changes were proposed in this pull request?
Ozone FS shaded jars started including Log4J2 jars with version 1.0.0:
```
$ unzip -t ozone-0.5.0-beta/share/ozone/lib/hadoop-ozone-filesystem-lib-current-*.jar | grep -c org.apache.logging.log4j
0
$ unzip -t ozone-1.0.0/share/ozone/lib/hadoop-ozone-filesystem-hadoop3-*.jar| grep -c org.apache.logging.log4j
1286
$ unzip -t ozone-1.2.1/share/ozone/lib/ozone-filesystem-hadoop3-*.jar | grep -c org.apache.logging.log4j
1381
```
Since Ozone uses Log4J2 only for audit logging, which is a server-side feature, client does not need this dependency, so I think we can remove it.
This patch:
1. `hdds-common` only needs `log4j-api`, not the implementation (except for unit test). Move the implementation dependencies to the `hdds-server-framework` module, shared among server-side components.
2. Exclude Log4J2 artifacts (now only `log4j-api`) from Ozone FS shaded jar.
https://issues.apache.org/jira/browse/HDDS-6299
## How was this patch tested?
Built locally, verified shaded Ozone FS jar no longer includes Log4J2:
```
$ mvn -DskipTests clean package > tee mvn.log
$ grep -c 'Including.*log4j' mvn.log
0
$ unzip -t hadoop-ozone/dist/target/ozone*/share/ozone/lib/ozone-filesystem-hadoop3*.jar | grep -c org.apache.logging.log4j
0
```
Verified audit log is still working:
```
$ docker-compose exec om bash -c 'head -2 /var/log/hadoop/*audit*log'
2022-02-10 16:03:47,307 | INFO | OMAudit | user=hadoop | ip=172.24.0.8 | op=CREATE_VOLUME {admin=hadoop, owner=hadoop, volume=vol1, creationTime=1644509027230, modificationTime=1644509027230, quotaInBytes=-1, quotaInNamespace=-1, usedNamespace=0, objectID=-9223372036854775552, updateID=1} | ret=SUCCESS |
2022-02-10 16:03:47,395 | INFO | OMAudit | user=hadoop | ip=172.24.0.8 | op=CREATE_BUCKET {volume=vol1, bucket=bucket1, bucketLayout=OBJECT_STORE, gdprEnabled=null, acls=[user:hadoop:a[ACCESS], group:users:a[ACCESS]], isVersionEnabled=false, storageType=DISK, creationTime=1644509027373, bucketEncryptionKey=null, modificationTime=1644509027373, usedBytes=0, usedNamespace=0} | ret=SUCCESS |
```
CI:
https://github.com/adoroszlai/hadoop-ozone/actions/runs/1824839189
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai merged pull request #3073: HDDS-6299. Remove Log4J2 from Ozone FS shaded jars
Posted by GitBox <gi...@apache.org>.
adoroszlai merged pull request #3073:
URL: https://github.com/apache/ozone/pull/3073
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai commented on pull request #3073: HDDS-6299. Remove Log4J2 from Ozone FS shaded jars
Posted by GitBox <gi...@apache.org>.
adoroszlai commented on pull request #3073:
URL: https://github.com/apache/ozone/pull/3073#issuecomment-1064162638
Thanks @swagle for the review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org