Rancher Healthcheck removes container after initialization fail

Hi all.

I use rancher v1.6.1.

When i create a service with healthcheck configured with:

version: '2'
    image: some-image

version: '2'
    scale: 1
    start_on_create: true
      response_timeout: 1000
      healthy_threshold: 1
      port: 80
      unhealthy_threshold: 1
      initializing_timeout: 60000
      interval: 1000
      strategy: none
      request_line: GET "/" "HTTP/1.0"
      reinitializing_timeout: 60000

My service doesn’t listen 80 port so healthcheck always fails. But it never becomes unhealty. It stays in ‘Initializing’ state and then becomes stopped and removed.

But if my service passes healthckeck first time and becomes green and then stops listening 80 port, it becomes unhealthy (expected behaviour).

Do I miss something?

You’re not missing anything, but that is the intended behavior. A container has up to the initializing timeout to start passing the healthcheck, if it doesn’t then it is deleted and rescheduled to try again.

Thank you for answer.
Is there any way to omit removing container after initialization fail?
We can set initialization time = 9999999 but it is weird.