apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.54k stars 1.17k forks source link

Update Max memory and time OpenWhisk Backend - Fails Actions updated to use the new values #4962

Open rads18 opened 4 years ago

rads18 commented 4 years ago

Environment details:

*Kubernetes, kubernetes 1.13

Docker version 18.09.7

Steps to reproduce the issue:

  1. Changed the default max for memory and time as below: actions: time: min: "100ms"

    LT: Updated

    max: "5m"

    max: "15m"

    LT

    std: "1m" memory: min: "128m"

    LT: Updated

    max: "512m"

    max: "1024m"

    LT

    std: "256m"

  2. Post change create or update any function (python3) to use new max Like change the function to use "-m 768" or '-m 1024" . The function fails to work and errors out with response "response": { "status": "whisk internal error", "statusCode": 0, "success": false, "result": { "error": "Action version is not compatible and cannot be invoked." } }
  3. However, updating the function back to the old max still works.
  4. There are no errors in updating function to the new max memory number only when invoking the function it fails.
  5. invoker was restarted as per my knowledge but no difference.

Provide the expected results and outputs:

The function should be transparent to this memory update

Provide the actual results and outputs:

output comes here

Additional information you deem important:

style95 commented 4 years ago

How did you increase the limits? Did you increase the system limits as well?

rads18 commented 4 years ago

yes Openwhisk was configured to the new limits if thats what you mean?

rads18 commented 4 years ago

hello team, Can someone provide me insight if there is something we am doing wrong or this falls in as a bug? If it is possible to increase the default system limits on action I'd appreciate if you could share a link on steps (assuming it is documented) so we can investigate what we did wrong.

thank you!

style95 commented 4 years ago

Since in our downstream, we are running OpenWhisk with higher memory and time limits, I am suspicious the way you configured new limits.

Could you share the details on how did you configure them?

rads18 commented 4 years ago

Hi style

The team member that admins that environment is OOO at the moment if you can share which file do you expect these changes to be made?

(the content of the file i have shared in my initial post) thanks

style95 commented 4 years ago

Those configurations conform to this file: https://github.com/apache/openwhisk/blob/master/common/scala/src/main/resources/application.conf#L437

And I think you can configure them with these ansible variables. https://github.com/apache/openwhisk/blob/05ed4e18eb53f5630735ffbe28726dce5a3481b5/ansible/roles/controller/tasks/deploy.yml#L212 https://github.com/apache/openwhisk/blob/05ed4e18eb53f5630735ffbe28726dce5a3481b5/ansible/roles/controller/tasks/deploy.yml#L216

rads18 commented 4 years ago

Thank you style for your inputs, i will be testing these with the admin in next day or so after they return. i found the ansible variable quite interesting , are these being set for a play called by OpenWhisk(OW) admin privileges ? Is there a way for me to pass when calling the action from ansible? or action parameters at whisk?

Note: I am not the admin for OW but have complete access in my namepsace on OW.

rads18 commented 4 years ago

Hi Style,

I checked with my admin and they did update the controller file and also see the new values when they describe the pod on openwhisk-controller.

I have attached configuration file with new values. We basically took the max to 1MB.

Please let me know your thoughts thanks

( i dont see a way to attach so including it in here) The file name is openwhisk-controller_0.yaml

`apiVersion: v1 kind: Pod metadata: annotations: kubernetes.io/psp: aaaa-vault-psp creationTimestamp: "2020-09-03T20:06:54Z" generateName: openwhisk-controller- labels: app: openwhisk-openwhisk chart: openwhisk-0.1.6 controller-revision-hash: openwhisk-controller-6f6587bfb8 heritage: Tiller name: openwhisk-controller release: openwhisk statefulset.kubernetes.io/pod-name: openwhisk-controller-0 name: openwhisk-controller-0 namespace: openwhisk ownerReferences:

style95 commented 4 years ago

Those configurations are system-wide configurations and users can change action metadata within those limits. And your k8s configurations look fine on the surface. Are you still unable to update your action limits accordingly?

rads18 commented 4 years ago

Just to clarify my initial post again the action allows me to set the new limits but fails with "Internal Whisk error", in env A. However, we did a fresh setup in another environment(B) recently where the new limits were setup during install and those work fine.

This means in existing env A we are missing some configuration file which does not allow the setup to work. We can reinstall the existing environment with new higher limits but i dont believe it to be a good solution, specially to reinstall for anytime the environment variables change.