Merge pull request #10469 from rook/mergify/bp/release-1.9/pr-10460

core: increase liveness probe timeout to 2s (backport #10460)
This commit is contained in:
mergify[bot] authored and GitHub committed 2022-06-19 07:25:40 +00:00
commit 57070e2636
2 files changed
+4

No files matched your search

+2
View File
@@ -53,6 +53,7 @@ const (
daemonTypeLabel = "ceph_daemon_type"
ExternalMgrAppName = "rook-ceph-mgr-external"
ServiceExternalMetricName = "http-external-metrics"
livenessProbeTimeoutSeconds int32 = 2
livenessProbeInitialDelaySeconds int32 = 10
startupProbeFailuresDaemonDefault int32 = 6 // multiply by 10 = effective startup timeout
// The OSD requires a long timeout in case the OSD is taking extra time to
@@ -583,6 +584,7 @@ func GenerateLivenessProbeExecDaemon(daemonType, daemonID string) *v1.Probe {
},
},
InitialDelaySeconds: livenessProbeInitialDelaySeconds,
TimeoutSeconds: livenessProbeTimeoutSeconds,
}
}
@@ -159,10 +159,12 @@ func TestGenerateLivenessProbeExecDaemon(t *testing.T) {
assert.Equal(t, expectedCommand, probe.ProbeHandler.Exec.Command)
assert.Equal(t, livenessProbeInitialDelaySeconds, probe.InitialDelaySeconds)
assert.Equal(t, livenessProbeTimeoutSeconds, probe.TimeoutSeconds)
// test with a mon so the delay should be 10
probe = GenerateLivenessProbeExecDaemon(config.MonType, "a")
assert.Equal(t, livenessProbeInitialDelaySeconds, probe.InitialDelaySeconds)
assert.Equal(t, livenessProbeTimeoutSeconds, probe.TimeoutSeconds)
}
func TestDaemonFlags(t *testing.T) {