Closed patricjansson closed 6 years ago
You're right. I should change DFSL to send the "remove service" notification to DFP when it scales to 0. I'll start working on this in a few days.
A side question (not related to the need to add the new feature to DFSL)... Why do you scale services to 0
replicas?
Super, thanks!
On your question: Our deployment pipeline works like a cron-job, deploying docker compose files for each application (all automated). The way for our developers to stop a service is to set the replicas to zero. We could implement a service rm
to invoke on replicas: 0, but we handle a permanent removal of a applications in an other way.
Why not rolling updates?
Oh not for updating. For "i do not want this api endpoint to be available for a week" use case.
scale=0 seems to be the best option to stop the service. You want the configuration to be there, just no containers running. So I have stumbled on that log pollution as well.
I executed a few tests (specified in https://github.com/vfarcic/docker-flow-proxy/tree/master/issues/396). The long story short is that I could not reproduce it. Can you confirm that you're running the latest DFM and DFSL? If you are, do you have any additional tip that would help me reproduce the issue?
I have to look into it, but I think the pollution does not appear when you scale your service to 0 but when you have some services scaled to 0 and then you redeploy or restart docker-flow-proxy.
That's it @remy-tiitre. I, finally, reproduced it. I'll work on the fix tomorrow.
The problem was in the Swarm Listener. It's been fixed with the tag vfarcic/docker-flow-swarm-listener:17.12.19-25
. Can you please try it out and let me know whether it works as expected?
Hi Viktor! Great work. 17.12.19-25 did solve the 0/0 issue.
Hi
I have a couple of containers set to 0/0 replicas. These are picked up by the proxy and outputting a lot of noise in the log, see below. Since they have been "stopped" (replicas: 0), shouldnt they be ignored by the HAProxy config?
Related proxy config:
DO_NOT_RESOLVE_ADDR=true
REPEAT_RELOAD=true
Versions used: listener : 17.11.11-22 proxy: 17.12.09-77
This is repeted every RELOAD_INTERVAL second in the proxys docker log: