openwhisk icon indicating copy to clipboard operation
openwhisk copied to clipboard

Not able to run any function in Openwhisk after running an empty action

Open Rajiv2605 opened this issue 3 years ago • 0 comments

Environment details:

  • Kubernetes v1.22.6
  • Ubuntu 20.04.4 LTS
  • Docker 20.10.12, build 20.10.12-0ubuntu2~20.04.1

Steps to reproduce the issue:

I had an Openwhisk setup deployed on Kubernetes which was working well. For experimentation, I created an action called empty with an empty file named empty.js just to see what will happen. When I invoked it with wsk -i action invoke empty --result, it gave the following output:

{
    "error": "Missing main/no code to execute."
}

which is the correct and expected output. Till here everything is fine. After this, when I try to invoke any other actions which have the function code and were working fine before I tried the empty action, they also give the same error as the empty action. Now, when I try the hello.js function:

function main(params) {
    var name = params.name || 'World';
    return {payload:  'Hello, ' + name + '!'};
}

Instead of returning the expected payload, it outputs:

{
    "error": "Missing main/no code to execute."
}

Same for other nodejs actions which were working before but stopped working after I tried the empty action. I tried a python based action (name: prime, calculates nth prime number) which used to work before as expected. But now, it throws the following error:

{
    "error": "Error unmarshaling request: json: cannot unmarshal object into Go struct field initBodyRequest.value.code of type string"
}

In the invoker logs, I see the following messages:

[2022-08-31T07:28:00.090Z] [ERROR] [#tid_sid_unknown] [ContainerProxy] Failed during init of cold container Some(ContainerId(wskowdev-invoker-00-11-guest-prime)), queued activations will be aborted.
[2022-08-31T07:28:00.090Z] [INFO] [#tid_sid_invokerNanny] [KubernetesClient] Deleting pod wskowdev-invoker-00-11-guest-prime [marker:invoker_kubeapi.delete_start:2767737]

For the nodejs actions, the invoker logs show:

[2022-08-30T17:53:48.891Z] [ERROR] [#tid_sid_unknown] [ContainerProxy] Failed during init of cold container Some(ContainerId(wskowdev-invoker-00-68-prewarm-nodejs14)), queued activations will be aborted.
[2022-08-30T17:53:48.892Z] [INFO] [#tid_sid_invokerNanny] [KubernetesClient] Deleting pod wskowdev-invoker-00-68-prewarm-nodejs14 [marker:invoker_kubeapi.delete_start:34393634]

I have tried to uninstall and re-install the owdev cluster which removed all the functions. I performed kubeadm reset as well. Still the same error.

The issue is discussed here: https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1661878664234569

Is this a bug?

Rajiv2605 avatar Aug 31 '22 07:08 Rajiv2605