newrelic / centurion

A mass deployment tool for Docker fleets
MIT License
1.76k stars 113 forks source link

Search for host networking mode containers by name during stop_containers #177

Closed intjonathan closed 7 years ago

intjonathan commented 7 years ago

If a service uses host networking mode and you define a public port for the purpose of healthchecking, the stop container call fails because no such port is actually mapped.

This workaround allows you to define a "dummy" port that won't be mapped (since host mode doesn't do that) but still satisfies the wait_for_health_check_ok semantics by passing the port through.

It is a little weird that centurion "thinks" the port mappings exist without docker actually creating them.

Resolves #164.

relistan commented 7 years ago

Seems legit. I agree that it's a weird implementation, but it does seem like the most natural way to solve the problem currently without a noticeable (probably low value) refactor.

relistan commented 7 years ago

🐑 🐐 🐐 🐑