From c2cf45e71646dd0752e4e739fcc5ad3560197f1c Mon Sep 17 00:00:00 2001 From: Santosh Date: Fri, 24 Apr 2026 14:20:04 +0530 Subject: [PATCH] core: remove newlines from liveness probe scripts Strip unnecessary leading and trailing newlines from osdLivenessProbeScript and livenessProbeScript raw string literals in spec.go Signed-off-by: Santosh (cherry picked from commit 925acb3e923fc59e684582f82536932871d45b7a) --- pkg/operator/ceph/controller/spec.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkg/operator/ceph/controller/spec.go b/pkg/operator/ceph/controller/spec.go index 7e98c9f12..4b677948e 100644 --- a/pkg/operator/ceph/controller/spec.go +++ b/pkg/operator/ceph/controller/spec.go @@ -82,25 +82,21 @@ type daemonConfig struct { var logger = capnslog.NewPackageLogger("github.com/rook/rook", "ceph-spec") var ( - osdLivenessProbeScript = ` -outp="$(ceph --admin-daemon %s %s 2>&1)" + osdLivenessProbeScript = `outp="$(ceph --admin-daemon %s %s 2>&1)" rc=$? if [ $rc -ne 0 ] && [ ! -f /tmp/osd-sleep ]; then echo "ceph daemon health check failed with the following output:" echo "$outp" | sed -e 's/^/> /g' exit $rc -fi -` +fi` - livenessProbeScript = ` -outp="$(ceph --admin-daemon %s %s 2>&1)" + livenessProbeScript = `outp="$(ceph --admin-daemon %s %s 2>&1)" rc=$? if [ $rc -ne 0 ]; then echo "ceph daemon health check failed with the following output:" echo "$outp" | sed -e 's/^/> /g' exit $rc -fi -` +fi` cronLogRotate = ` CEPH_CLIENT_ID=%s