Skip to content

Commit

Permalink
fix(cspi): add timeout seconds in zfs cmd used for liveness probe (#1546
Browse files Browse the repository at this point in the history
)

- add 120 seconds cmd timeout value for zfs command which will
  kill the cmd process if it exceeds more than 120 seconds and
  returns non-zero exit status.
- Change Probe timeout seconds to 150 seconds.
- Change PeriodSeconds interval to 60 seconds.
- add safe-to-evict to false to disable scaledown for CSP pods

Signed-off-by: prateekpandey14 <[email protected]>
  • Loading branch information
prateekpandey14 authored and vishnuitta committed Dec 11, 2019
1 parent 189a831 commit 394e23d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/cspc-operator/app/storagepool_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,13 @@ func getPoolLivenessProbe() *corev1.Probe {
probe := &corev1.Probe{
Handler: corev1.Handler{
Exec: &corev1.ExecAction{
Command: []string{"/bin/sh", "-c", "zfs set io.openebs:livenesstimestamp=\"$(date +%s)\" cstor-$OPENEBS_IO_POOL_NAME"},
Command: []string{"/bin/sh", "-c", "timeout 120 zfs set io.openebs:livenesstimestamp=\"$(date +%s)\" cstor-$OPENEBS_IO_POOL_NAME"},
},
},
FailureThreshold: 3,
InitialDelaySeconds: 300,
PeriodSeconds: 10,
TimeoutSeconds: 300,
PeriodSeconds: 60,
TimeoutSeconds: 150,
}
return probe
}
Expand Down
1 change: 1 addition & 0 deletions pkg/install/v1alpha1/cstor_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ spec:
prometheus.io/path: /metrics
prometheus.io/port: "9500"
prometheus.io/scrape: "true"
cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
spec:
serviceAccountName: {{ .Config.ServiceAccountName.value }}
nodeSelector:
Expand Down

0 comments on commit 394e23d

Please sign in to comment.