core: increase liveness probe timeout to 2s

we have noticed multiple failures because of the probe
failing, most of the time it's due to fewer resources.
But increasing timeout fixes that, so increasing the
probe timeout to 2s from default 1s so that it will
give more time to probe before failing.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 62f0fb2b1d)
This commit is contained in:
subhamkrai authored and Mergify committed 2022-06-17 18:12:21 +00:00
1 parent 096f08287e
commit f16ac1dfd0
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) {