2020-02-14 05:34:04 UTC - navaneswarareddy: I am trying to import paramiko package but I am getting error for nacl wsk -i activation logs 5505bc12cf07404385bc12cf07604335 2020-02-14T05:30:34.315134437Z stderr: Traceback (most recent call last): 2020-02-14T05:30:34.315347469Z stderr: ImportError: Error relocating /action/virtualenv/lib/python3.5/site-packages/nacl/_sodium.abi3.so: __memcpy_chk: symbol not found 2020-02-14T05:30:34.324Z stderr: The action did not initialize or run as expected. Log data might be missing.
Any suggestions\help I'm basically blocked in my work while this issue exists. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581658444016400?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:39:17 UTC - Dominic Kim: Which runtime did you use and how did you import the package? https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581658757016500?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:40:24 UTC - Dominic Kim: Since there is no `paramiko` in the default dependencies list, I think you might try with zipping action? <https://github.com/apache/openwhisk/blob/master/docs/actions-python.md#python-3-actions> https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581658824016700?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:40:41 UTC - navaneswarareddy: I have followed <http://jamesthom.as/blog/2017/04/27/python-packages-in-openwhisk/> https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581658841017000?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:41:11 UTC - navaneswarareddy: Add the `virtualenv` folder and Python script to a new zip file. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581658871017300?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:43:03 UTC - navaneswarareddy: I followed the same approach zipping of my python script and virtualenv to a zip file https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581658983017500?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:43:34 UTC - Dominic Kim: So in your virtual env, there is the library? https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659014017700?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:44:10 UTC - navaneswarareddy: virtualenv/lib/python3.5/site-packages# ls bcrypt paramiko-2.7.1.dist-info pyjokescli bcrypt-3.1.7.dist-info pip PyNaCl-1.3.0.dist-info cffi pip-20.0.2.dist-info setuptools cffi-1.14.0.dist-info pip-20.0.2.dist-info.virtualenv setuptools-45.2.0.dist-info _cffi_backend.cpython-35m-x86_64-linux-gnu.so pkg_resources setuptools-45.2.0.dist-info.virtualenv cryptography __pycache__ six-1.14.0.dist-info cryptography-2.8.dist-info pycparser six.py easy_install.py pycparser-2.19.dist-info wheel nacl pyjokes wheel-0.34.2.dist-info paramiko pyjokes-0.6.0.dist-info wheel-0.34.2.dist-info.virtualenv https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659050017900?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:44:23 UTC - navaneswarareddy: Yes it is available https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659063018100?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:46:05 UTC - navaneswarareddy: docker# ls docker.zip __main__.py __pycache__ virtualenv https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659165018300?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:46:12 UTC - navaneswarareddy: zip -r docker.zip virtualenv __main__.py https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659172018500?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:46:39 UTC - Dominic Kim: hm.. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659199018700?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:47:21 UTC - navaneswarareddy: I am able to run it locally, but when i tried it in openwhisk i am facing nacl error https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659241018900?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:47:29 UTC - Dominic Kim: I suspect this issue comes from alpine. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659249019100?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:48:08 UTC - navaneswarareddy: Do we need to use another image instead of alpine ? https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659288019300?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:48:26 UTC - navaneswarareddy: Is there any another approach to overcome this issue https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659306019500?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:48:29 UTC - Dominic Kim: Could you share the full history of what you did that I can try with it? https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659309019700?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:48:36 UTC - navaneswarareddy: okay Sure https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659316019900?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:49:04 UTC - Dominic Kim: Did you just include paramiko with the commands in article James wrote? https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659344020100?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:49:31 UTC - navaneswarareddy: Yes i used only paramiko https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659371020400?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:49:56 UTC - navaneswarareddy: Let me share the code https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659396020600?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:50:19 UTC - Dominic Kim: ok https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659419020800?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:51:21 UTC - navaneswarareddy: import paramiko def main(params): hostname = 'host' username = 'root' password = 'password' cmd=["sudo yum update -y","sudo yum install docker-ce -y","sudo systemctl start docker","docker pull websphere-liberty:webProfile8","docker run -d -p 80:9080 -p 443:9443 websphere-liberty:webProfile8"] ssh_client=paramiko.SSHClient() ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh_client.connect(hostname=hostname,username=username,password=password) for x in cmd: stdin,stdout,stderr=ssh_client.exec_command(x) output=stdout.readlines() print (output) greeting = "Installed successfully" return {"joke":greeting} https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659481021000?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:54:03 UTC - navaneswarareddy: docker# python -V Python 3.5.6 white_check_mark : Dominic Kim https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659643021300?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:56:18 UTC - Dominic Kim: Since I have a meeting for the next 4 hours, it may take some time. Please bear with me. Other Whiskers may also help you in the meantime. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659778021600?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 05:56:35 UTC - navaneswarareddy: Okay Thanks https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581659795021800?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 07:20:55 UTC - Rodric Rabbah: @Michele Sciabarra is this related to the issues you’ve recently fixed https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581664855022800?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 07:53:04 UTC - Michele Sciabarra: no https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581666784023000?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 07:53:19 UTC - Michele Sciabarra: from what I see he is trying to install and run docker inside a docker image https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581666799023200?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 07:54:08 UTC - Michele Sciabarra: in the first place you do not have access https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581666848023400?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 07:54:36 UTC - Michele Sciabarra: to the docker socket in an action container https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581666876023600?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 07:55:17 UTC - Michele Sciabarra: in the second place the images are based on alpine or ubuntu and not on fedora/redhat so yum cannot work https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581666917023800?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 07:56:09 UTC - Michele Sciabarra: you should just build a virtualenv as a folder virtual env and include it in the action zip https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581666969024000?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 08:24:52 UTC - navaneswarareddy: I am trieng to connect to remote machine which is centos machine using python paramiko and installing docker on remote machine . For centos i am using yum as package manager https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581668692024300?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 10:31:46 UTC - navaneswarareddy: I found an alternate approach to use paramiko library which is not available as python dependencies list . created a custom Docker image as the action runtime .Below commands are used in Dockerfile. FROM openwhisk/python3action:latest RUN apk add make RUN apk add --update py-pip RUN pip install --upgrade pip RUN pip install paramiko Now i am able to use python paramiko to connect and run commands on remote machine. +1 : Dominic Kim https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581676306024800?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 10:33:09 UTC - Dominic Kim: oh, I was working on it with the same approach. But you already did. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581676389025000?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 10:33:44 UTC - Dominic Kim: I found `make` and `libssl1.0` which are required by `paramiko(nacl)` was not in our python runtime. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581676424025200?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 11:49:13 UTC - Justin Halsall: Has anyone been able to deploy functions with the serverless(.com) framework to the IBM cloud recently? I keep getting: ```$ serverless deploy Failed to deploy function (serverless-test-dev-hello) due to error: PUT <https://eu-de.functions.cloud.ibm.com/api/v1/namespaces/2addab0d-xxx-4945-8967-xxx/actions/serverless-test-dev-hello?overwrite=true> Returned HTTP 403 (Forbidden) --> "The supplied authentication is not authorized to access '2addab0d-xxx-4945-8967-xxx/serverless-test-dev-hello'."``` https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581680953027200 ---- 2020-02-14 14:29:45 UTC - Michele Sciabarra: @navaneswarareddy ah ok I missed you were executing remotely and not locally the command - I saw the cli and I thought you were going to use a local exec https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581690585027300?thread_ts=1581658444.016400&cid=C3TPCAQG1 ---- 2020-02-14 17:32:51 UTC - Rodric Rabbah: nice article @Will Plusnick :clap: +1 : Carlos Santana https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581701571028300 ---- 2020-02-14 17:33:14 UTC - Will Plusnick: Thank you :slightly_smiling_face: https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581701594028500 ---- 2020-02-14 17:35:40 UTC - Will Plusnick: @Justin Halsall I have a feeling that has to do with the recent changes in the IAM namespace stuff. Have you tried using a CF namespace? https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581701740029400 ---- 2020-02-14 17:37:05 UTC - Will Plusnick: If it works on a CF namespace, then it is probably an IAM issue that we will need to investigate. Let me know, and I can report it to our team. Also, nice to see you are still active in this community! I was wondering what you have been up to. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581701825030900 ---- 2020-02-14 21:57:43 UTC - Bilal: Where in Openwhisk is the logic/logs for when one makes a 400 Bad Request to an action? The action is not invoked so I'm guessing this happened either at the controller or the nginx level. https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1581717463032700?thread_ts=1581717463.032700&cid=C3TPCAQG1 ----