Skip to content

Commit

Permalink
ceph: do not use http for mgr liveness probe
Browse files Browse the repository at this point in the history
When private/public network have been defined in the Ceph rook cluster it is not
possible to configure properly the ip address of the liveness probe
for the manager.
Changes in the manager in Pacific introduced this regression.

This change replaces the http probe by a command probe, avoiding thus to
determine what is going to be the ip address of the manager before launching
the pod.

fixes: #8510

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
  • Loading branch information
jmolmo authored and mergify-bot committed Sep 20, 2021
1 parent a357db9 commit 7fbd9f2
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions pkg/operator/ceph/cluster/mgr/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
apps "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)

const (
Expand Down Expand Up @@ -186,7 +185,7 @@ func (c *Cluster) makeMgrDaemonContainer(mgrConfig *mgrConfig) v1.Container {
),
Resources: cephv1.GetMgrResources(c.spec.Resources),
SecurityContext: controller.PodSecurityContext(),
LivenessProbe: getDefaultMgrLivenessProbe(),
LivenessProbe: controller.GenerateLivenessProbeExecDaemon(config.MgrType, mgrConfig.DaemonID),
WorkingDir: config.VarLogCephDir,
}

Expand Down Expand Up @@ -254,18 +253,6 @@ func (c *Cluster) makeCmdProxySidecarContainer(mgrConfig *mgrConfig) v1.Containe
return container
}

func getDefaultMgrLivenessProbe() *v1.Probe {
return &v1.Probe{
Handler: v1.Handler{
HTTPGet: &v1.HTTPGetAction{
Path: "/",
Port: intstr.FromInt(int(DefaultMetricsPort)),
},
},
InitialDelaySeconds: 60,
}
}

// MakeMetricsService generates the Kubernetes service object for the monitoring service
func (c *Cluster) MakeMetricsService(name, activeDaemon, servicePortMetricName string) (*v1.Service, error) {
labels := c.selectorLabels(activeDaemon)
Expand Down

0 comments on commit 7fbd9f2

Please sign in to comment.