Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report: /debug/health in vtorc returns false healthy state #17121

Open
timvaillancourt opened this issue Oct 30, 2024 · 0 comments · May be fixed by #17129
Open

Bug Report: /debug/health in vtorc returns false healthy state #17121

timvaillancourt opened this issue Oct 30, 2024 · 0 comments · May be fixed by #17129
Assignees
Labels
Component: VTorc Vitess Orchestrator integration Type: Bug

Comments

@timvaillancourt
Copy link
Contributor

timvaillancourt commented Oct 30, 2024

Overview of the Issue

vtorc will return a healthy state at /debug/health when it starts with an incorrect topo config

Returning true for health in this scenario can lead to the appearance of vtorc successfully deploying (if a deployment relies on /debug/health, examples kube/docker) when it is actually unable to reach the topology, making it (in my opinion) unhealthy

In this scenario I'd prefer for VTOrc to return "Healthy": false. In a rolling deployment that checks /debug/health this will mean a VTOrc deploy will fail on the 1st node instead of rolling out a bad config to all instances. I feel VTOrc must be able to do a trivial read from the topo, even if the topo is empty (no keyspaces/shards/tablets)

Reproduction Steps

  1. Start vtorc with a known-broken topology config:
tvaillancourt@tvailla-ltmxctu vitess % ./bin/vtorc --topo_global_server_address http://nowhere --topo_global_root /vitess --topo_implementation consul --port 15000
W1030 23:27:19.107977   71758 log.go:39] Failed to read in config : Config File "vtconfig" Not Found in "[/Users/tvaillancourt/github/timvaillancourt/vitess]". This is optional, and can be ignored if you are not using config files. For a detailed explanation, see https://github.com/vitessio/vitess/blob/main/doc/viper/viper.md#config-files.
E1030 23:27:19.207979   71758 tablet_discovery.go:98] Get "http://nowhere/v1/kv/vitess/cells/?keys=": dial tcp: lookup nowhere: no such host
E1030 23:27:19.208033   71758 keyspace_shard_discovery.go:41] Get "http://nowhere/v1/kv/vitess/keyspaces/?keys=": dial tcp: lookup nowhere: no such host
E1030 23:27:34.213108   71758 keyspace_shard_discovery.go:41] Get "http://nowhere/v1/kv/vitess/keyspaces/?keys=": dial tcp: lookup nowhere: no such host
E1030 23:27:34.213123   71758 tablet_discovery.go:98] Get "http://nowhere/v1/kv/vitess/cells/?keys=": dial tcp: lookup nowhere: no such host
...
  1. In a 2nd shell, test if vtorc is healthy:
tvaillancourt@tvailla-ltmxctu vitess % curl localhost:15000/debug/health
{
 "Healthy": true,
 "LastReported": "2024-10-30T23:27:55.231167+01:00"
}%

(notice it returns "Healthy": true)

Binary Version

v19-based fork/branch

Operating System and Environment details

N/A

Log Fragments

N/A
@timvaillancourt timvaillancourt added Type: Bug Needs Triage This issue needs to be correctly labelled and triaged Component: VTorc Vitess Orchestrator integration and removed Needs Triage This issue needs to be correctly labelled and triaged labels Oct 30, 2024
@timvaillancourt timvaillancourt self-assigned this Oct 30, 2024
@timvaillancourt timvaillancourt linked a pull request Oct 31, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: VTorc Vitess Orchestrator integration Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant