diff --git a/pkg/operator/ceph/controller/spec.go b/pkg/operator/ceph/controller/spec.go index feb02d729..d11ada868 100644 --- a/pkg/operator/ceph/controller/spec.go +++ b/pkg/operator/ceph/controller/spec.go @@ -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, } } diff --git a/pkg/operator/ceph/controller/spec_test.go b/pkg/operator/ceph/controller/spec_test.go index 0dee5c7f7..ffbcdf41e 100644 --- a/pkg/operator/ceph/controller/spec_test.go +++ b/pkg/operator/ceph/controller/spec_test.go @@ -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) {