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

rptest: Ignore error logs generated by anomaly injection #16496

Conversation

abhijat
Copy link
Contributor

@abhijat abhijat commented Feb 6, 2024

FIXES #16474

This test removes a segment from the manifest to generate anomalies. A side effect of this is that the validation in manifest done during spillover which checks that the start of the manifest and the start of spillover must match can fail, because the first segment of the manifest has been force reset away.

Effectively, spillover manifest is creating by iterating over segment list in main manifest. This main manifest is missing its first segment because of the anomaly injection.

When applying the spillover command, the manifest compares the start offsets of the spillover meta and the main manifest. The start offset has not changed during the anomaly injection. As a result the apply-spillover command fails.

This is acceptable because the anomaly injection should cause this failure, and this change adds the error to allow list.

Additionally, a utility is added which can allow logs using information from a test run.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.3.x
  • v23.2.x
  • v23.1.x

Release Notes

  • none

@abhijat
Copy link
Contributor Author

abhijat commented Feb 6, 2024

/ci-repeat 10
debug
skip-units
dt-repeat=10
tests/rptest/tests/cloud_storage_scrubber_test.py::CloudStorageScrubberTest.test_scrubber

@vbotbuildovich
Copy link
Collaborator

vbotbuildovich commented Feb 6, 2024

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44753#018d7f05-a9c9-4f8d-a9d5-80e2b690f834

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44753#018d7f05-a9cf-46a6-8b1a-39f33c9b6045

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44761#018d7f73-6fd1-4c19-b34e-99be2feec373

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44761#018d7f73-6fd4-4730-8a5a-dab518b00cee

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44761#018d7f73-6fd9-4334-9758-4796ddffba2c

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44761#018d7f73-6fd5-4c3d-aecf-43e72dc88667

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44761#018d7f73-6fda-423c-a84b-6c928eeaf1ec

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44761#018d7f73-6fd3-4676-8355-54c034c74bc9

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44761#018d7f73-6fd3-4279-a730-f09decea1d13

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44761#018d7f73-6fdb-401d-a5ce-611b90cb1b01

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44801#018d82dc-a8e5-4540-b084-07bf2f89eb81

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44801#018d82dc-a8df-4348-a414-e32b92f048da

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44801#018d82dc-a8df-4803-93f4-0a9595147609

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44801#018d82dc-a8dd-4df5-bb3f-55aefc246116

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44801#018d82dc-a8e5-4b09-819e-97c512bc7b24

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44801#018d82dc-a8de-4e6c-b326-fe34ede89abc

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44801#018d82dc-a8dd-4606-b3b3-0422a00ee9a7

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44809#018d83aa-2db4-4cf0-8a33-82f53f4b5530

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44809#018d83aa-2db8-484c-9ec2-fca0ec68c327

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44809#018d83aa-2db0-48a5-a77e-38ee975d7e15

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44809#018d83aa-2dae-443b-931b-d67f222502fc

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44809#018d83aa-2dae-470f-a5bb-4bc9cca716a1

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44809#018d83aa-2db1-4530-9ae0-e419f021ea65

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44809#018d83aa-2db6-4f96-8a3a-4e02097bcffe

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44809#018d83aa-2daf-44cf-93b0-7125418f782c

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44809#018d83aa-2db7-4994-8d8e-a093cd92b2cc

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44875#018d8762-1612-486b-b0e0-3cc133a6f41f

@abhijat
Copy link
Contributor Author

abhijat commented Feb 6, 2024

/ci-repeat 10
debug
skip-units
dt-repeat=100
tests/rptest/tests/cloud_storage_scrubber_test.py::CloudStorageScrubberTest.test_scrubber

@abhijat abhijat force-pushed the issue/16474/ignore-test-generated-error-logs branch from a24233b to 4f2acee Compare February 7, 2024 05:31
@abhijat
Copy link
Contributor Author

abhijat commented Feb 7, 2024

/ci-repeat 10
debug
skip-units
dt-repeat=100
tests/rptest/tests/cloud_storage_scrubber_test.py::CloudStorageScrubberTest.test_scrubber

