How to disable health checking for `gcloud preview

2019-04-30 02:54发布

Is there a way to disable health checking when running the development server for manages VMs locally (gcloud preview app run app.yaml)?

This health checking causes me headaches during debugging.

I tried to add health_check settings to app.yaml like shown in https://cloud.google.com/appengine/docs/go/managed-vms/ :

health_check:
  enable_health_check: False

and tried different values for

  check_interval: 5
  timeout: 4
  unhealthy_threshold: 2
  healthy_threshold: 2
  restart_threshold: 60

but none of these changes did work.
enable_health_check: False seems to be ignored and so are most of the other settings (some cause an error) see https://code.google.com/p/googleappengine/issues/detail?id=11491

1条回答
我想做一个坏孩纸
2楼-- · 2019-04-30 03:07

From a comment from the issue you provided:

There's also an existing bug about the dev server (gcloud preview app run) not respecting the health_check setting. It's still using the old and deprecated 'vm_health_check'. To get your settings to take effect in the dev server you'll need to use vm_health_check for now.

So just use for now:

# health_check: # not yet supported, use instead
vm_health_check:
  enable_health_check: False

or change one of the following settings

  # check_interval: # this is an error in the documentation, use instead
  check_interval_sec: 5

  # timeout: 4 # didn't work with vm_health_check
  unhealthy_threshold: 2
  healthy_threshold: 2
  restart_threshold: 60
查看更多
登录 后发表回答