You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwhisk.apache.org by OpenWhisk Team Slack <ra...@apache.org> on 2019/10/23 09:12:34 UTC

[slack-digest] [2019-10-22] #general

2019-10-22 09:00:07 UTC - Pepi Paraskevoulakou: ok i found it!  thank you!
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1571734807033900?thread_ts=1571678924.030300&cid=C3TPCAQG1
----
2019-10-22 13:20:15 UTC - Adrian Schuepbach: Dear all

I recently deployed the newest version of OpenWhisk
(with helm and latest openwhisk master) to a kubernetes
cluster from scratch.

Since the new installation, I cannot reliably run python2actions
anymore, which used to worke nicely before with the older OpenWhisk
installation.

To double-check, I run the function code standalone
in a python2action container (I started one manually on my kubernets
and use the invoke.py to call /init and /run). This works fine.


when I run the same python code with `wsk action invoke functionname`
it sometimes works and sometimes only says
"The action did not initialize or run as expected. Log data might be missing.".
This message appears before the timeout and the activation shows
"timeout: false".

Also, none of the print() statements of my python action code appears
in the logs.

However, the main() function of my python code seems to be called.
I added an infinite loop and noticed that in this case the action
runs until the timeout and the activation then shows "timeout: true".

What could cause the message:

"The action did not initialize or run as expected. Log data might be missing."?

How could I debug or what do I have to search for?


Thanks a lot
Adrian
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1571750415034200
----
2019-10-22 13:20:37 UTC - Adrian Schuepbach: 
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1571750437034300?thread_ts=1571750437.034300&cid=C3TPCAQG1
----
2019-10-22 14:08:57 UTC - Krzysztof Sobkowiak: Hi. I think I had the same problem. My old python action looked like this

`def main(params):`
`   print "Py msgaction params: " + str(params)`
`   for key in params["body"]:`
`        print key, params["body"][key]        `
`   return { "payload" : `
`	"Hello " + str(params["body"]["text"]) + " from Python on OpenWhisk on OpenShift"}`

I had to add parenthesis in the `print` function and it works now

`def main(params):`
`   print ("Py msgaction params: " + str(params))`
`   for key in params["body"]:`
`        print(key, params["body"][key])`
`   return { "payload" : `
`	"Hello " + str(params["body"]["text"]) + " from Python on OpenWhisk on OpenShift"}`
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1571753337034600?thread_ts=1571750437.034300&cid=C3TPCAQG1
----
2019-10-22 14:17:12 UTC - Krzysztof Sobkowiak: Try to check the failed activation log

`wsk -i activation logs &lt;activation id here&gt;`
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1571753832035100?thread_ts=1571750437.034300&cid=C3TPCAQG1
----
2019-10-22 14:31:48 UTC - Adrian Schuepbach: Hi, thanks for the answer. Actualli I already had parenthesis in the `print` functions, so it must be a different problem.

This is the output of `wsk -i activation logs e15a43946ede48aa9a43946edee8aa38`:

`2019-10-22T14:10:04.910Z       stderr: The action did not initialize or run as expected. Log data might be missing.`
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1571754708035600?thread_ts=1571750437.034300&cid=C3TPCAQG1
----
2019-10-22 14:35:05 UTC - Adrian Schuepbach: Around 6 months ago, when I indeed did not have parenthesis, there was always a Python exception in the activation logs, so the system told me that I need parenthesis.

What I am missing now in the logs is the cause. There is no exception or any other error message, except the line saying that it did not initialize and logs might be missing, which is indeed the case.
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1571754905035800?thread_ts=1571750437.034300&cid=C3TPCAQG1
----
2019-10-22 23:41:08 UTC - zyqCSL: Hi guys, is there any example script for deploying openwhisk distributedly with ansible?
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1571787668036800
----