@abhijat abhijat force-pushed the issue/16474/ignore-test-generated-error-logs branch from 302e0dc to 4f2acee Compare February 7, 2024 12:11
@abhijat
Copy link
Contributor Author

abhijat commented Feb 7, 2024

/ci-repeat 10
debug
skip-units
dt-repeat=100
tests/rptest/tests/cloud_storage_scrubber_test.py::CloudStorageScrubberTest.test_scrubber

@abhijat
Copy link
Contributor Author

abhijat commented Feb 8, 2024

/ci-repeat

@abhijat abhijat force-pushed the issue/16474/ignore-test-generated-error-logs branch from 4f2acee to c9982b5 Compare February 8, 2024 05:06
The log allow list decorator conventionally matches logs on string or
regex. Sometimes finer grained checks are required, where extra context
is needed to see if a log message is acceptable or signals an error.

The AllowLogsOnPredicate class allows a test to register one of its
methods to be called for each error log, that method can then return a
not-None style result to signal that an error is acceptable, and False
or None to signal that an error should cause the test to fail.
The base offset value is useful when validating error logs.
This test removes a segment from the manifest to generate anomalies. A
side effect of this is that the validation in manifest done during
spillover which checks that the start of the manifest and the start of
spillover must match can fail, because the first segment of the manifest
has been force reset away.

Effectively, spillover manifest is creating by iterating over segment
list in main manifest. This main manifest is missing its first segment
because of the anomaly injection.

When applying the spillover command, the manifest compares the start
offsets of the spillover meta and the main manifest. The start offset
has not changed during the anomaly injection. As a result the
apply-spillover command fails.

This is acceptable because the anomaly injection should cause this
failure, and this change adds the error to allow list.
@abhijat abhijat force-pushed the issue/16474/ignore-test-generated-error-logs branch from c9982b5 to b4ee8fb Compare February 8, 2024 05:14
the predicate to return falsy values to reject a log from being allowed.
"""
assert self.predicate is not None, f"Log predicate method {self.method} is not initialized"
return self.predicate(log_line) or None
Copy link
Member

Choose a reason for hiding this comment

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

cool stuf

@abhijat abhijat merged commit b975c9e into redpanda-data:dev Feb 8, 2024
19 checks passed
@vbotbuildovich
Copy link
Collaborator

/backport v23.3.x

@vbotbuildovich
Copy link
Collaborator

/backport v23.2.x

@vbotbuildovich
Copy link
Collaborator

Failed to create a backport PR to v23.3.x branch. I tried:

git remote add upstream https://github.com/redpanda-data/redpanda.git
git fetch --all
git checkout -b backport-pr-16496-v23.3.x-516 remotes/upstream/v23.3.x
git cherry-pick -x 751b7385a9efacced7983732c0381c3989a11d13 a6c069ed08a73de6a653679e6573894f646a088a f3b4108cb862982bf7c9cf6adeaa7e21218080e1 b4ee8fbf3a4ce6f2b02297d0ebe231b1e47e44ce

Workflow run logs.

@vbotbuildovich
Copy link
Collaborator

Failed to create a backport PR to v23.2.x branch. I tried:

git remote add upstream https://github.com/redpanda-data/redpanda.git
git fetch --all
git checkout -b backport-pr-16496-v23.2.x-457 remotes/upstream/v23.2.x
git cherry-pick -x 751b7385a9efacced7983732c0381c3989a11d13 a6c069ed08a73de6a653679e6573894f646a088a f3b4108cb862982bf7c9cf6adeaa7e21218080e1 b4ee8fbf3a4ce6f2b02297d0ebe231b1e47e44ce

Workflow run logs.

@abhijat
Copy link
Contributor Author

abhijat commented Feb 8, 2024

Backporting as it is looks tricky. It might be easier to just add the string to log allow list in the two branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI Failure (Can't apply spillover command) in CloudStorageScrubberTest.test_scrubber
3 participants