Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cspi): add timeout seconds in zfs cmd used for liveness probe and safe-evict annotation on CSP #1546

Conversation

prateekpandey14
Copy link
Contributor

@prateekpandey14 prateekpandey14 commented Dec 11, 2019

What this PR does / why we need it:

  • 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 refer feat(CA): safe-to-evict to false to disable scaledown for CSPI pods #1481
k get pods cspc-sparse-jbhs-666bcf6788-thtgf -oyaml
apiVersion: v1
kind: Pod
metadata:
  annotations:
    cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
    openebs.io/monitoring: pool_exporter_prometheus
    prometheus.io/path: /metrics
    prometheus.io/port: "9500"
    prometheus.io/scrape: "true"
  creationTimestamp: "2019-12-11T10:02:06Z"
  generateName: cspc-sparse-jbhs-666bcf6788-
  labels:
    app: cstor-pool
    openebs.io/cstor-pool-cluster: cspc-sparse
    openebs.io/cstor-pool-instance: cspc-sparse-jbhs
    openebs.io/version: 1.5.0
    pod-template-hash: 666bcf6788
- env:
    - name: OPENEBS_IO_CSTOR_ID
      value: 83d34ac9-0e1a-4ef1-9260-0aef4b22dd18
    - name: OPENEBS_IO_POOL_NAME
      value: 8cfb0830-745c-4a26-8319-819675c29383
    image: openebs/cstor-pool:ci
    imagePullPolicy: IfNotPresent
    lifecycle:
      postStart:
        exec:
          command:
          - /bin/sh
          - -c
          - sleep 2
    livenessProbe:
      exec:
        command:
        - /bin/sh
        - -c
        - timeout 300 zfs set io.openebs:livenesstimestamp="$(date +%s)" cstor-$OPENEBS_IO_POOL_NAME

Signed-off-by: prateekpandey14 [email protected]

@prateekpandey14 prateekpandey14 added the pr/upgrade-changes-pending This PR requires upgrade changes to be automated label Dec 11, 2019
@prateekpandey14 prateekpandey14 force-pushed the add-timeout-and-safe-to-evict branch from b0518ff to a0c746b Compare December 11, 2019 09:42
@prateekpandey14 prateekpandey14 changed the title fix(csp): add timeout seconds in zfs cmd used for liveness probe fix(cspi): add timeout seconds in zfs cmd used for liveness probe Dec 11, 2019
@prateekpandey14 prateekpandey14 force-pushed the add-timeout-and-safe-to-evict branch from a0c746b to c24bcbc Compare December 11, 2019 10:32
@prateekpandey14 prateekpandey14 force-pushed the add-timeout-and-safe-to-evict branch from c24bcbc to 9581e52 Compare December 11, 2019 12:43
@sonasingh46 sonasingh46 changed the title fix(cspi): add timeout seconds in zfs cmd used for liveness probe fix(cspi): add timeout seconds in zfs cmd used for liveness probe and safe-evict annotation on CSP Dec 11, 2019
Copy link

@mittachaitu mittachaitu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes are good

@prateekpandey14 prateekpandey14 force-pushed the add-timeout-and-safe-to-evict branch from 9581e52 to 5fe42f2 Compare December 11, 2019 12:50
- 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]>
@prateekpandey14 prateekpandey14 force-pushed the add-timeout-and-safe-to-evict branch from 5fe42f2 to 2d73070 Compare December 11, 2019 12:52
@vishnuitta vishnuitta merged commit 394e23d into openebs-archive:master Dec 11, 2019
prateekpandey14 added a commit to prateekpandey14/maya that referenced this pull request Dec 11, 2019
…enebs-archive#1546)

- 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]>
kmova pushed a commit that referenced this pull request Dec 11, 2019
)

- 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]>
shubham14bajpai pushed a commit to shubham14bajpai/maya that referenced this pull request Dec 27, 2019
…enebs-archive#1546)

- 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]>
@kmova kmova added this to the 1.5.0 milestone Jan 2, 2020
@prateekpandey14 prateekpandey14 deleted the add-timeout-and-safe-to-evict branch June 19, 2020 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/upgrade-changes-pending This PR requires upgrade changes to be automated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants