basecamp / kamal

Deploy web apps anywhere.
https://kamal-deploy.org
MIT License
9.38k stars 357 forks source link

No more logs when container fails to pass healthcheck #842

Closed rchoquet closed 2 weeks ago

rchoquet commented 2 weeks ago

Hey 👋 thanks for the great tool!

After upgrading to the latest Kamal version, I noticed that I don't see container logs anymore when it fails to start:

  INFO container not ready (unhealthy), retrying in 5s (attempt 5/5)...
  INFO [4ce84d1f] Running docker container ls --all --filter name=^backend-web-staging-42b6c642f302...$ --quiet | xargs docker inspect --format '{{if .State.Health}}{{.State.Health.Status}}{{else}}{{.State.Status}}{{end}}' on XX.XX.XX.XX
  INFO [4ce84d1f] Finished in 0.144 seconds with exit status 0 (successful).
  INFO [42843c06] Running docker container ls --all --filter name=^backend-web-staging-42b6c642f302...$ --quiet | xargs docker stop on XX.XX.XX.XX
  INFO [42843c06] Finished in 0.219 seconds with exit status 0 (successful).
Releasing the deploy lock...
  Finished all in 31.6 seconds
  ERROR (Kamal::Cli::Healthcheck::Error): Exception while executing on host XX.XX.XX.XX: container not ready (unhealthy)

Is it intentional? The healthcheck: log_lines parameter is still present in the docs but does not seem to be taken into account anymore.

Thanks !

EDIT: It only happens if the barrier mechanism is not needed (single role deploy)