faust
faust copied to clipboard
Using debugging mode inside a container is impossible because the console host is not parametrized
Version: v0.10.21
Using debugging mode inside a container is impossible because the console host is not parametrized. Faust CLI allows specifying aiomonitor console port using the --console-port parameter. Unfortunately, since "console-host" is not available, it's using the default host address specified in aiomonitor, which is 127.0.0.1.
This problem affects both configurations that are using docker containers and Kubernetes setup. Changing it manually in aiomonitor source code to 0.0.0.0 solved the issue both in Docker and Kubernetes.
Steps to reproduce
- Run a Faust worker from within a docker container with the
--debugparameter enabled. - In the console output, you will see a
Starting console at 127.0.0.1:50101message instead oflocalhost. - Accessing the debugging console from outside the container is impossible.
Expected behavior
- Add parameter
--console-hostwhich will override the default host address
As I understand this means: - Adding the
console_hostvariable to theWorkerclass in themodelibrary (https://github.com/faust-streaming/mode/blob/master/mode/worker.py#L351). - Updating Worker class in
faustaccordingly (https://github.com/faust-streaming/faust/blob/master/faust/worker.py#L228) - And updating CLI (https://github.com/faust-streaming/faust/blob/master/faust/cli/base.py#L158)
Actual behavior
aiomonitorconsole is running on the default host address:127.0.0.1.