hi all. not sure if this is the right place to ask?
i discovered this wonderful platform when searching for a scale to zero orchestrator for my restful & stateless microservices.
i was wondering if this platform is a good use case for me. With my current docker containers, I am unable to Write a file /tmp/.lock when ready to receive traffic. Is this a hard requirement? Can there be a sleep or some other way to do a health check? TIA.
Hi @jvice152 ,
/tmp/.lock is created by the watchdog process. If it cannot be created in your case, you can use suppress_lock as mentioned in the watchdog README.
This is a good blog-post which might help with ideas how to implement a health check following another approach: test-drive-healthcheck
Ivana
@ivanayov if I have an endpoint i can hit with curl & dockerfiles HEALTHCHECK, do i need watchdog at all? Forgive my ignorance, i am still incredibly new to this :)
perhaps you could help me with some gaps in these links...
the test-drive-healthcheck doesn't use the watchdog in its dockerfile at all, but creates the tempfile.
I want my dockerimage ran, not watchdog as i want to expose a set of endpoints like the example below, and not scoped to a "fprocess", which seems to be required if i go that route, as you are really running the watchdog process, and not serving my webservice inside a dockerfile. Perhaps I am missing something obvious? Wouldn't be the first time ;)
@jvice152 How do you run your functions? Do you use OpenFaaS, or just plan to do and run them another way at the moment?
What's blocking the creating of /tmp/.lock?
The watchdog is always attached to a function and it takes care for the input/output. It's described in more details on the link I shared above. If you're running your functions with OpenFaaS, it will be always built within the function image and run as a forked process.
On Docker Swarm you may be able to use your own health check command and have this work, as long as you're not also using the watchdog. Why don't you try it?
Derek close: inactive
Feel free to keep commenting, but I'm going to close this issue due to inactivity.