rolaguard
rolaguard copied to clipboard
Avoid logging too many errors on containers initialization
Describe the bug The docker containers usually log some errors when starting. This happens because some parts of the system, like the database and rabbitmq, refuse the connection attempts made by the backend, the engine and the packer-writer. After some short time, the database and rabbitmq become ready to accept connections and everything start working fine. However, it would be better to avoid logging these initial errors as it can be confusing.
To Reproduce Steps to reproduce the behavior:
- Initialize docker containers with "docker-compose up -d"
- Check the logs of the containers, for example: "docker logs backend"
- Visualize error logs related with sqlalchemy and rabbitmq connections.
Expected behavior Each service should try to be initialized a fixed number of times, without logging any errors between different attempts, and only if all these attempts fail, then an error should be logged and the initialization aborted.