如何禁用“gcloud预览应用程序运行”的健康检查 [英] How to disable health checking for `gcloud preview app run`

查看:98
本文介绍了如何禁用“gcloud预览应用程序运行”的健康检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在运行本地管理虚拟机的开发服务器时禁用运行状况检查( gcloud preview app run app.yaml )?

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.

我试图添加 health_check 设置为 app.yaml ,如 https://cloud.google.com/appengine/docs/go/managed-vms/

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

尝试了不同的值

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

但这些更改都不起作用。

enable_health_check:False 似乎被忽略,其他大部分设置也会被忽略(有些会导致错误),请参阅 https://code.google.com/p/googleappengine/issues/detail?id=11491

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

推荐答案

从您提供的问题发表评论:

From a comment from the issue you provided:


还有一个关于dev服务器(gcloud预览应用程序
运行)的缺陷,并不尊重health_check设置。它仍然使用旧的
和不赞成使用的'vm_health_check'。要让你的设置在dev服务器中生效
,你现在需要使用vm_health_check。

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.

现在使用:
$ b

So just use for now:

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

或更改以下设置之一

  # 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

这篇关于如何禁用“gcloud预览应用程序运行”的健康检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