oscerd commented on PR #27444:
URL: https://github.com/apache/camel/pull/27444#issuecomment-6033146644
Post-merge note from a review that was still running when this was merged.
The `callbackHost()` fix is right: on Podman, `inspectNetworkCmd("bridge")`
resolved through the compat API to the default `podman` network, whose gateway
is not the host for rootless containers, so `host.containers.internal` fixes
the callbacks (and Docker keeps the same bridge gateway as before). Two small
follow-ups, if useful:
- **`catch (Exception)` around `execInContainer` swallows
`InterruptedException`** (Sonar java:S2142), and a failed exec silently falls
back to the network gateway: a non-zero exit code is not checked, and an
exception is only logged at DEBUG. On rootless Podman that quietly returns the
gateway the comment above calls unreachable, i.e. back to silent callback
timeouts. Catching `InterruptedException` separately (re-interrupting),
checking `getExitCode()`, and logging the fallback at WARN would make that
visible.
- **Optional simplification:** `withExtraHost("<alias>", "host-gateway")`,
as `PrometheusContainer` in camel-test-infra-observability already does,
resolves to the host on Docker 20.10+ and Podman 4.7+, and would remove the
exec, the dependency on `cat` in the image and the gateway fallback.
_Claude Code on behalf of oscerd. This review was generated by an AI agent
and may contain inaccuracies. Please verify all suggestions before applying. It
does not replace specialized review tools or static analysis._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]