Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tolerate benign log4j status messages in tests #81851

Merged
merged 2 commits into from
Dec 17, 2021

Conversation

ChrisHegarty
Copy link
Contributor

As identified in #81849, log4j may output warning status messages,
which are benign to tests.

@ChrisHegarty ChrisHegarty self-assigned this Dec 17, 2021
@ChrisHegarty ChrisHegarty added v8.1.0 Team:Core/Infra Meta label for core/infra team labels Dec 17, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

Copy link
Contributor

@pgomulka pgomulka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ChrisHegarty ChrisHegarty added auto-backport Automatically create backport pull requests when merged v6.8.22 v7.16.2 v8.0.0 labels Dec 17, 2021
@ChrisHegarty ChrisHegarty merged commit e55d7a9 into elastic:master Dec 17, 2021
ChrisHegarty added a commit to ChrisHegarty/elasticsearch that referenced this pull request Dec 17, 2021
Tolerate either 1) the absence or, 2) the denial, of the JNDI lookup class
ChrisHegarty added a commit to ChrisHegarty/elasticsearch that referenced this pull request Dec 17, 2021
Tolerate either 1) the absence or, 2) the denial, of the JNDI lookup class
ChrisHegarty added a commit to ChrisHegarty/elasticsearch that referenced this pull request Dec 17, 2021
Tolerate either 1) the absence or, 2) the denial, of the JNDI lookup class
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.0
7.16
6.8 Commit could not be cherrypicked due to conflicts
7.17

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 81851

ChrisHegarty added a commit that referenced this pull request Dec 17, 2021
Tolerate either 1) the absence or, 2) the denial, of the JNDI lookup class
ChrisHegarty added a commit that referenced this pull request Dec 18, 2021
Tolerate unprivileged log4j getClassLoaders calls, as if (but not exactly) like
they were wrapped in doPriv. This is precautionary step as security permission
exceptions have been observed during testing.

This change also reverts changes to tests in the log4j 2.15 Upgrade #81709,
as they should no longer be needed, given this change and changes in #81851.

No explicit new test has been added in this PR, but the code in question is
exercised extensively by existing tests, since the policy is set in the test
framework. The test reverts mentioned above confirm that the changes are
working as expected.

This change is a workaround to the issue raised in log4j:
https://issues.apache.org/jira/browse/LOG4J2-3236
@ChrisHegarty ChrisHegarty deleted the log4j_test_msgs branch December 18, 2021 17:53
ChrisHegarty added a commit that referenced this pull request Dec 18, 2021
Backport of:

Upgrade to log4j 2.17.0 Upgrade to log4j 2.17.0 #81902
Tolerate unprivileged log4j getClassLoaders calls Tolerate unprivileged log4j getClassLoaders calls #81840
Tolerate benign log4j status messages in tests Tolerate benign log4j status messages in tests #81851
pgomulka pushed a commit to pgomulka/elasticsearch that referenced this pull request Dec 20, 2021
pgomulka pushed a commit to ChrisHegarty/elasticsearch that referenced this pull request Dec 20, 2021
pgomulka pushed a commit that referenced this pull request Dec 20, 2021
Backports the following commits to 7.17:

Tolerate benign log4j status messages in tests (Tolerate benign log4j status messages in tests #81851)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged >non-issue Team:Core/Infra Meta label for core/infra team v6.8.22 v7.16.2 v7.17.0 v8.0.0-rc1 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants