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

rpk: add container error logs to rpk container error #17780

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

r-vasquez
Copy link
Contributor

@r-vasquez r-vasquez commented Apr 11, 2024

This is a continuation of #13024

This PR attempts to add the Error Logs from the Docker container when rpk container start fails. This may reveal the reason for the command to fail without having the user to inspect the logs.

Fixes #13023

Example:

Old

$ rpk container start -n 1 --set redpanda.kafka_api='{[}' --retries 2
Waiting for the cluster to be ready...

unable to dial: dial tcp 127.0.0.1:46359: connect: connection refused

Now

$ rpk container start --set redpanda.kafka_api='{[}' --retries 1
Waiting for the cluster to be ready...

unable to dial: dial tcp 127.0.0.1:46359: connect: connection refused

Errors reported from the Docker container:
+ '[' '' = true ']'
+ exec /usr/bin/rpk redpanda start --node-id 0 --kafka-addr internal://0.0.0.0:9092,external://172.24.1.2:9093 --pandaproxy-addr internal://0.0.0.0:8082,external://172.24.1.2:42629 --schema-registry-addr 172.24.1.2:8081 --rpc-addr 172.24.1.2:33145 --advertise-kafka-addr internal://172.24.1.2:9092,external://127.0.0.1:46359 --advertise-pandaproxy-addr internal://172.24.1.2:8082,external://127.0.0.1:42629 --advertise-rpc-addr 172.24.1.2:33145 --mode dev-container --set 'redpanda.kafka_api={[}'
WARNING: This is a setup for development purposes only; in this mode your clusters may run unrealistically fast and data can be corrupted any time your computer shuts down uncleanly.
Error: yaml: did not find expected node content
...

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

Release Notes

Improvements

  • rpk container now prints the container logs in case of failures during startup.

This also add the container error logs to the
startCluster method.
@vbotbuildovich
Copy link
Collaborator

new failures in https://buildkite.com/redpanda/redpanda/builds/47714#018ed105-f852-4954-aa02-df7ff3663dbb:

"rptest.tests.cloud_storage_timing_stress_test.CloudStorageTimingStressTest.test_cloud_storage_with_partition_moves.cleanup_policy=compact.delete"

@r-vasquez
Copy link
Contributor Author

Reported the new (unrelated) CI issue in: #17834

@twmb twmb merged commit f0cc5af into redpanda-data:dev Apr 15, 2024
19 of 22 checks passed
@r-vasquez r-vasquez deleted the rpk-container-stderr branch April 25, 2024 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using rpk container should show errors from container startup
4 participants