-
Notifications
You must be signed in to change notification settings - Fork 592
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
Wait for the victim node to apply the dirty offset #11350
Conversation
Signed-off-by: Michal Maslanka <michal@redpanda.com>
Sometimes controller log dirty offset may be helpful to understand the gap between what is know to be committed and what is available in the log. Signed-off-by: Michal Maslanka <michal@redpanda.com>
Controller erasure test is supposed to validate if there is a mismatch between the last appended entry in kvstore and controller max offset. In order for the test to work correctly we must wait for all the messages to be committed as we only delete the last segment that contains a single message (new replicated configuration). In order to make the test reliable change the condition to wait for the applied offset on the node where controller log is going to be removed to be equal to the leader dirty offset. Fixes: redpanda-data#8217 Signed-off-by: Michal Maslanka <michal@redpanda.com>
@@ -4050,16 +4050,19 @@ void admin_server::register_debug_routes() { | |||
seastar::httpd::debug_json::get_controller_status, | |||
[this](std::unique_ptr<ss::http::request>) | |||
-> ss::future<ss::json::json_return_type> { | |||
return _controller->get_last_applied_offset().then( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yikes. why wasn't this crashing before?
/backport v23.1.x |
/backport v22.3.x |
Failed to run cherry-pick command. I executed the commands below:
|
Failed to run cherry-pick command. I executed the commands below:
|
Is this failure related or new? https://buildkite.com/redpanda/redpanda/builds/31277#0188b9b7-c41b-4adc-9a48-d93127c3a8dc
|
@@ -57,14 +57,14 @@ def test_erase_controller_log(self, partial): | |||
|
|||
# Stop the node we will intentionally damage | |||
victim_node = self.redpanda.nodes[1] | |||
bystander_node = self.redpanda.nodes[0] | |||
bystander_node = self.redpanda.controller() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mmaslankaprv it looks like this is sometimes returning NoneType
AttributeError("'NoneType' object has no attribute 'account'")
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/ducktape/tests/runner_client.py", line 135, in run
data = self.run_test()
File "/usr/local/lib/python3.10/dist-packages/ducktape/tests/runner_client.py", line 227, in run_test
return self.test_context.function(self.test)
File "/usr/local/lib/python3.10/dist-packages/ducktape/mark/_mark.py", line 481, in wrapper
return functools.partial(f, *args, **kwargs)(*w_args, **w_kwargs)
File "/root/tests/rptest/services/cluster.py", line 79, in wrapped
r = f(self, *args, **kwargs)
File "/root/tests/rptest/tests/controller_erase_test.py", line 118, in test_erase_controller_log
assert self.redpanda.search_log_node(bystander_node,
File "/root/tests/rptest/services/redpanda.py", line 3433, in search_log_node
for line in node.account.ssh_capture(
AttributeError: 'NoneType' object has no attribute 'account'
Controller erasure test is supposed to validate if there is a mismatch
between the last appended entry in
kvstore
and controller max offset. Inorder for the test to work correctly we must wait for all the messages
to be committed as we only delete the last segment that contains a
single message (new replicated configuration). In order to make the test
reliable change the condition to wait for the applied offset on the node
where controller log is going to be removed to be equal to the leader
dirty offset.
Fixes: #8217
Backports Required
Release Notes