-
Notifications
You must be signed in to change notification settings - Fork 281
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
[BUG] An inconsistent number of audit logs is created when a snapshot is taken. #2169
Labels
bug
Something isn't working
good first issue
These are recommended starting points for newcomers looking to make their first contributions.
triaged
Issues labeled as 'Triaged' have been reviewed and are deemed actionable.
Comments
lukasz-soszynski-eliatra
added
bug
Something isn't working
untriaged
Require the attention of the repository maintainers and may need to be prioritized
labels
Oct 14, 2022
3 tasks
stephen-crawford
added
triaged
Issues labeled as 'Triaged' have been reviewed and are deemed actionable.
good first issue
These are recommended starting points for newcomers looking to make their first contributions.
hacktoberfest
Global event that encourages people to contribute to open-source.
and removed
untriaged
Require the attention of the repository maintainers and may need to be prioritized
labels
Oct 17, 2022
davidlago
removed
the
hacktoberfest
Global event that encourages people to contribute to open-source.
label
Nov 2, 2022
Hi, it seems like the problem was caused by Awaitility.await() method used in SnapshotSteps.waitForSnapshotCreation() |
stephen-crawford
pushed a commit
that referenced
this issue
Dec 14, 2023
### Description test PR ### Issues Resolved - #3426 - #2141 - #2169 Similar to this task: #1917 From what I've noticed some logs are duplicated on faster machines. During test creation audit logging results were added based on actual results produced by tests. Now if there are slower moments where logging produces non-duplicated logs, those were marked as failed. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Maciej Mierzwa <dev.maciej.mierzwa@gmail.com> Signed-off-by: MaciejMierzwa <dev.maciej.mierzwa@gmail.com>
MaciejMierzwa
added a commit
to MaciejMierzwa/security
that referenced
this issue
Dec 18, 2023
Search operation test flakiness fix - opensearch-project#3426 - opensearch-project#2141 - opensearch-project#2169 Similar to this task: opensearch-project#1917 From what I've noticed some logs are duplicated on faster machines. During test creation audit logging results were added based on actual results produced by tests. Now if there are slower moments where logging produces non-duplicated logs, those were marked as failed. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Maciej Mierzwa <dev.maciej.mierzwa@gmail.com> Signed-off-by: MaciejMierzwa <dev.maciej.mierzwa@gmail.com> (cherry picked from commit 9da4a78)
MaciejMierzwa
added a commit
to MaciejMierzwa/security
that referenced
this issue
Dec 18, 2023
Search operation test flakiness fix - opensearch-project#3426 - opensearch-project#2141 - opensearch-project#2169 Similar to this task: opensearch-project#1917 From what I've noticed some logs are duplicated on faster machines. During test creation audit logging results were added based on actual results produced by tests. Now if there are slower moments where logging produces non-duplicated logs, those were marked as failed. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Maciej Mierzwa <dev.maciej.mierzwa@gmail.com> Signed-off-by: MaciejMierzwa <dev.maciej.mierzwa@gmail.com> (cherry picked from commit 9da4a78) Signed-off-by: Maciej Mierzwa <dev.maciej.mierzwa@gmail.com>
MaciejMierzwa
added a commit
to MaciejMierzwa/security
that referenced
this issue
Dec 18, 2023
Search operation test flakiness fix - opensearch-project#3426 - opensearch-project#2141 - opensearch-project#2169 Similar to this task: opensearch-project#1917 From what I've noticed some logs are duplicated on faster machines. During test creation audit logging results were added based on actual results produced by tests. Now if there are slower moments where logging produces non-duplicated logs, those were marked as failed. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Maciej Mierzwa <dev.maciej.mierzwa@gmail.com> Signed-off-by: MaciejMierzwa <dev.maciej.mierzwa@gmail.com> (cherry picked from commit 9da4a78) Signed-off-by: Maciej Mierzwa <dev.maciej.mierzwa@gmail.com>
prabhask5
pushed a commit
to prabhask5/opensearch-security
that referenced
this issue
Jan 11, 2024
### Description test PR ### Issues Resolved - opensearch-project#3426 - opensearch-project#2141 - opensearch-project#2169 Similar to this task: opensearch-project#1917 From what I've noticed some logs are duplicated on faster machines. During test creation audit logging results were added based on actual results produced by tests. Now if there are slower moments where logging produces non-duplicated logs, those were marked as failed. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Maciej Mierzwa <dev.maciej.mierzwa@gmail.com> Signed-off-by: MaciejMierzwa <dev.maciej.mierzwa@gmail.com> Signed-off-by: Prabhas Kurapati <prabhask@berkeley.edu>
dlin2028
pushed a commit
to dlin2028/security
that referenced
this issue
May 1, 2024
### Description test PR ### Issues Resolved - opensearch-project#3426 - opensearch-project#2141 - opensearch-project#2169 Similar to this task: opensearch-project#1917 From what I've noticed some logs are duplicated on faster machines. During test creation audit logging results were added based on actual results produced by tests. Now if there are slower moments where logging produces non-duplicated logs, those were marked as failed. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Maciej Mierzwa <dev.maciej.mierzwa@gmail.com> Signed-off-by: MaciejMierzwa <dev.maciej.mierzwa@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
good first issue
These are recommended starting points for newcomers looking to make their first contributions.
triaged
Issues labeled as 'Triaged' have been reviewed and are deemed actionable.
What is the bug?
A variable number of audit logs is created when a snapshot is taken:
AUTHENTICATED
and request path/_snapshot/test-snapshot-repository/snapshot-positive-test
GRANTED_PRIVILEGES
and request typeGetSnapshotsRequest
How can one reproduce the bug?
The bug was found during work on integration tests for snapshot features. The easiest way to reproduce the problem is to run the test
org.opensearch.security.SearchOperationTest#shouldCreateSnapshot_positive
, https://github.com/opensearch-project/security/pull/2153/files#diff-a407f817ee7d41d20775ea3fec31ed0a1fb81230503909a94266e78fe73a07d0R1385The number of audit logs depends on the test execution order. When only the above test is run from the IDE then always 2 audits
AUTHENTICATED/_snapshot/test-snapshot-repository/snapshot-positive-test
and 4GRANTED_PRIVILEGES/GetSnapshotsRequest
are created. But when all tests from the classSearchOperationTest
are run then depending on the execution order only 1 auditsAUTHENTICATED/_snapshot/test-snapshot-repository/snapshot-positive-test
and 2GRANTED_PRIVILEGES/GetSnapshotsRequest
are created during testshouldCreateSnapshot_positive
.It is also worth mentioning that after each test snapshot repository is removed if exists.
What is the expected behaviour?
The consistent number of audit logs is created
What is your host/environment?
Do you have any screenshots?
no
Do you have any additional context?
To easily tracks the number of audit logs created during tests it is worth assigning
DEBUG
level to loggerorg.opensearch.test.framework.audit.AuditLogsRule
The text was updated successfully, but these errors were encountered: