operator icon indicating copy to clipboard operation
operator copied to clipboard

Updating Activator's `terminationGracePeriodSeconds` value

Open psschwei opened this issue 3 years ago • 21 comments

Hello everyone.

I am also interested in setting max-revision-timeout-seconds to a larger value. However I can't find how to update the terminationGracePeriod in activator.

From @mkyrilov 's comment in Serving:

I am using the operator to install Knative Serving:

apiVersion: operator.knative.dev/v1beta1
kind: KnativeServing
metadata:
  name: knative-serving
  namespace: knative-serving
spec:
  version: 1.8.0 # Same version as the operator
  config:
    defaults:
      max-revision-timeout-seconds: "7200" # 120 minutes
    domain:
      kn.example.com: "" # your DNS
    features:
      kubernetes.podspec-persistent-volume-claim: "enabled"
      kubernetes.podspec-persistent-volume-write: "enabled"
      kubernetes.podspec-affinity: "enabled"
      kubernetes.podspec-tolerations: "enabled"
      kubernetes.podspec-init-containers: "enabled"
    istio:
      gateway.knative-serving.knative-ingress-gateway: istio-ingressgateway.istio-ingress.svc.cluster.local

Does anyone know how to achieve this?


I did try editing the activator deployment manually. It updates fine, but then immediately gets reverted back. I am assuming the operator does this.

psschwei avatar Dec 08 '22 20:12 psschwei

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Mar 09 '23 01:03 github-actions[bot]

/remove-lifecycle stale

mkyrilov avatar Mar 09 '23 18:03 mkyrilov

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Jun 08 '23 01:06 github-actions[bot]

/remove-lifecycle stale

mkyrilov avatar Jun 08 '23 07:06 mkyrilov

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Sep 07 '23 01:09 github-actions[bot]

/remove-lifecycle stale

mkyrilov avatar Sep 08 '23 22:09 mkyrilov

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Dec 08 '23 01:12 github-actions[bot]

/remove-lifecycle stale

mkyrilov avatar Dec 10 '23 02:12 mkyrilov

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Mar 10 '24 01:03 github-actions[bot]

/remove-lifecycle stale

mkyrilov avatar Mar 15 '24 00:03 mkyrilov

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Jun 13 '24 01:06 github-actions[bot]

/remove-lifecycle stale

mkyrilov avatar Jun 13 '24 16:06 mkyrilov

@psschwei did you find a solution?

I tried increasing max-revision-timeout-seconds, but when trying long requests I'm getting this error: activator request timeout

I believe I could soulve that by increasing the Activator's terminationGracePeriodSeconds value

CarlosDomingues avatar Jun 26 '24 15:06 CarlosDomingues

@CarlosDomingues this wasn't my issue, I was just moving @mkyrilov 's comments into this repo

cc @houshengbo

psschwei avatar Jun 26 '24 15:06 psschwei

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Sep 25 '24 01:09 github-actions[bot]

/remove-lifecycle stale

mkyrilov avatar Sep 25 '24 15:09 mkyrilov

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Dec 25 '24 01:12 github-actions[bot]

/remove-lifecycle stale

mkyrilov avatar Dec 28 '24 16:12 mkyrilov

So far, knative operator does not support the configuration of terminationGracePeriodSeconds in all deployment resources. It reverts to the default value 600, even if you manually change it.

houshengbo avatar Jan 31 '25 21:01 houshengbo

Downstream we use extension logic to set this. I think I can bring it upstream to be part of the core logic, I am not sure if we really need overrides for the terminationGracePeriodSeconds for all deployments. It makes sense for the data plane component (activator) especially when the default value for max-revision-timeout-seconds changes. @houshengbo wdyth?

skonto avatar Mar 06 '25 09:03 skonto

So if that's the case, then is it accurate to say that, when using the knative serving operator, we will not be able to have requests that run longer than 600 seconds no matter what we set the various timeouts to?

apshoemaker avatar Apr 29 '25 14:04 apshoemaker

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Jul 29 '25 01:07 github-actions[bot]