Skip to content

Commit 3db41d8

Browse files
committed
[k8sops] Remove liveness probes from DB
We already use readiness probes to make sure dbnodes are bootstrapped before taking various actions. Liveness probes are usually a good idea, but in the case of the DB we'd rather a deadlocked node remain up so we can debug vs. automatically killing it.
1 parent 5d3e770 commit 3db41d8

File tree

3 files changed

+1
-33
lines changed

3 files changed

+1
-33
lines changed

pkg/k8sops/m3db/generators.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ const (
4444
_probeInitialDelaySeconds = 10
4545
_probeFailureThreshold = 15
4646

47-
_probePathHealth = "/health"
48-
_probePathReady = "/bootstrappedinplacementornoplacement"
47+
_probePathReady = "/bootstrappedinplacementornoplacement"
4948

5049
_dataDirectory = "/var/lib/m3db/"
5150
_dataVolumeName = "m3db-data"

pkg/k8sops/m3db/generators_test.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,6 @@ func TestGenerateStatefulSet(t *testing.T) {
8585

8686
ssName := StatefulSetName(clusterName, 0)
8787

88-
health := &v1.Probe{
89-
TimeoutSeconds: _probeTimeoutSeconds,
90-
InitialDelaySeconds: _probeInitialDelaySeconds,
91-
FailureThreshold: _probeFailureThreshold,
92-
Handler: v1.Handler{
93-
HTTPGet: &v1.HTTPGetAction{
94-
Port: intstr.FromInt(PortM3DBHTTPNode),
95-
Path: _probePathHealth,
96-
Scheme: v1.URISchemeHTTP,
97-
},
98-
},
99-
}
100-
10188
readiness := &v1.Probe{
10289
TimeoutSeconds: _probeTimeoutSeconds,
10390
InitialDelaySeconds: _probeInitialDelaySeconds,
@@ -172,7 +159,6 @@ func TestGenerateStatefulSet(t *testing.T) {
172159
Containers: []v1.Container{
173160
{
174161
Name: ssName,
175-
LivenessProbe: health,
176162
ReadinessProbe: readiness,
177163
SecurityContext: &v1.SecurityContext{
178164
RunAsUser: pointer.Int64Ptr(20),

pkg/k8sops/m3db/statefulset.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,6 @@ func NewBaseStatefulSet(ssName, isolationGroup string, cluster *myspec.M3DBClust
6666

6767
objAnnotations := annotations.PodAnnotations(cluster)
6868

69-
// TODO(schallert): we're currently using the health of the coordinator for
70-
// liveness probes until https://github.com/m3db/m3/issues/996 is fixed. Move
71-
// to the dbnode's health endpoint once fixed.
72-
probeHealth := &v1.Probe{
73-
TimeoutSeconds: _probeTimeoutSeconds,
74-
InitialDelaySeconds: _probeInitialDelaySeconds,
75-
FailureThreshold: _probeFailureThreshold,
76-
Handler: v1.Handler{
77-
HTTPGet: &v1.HTTPGetAction{
78-
Port: intstr.FromInt(PortM3DBHTTPNode),
79-
Path: _probePathHealth,
80-
Scheme: v1.URISchemeHTTP,
81-
},
82-
},
83-
}
84-
8569
probeReady := &v1.Probe{
8670
TimeoutSeconds: _probeTimeoutSeconds,
8771
InitialDelaySeconds: _probeInitialDelaySeconds,
@@ -110,7 +94,6 @@ func NewBaseStatefulSet(ssName, isolationGroup string, cluster *myspec.M3DBClust
11094
Name: ssName,
11195
SecurityContext: specSecurityCtx,
11296
ReadinessProbe: probeReady,
113-
LivenessProbe: probeHealth,
11497
Command: []string{
11598
"m3dbnode",
11699
},

0 commit comments

Comments
 (0)