Skip to content

Comments

dt: Improve cert lookup in crl_test.py#25433

Open
michael-redpanda wants to merge 1 commit intoredpanda-data:devfrom
michael-redpanda:ci/core-8969/improve-cert-lookup-crl-test
Open

dt: Improve cert lookup in crl_test.py#25433
michael-redpanda wants to merge 1 commit intoredpanda-data:devfrom
michael-redpanda:ci/core-8969/improve-cert-lookup-crl-test

Conversation

@michael-redpanda
Copy link
Contributor

@michael-redpanda michael-redpanda commented Mar 19, 2025

The test originally assumed that the order of the certs matched the order of the Redpanda nodes. This change will instead search through the certificates to find the cert matching the node to revoke.

Fixes: CORE-8969

Todo:

  • Run CI on repeat

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
  • v25.1.x
  • v24.3.x
  • v24.2.x
  • v24.1.x

Release Notes

  • none

The test originally assumed that the order of the certs matched the
order of the Redpanda nodes.  This change will instead search through
the certificates to find the cert matching the node to revoke.

Signed-off-by: Michael Boquard <michael.j.boquard@gmail.com>
@michael-redpanda michael-redpanda requested review from a team and oleiman March 19, 2025 14:23
@michael-redpanda michael-redpanda self-assigned this Mar 19, 2025
@michael-redpanda
Copy link
Contributor Author

@oleiman sorry for the noise, but since you originally wrote the test I'm just making sure I didn't invalidate it in some way, thanks!

@michael-redpanda
Copy link
Contributor Author

Oh @oleiman is off for like two weeks.... ha

@michael-redpanda michael-redpanda requested review from pgellert and removed request for oleiman March 19, 2025 15:10

def find_broker_cert(self, node: ClusterNode) -> Optional[tls.Certificate]:
return next(
(c for c in self.broker_certs if node.account.hostname in c.crt),
Copy link
Member

Choose a reason for hiding this comment

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

It;s not obvious to me that node.name and node.account.hostname are the same in every environment this runs in, but that assumption does seem to run throughout the test.

It might be simpler to make self.broker_certs a map.

Copy link
Contributor

@pgellert pgellert left a comment

Choose a reason for hiding this comment

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

I am not yet following how these certs could get reordered. But the fix seems like a net improvement, so lgtm.

Comment on lines +262 to +263
broker_cert = self.provider.find_broker_cert(node)
assert broker_cert is not None, f"Failed to find certificate for node {node}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: do you know how the broker certs could end up in an order different from the order of nodes? It seems that the certs are created in the same order as the seld.redpanda.nodes inside write_tls_certs, so I am wondering how this reordering could happen.

@vbotbuildovich
Copy link
Collaborator

vbotbuildovich commented Mar 19, 2025

CI test results

test results on build#63349
test_id test_kind job_url test_status passed
rptest.tests.data_migrations_api_test.DataMigrationsApiTest.test_migrated_topic_data_integrity.transfer_leadership=True.params=.cancellation.dir.in.stage.preparing.use_alias.True ducktape https://buildkite.com/redpanda/redpanda/builds/63349#0195af23-842b-4ce7-a84b-e6c0c7cc5a38 FLAKY 1/2
rptest.tests.datalake.custom_partitioning_test.DatalakeCustomPartitioningTest.test_spec_evolution.cloud_storage_type=CloudStorageType.S3.catalog_type=CatalogType.NESSIE ducktape https://buildkite.com/redpanda/redpanda/builds/63349#0195af23-842c-4993-8029-c5af76a449c8 FLAKY 1/2
rptest.tests.schema_registry_test.SchemaRegistryAutoAuthTest.test_normalize.dataset_type=JSON ducktape https://buildkite.com/redpanda/redpanda/builds/63349#0195af23-842c-4993-8029-c5af76a449c8 FLAKY 1/2
rptest.tests.schema_registry_test.SchemaRegistryAutoAuthTest.test_normalize.dataset_type=JSON ducktape https://buildkite.com/redpanda/redpanda/builds/63349#0195af27-06df-4c12-aff3-e40a4dec35aa FLAKY 1/2
test results on build#63380
test_id test_kind job_url test_status passed
rptest.tests.crl_test.CertificateRevocationTest.test_rpc ducktape https://buildkite.com/redpanda/redpanda/builds/63380#0195b01f-cc6f-471c-8600-7dadfb228bd6 FLAKY 8/594
test results on build#63432
test_id test_kind job_url test_status passed
rptest.tests.crl_test.CertificateRevocationTest.test_rpc ducktape https://buildkite.com/redpanda/redpanda/builds/63432#0195b3a0-22c2-433d-b430-ef9a765256e4 FLAKY 4/689

@michael-redpanda
Copy link
Contributor Author

/ci-repeat 5
debug
skip-units
dt-repeat=100
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc

@vbotbuildovich
Copy link
Collaborator

Retry command for Build#63380

please wait until all jobs are finished before running the slash command

/ci-repeat 1
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc

@michael-redpanda
Copy link
Contributor Author

/ci-repeat 1
debug
skip-units
dt-repeat=100
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc

@michael-redpanda
Copy link
Contributor Author

/ci-repeat 1
debug
skip-units
skip-redpanda-build
dt-repeat=100
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc

@vbotbuildovich
Copy link
Collaborator

Retry command for Build#63432

please wait until all jobs are finished before running the slash command

/ci-repeat 1
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc
tests/rptest/tests/crl_test.py::CertificateRevocationTest.test_rpc

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.

4 participants