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 2010/01/01 00:01:01 UTC

[slack-digest] [2022-07-07] #general

2022-07-07 03:22:30 UTC - Lyudmila Sun: Hi all,

I am trying to deploying Openwhisk on both Windows Docker Desktop k8s cluster and a self-built k8s cluster (1 master 1 worker, both Ubuntu 22.04 Virtualbox VM), but failed with some common issues.

docker version 20.10 for both
k8s version 1.22 for Windows Desktop and 1.21 for Ubuntu VM
Helm version 3.4.2

My steps are just download the <https://github.com/apache/openwhisk-deploy-kube/releases|latest release>, put a `mycluster.yml` into the folder (show below), and then run `helm install owdev ./helm/openwhisk -n openwhisk --create-namespace -f mycluster.yml`

Issues:

1. the kafka and redis pods keep Pending with event log as below:
```  Type     Reason            Age                  From               Message
  ----     ------            ----                 ----               -------
  Warning  FailedScheduling  40s (x9 over 6m17s)  default-scheduler  0/2 nodes are available: 2 pod has unbound immediate PersistentVolumeClaims.  ```
I follow <https://github.com/apache/openwhisk-deploy-kube/blob/952fb0df07949dda32d9c5de76efcbf73671cb0c/docs/troubleshooting.md|the troubleshooting direction on github> to <https://github.com/apache/openwhisk-deploy-kube/blob/952fb0df07949dda32d9c5de76efcbf73671cb0c/docs/configurationChoices.md|the presistence section of this document> and refresh `mycluster.yml` to the the this:

```whisk:
  ingress:
    type: NodePort
    apiHostName: localhost
    apiHostPort: 31001
    useInternally: false

nginx:
  httpsNodePort: 31001

# disable presistence
k8s:
  persistence:
    enabled: false
    
# A single node cluster; so disable affinity
affinity:
  enabled: false
toleration:
  enabled: false
invoker:
  options: "-Dwhisk.kubernetes.user-pod-node-affinity.enabled=false"```
But it does not work

2. <https://github.com/apache/openwhisk-deploy-kube/issues/596|Still cannot fix this issue #596.>

3. While deploying, I check the log of the gen-cert pod, and it prints some as below:

```Error from server (NotFound): secrets "owdev-nginx" not found
generating new owdev-nginx secret
generating server certificate request
Can't load /root/.rnd into RNG
139724831396288:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/root/.rnd
generating self-signed password-less server certificate
Signature ok
subject=C = US, ST = NY, L = Yorktown, O = OpenWhisk, CN = *.localhost
Getting Private key
generate keystore
secret/owdev-nginx created```
I am wondering if the `Can't load /root/.rnd into RNG` part will affect the result of deployment.


Thanks a lot if someone would help.
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1657164150959179
----
2022-07-07 15:35:48 UTC - piby: Hey all,

After resolving multiple issues on EKS, I am now stuck again with an issue with “install-packages” job. npm is throwing an error when trying to install packages. Could anyone provide me any hint why this is happening?

I have tried different values for apiHostName and apiPort but nothing is working.

I can resolve the DNS within the cluster 

```kubectl exec -n openwhisk -it pod/curl -- curl  <http://owdev-nginx.openwhisk.svc.cluster.local:80|http://owdev-nginx.openwhisk.svc.cluster.local:80>
{"api_paths":["/api/v1"],"description":"OpenWhisk","limits":{"actions_per_minute":2000,"concurrent_actions":240,"max_action_duration":300000,"max_action_logs":<tel:10485760|10485760>,"max_action_memory":<tel:536870912|536870912>,"min_action_duration":100,"min_action_logs":0,"min_action_memory":<tel:134217728|134217728>,"sequence_length":50,"triggers_per_minute":2000},"runtimes":{"rust":[{"attached":true,"default":true,"deprecated":false,"image":"openwhisk/action-rust-v1.34:1.1.0","kind":"rust:1.34","requireMain":false}],"nodejs":[{"attached":true,"default":true,"deprecated":false,"image":"openwhisk/action-nodejs-v10:1.16.0","kind":"nodejs:10","requireMain":false},{"attached":true,"default":false,"deprecated":false,"image":"openwhisk/action-nodejs-v12:1.16.0","kind":"nodejs:12","requireMain":false},{"attached":true,"default":false,"deprecated":false,"image":"openwhisk/action-nodejs-v14:1.16.0","kind":"nodejs:14","requireMain":false}],"java":[{"attached":true,"default":true,"deprecated":false,"image":"openwhisk/java8action:1.15.0","kind":"java:8","requireMain":true}],"go":[{"attached":true,"default":false,"deprecated":true,"image":"openwhisk/action-golang-v1.11:1.15.0","kind":"go:1.11","requireMain":false},{"attached":true,"default":true,"deprecated":false,"image":"openwhisk/action-golang-v1.15:1.16.0","kind":"go:1.15","requireMain":false}],"php":[{"attached":true,"default":false,"deprecated":false,"image":"openwhisk/action-php-v7.3:1.15.0","kind":"php:7.3","requireMain":false},{"attached":true,"default":true,"deprecated":false,"image":"openwhisk/action-php-v7.4:1.15.0","kind":"php:7.4","requireMain":false}],"python":[{"attached":true,"default":true,"deprecated":false,"image":"openwhisk/python3action:1.15.0","kind":"python:3","requireMain":false}],"dotnet":[{"attached":true,"default":true,"deprecated":false,"image":"openwhisk/action-dotnet-v2.2:1.15.0","kind":"dotnet:2.2","requireMain":true},{"attached":true,"default":false,"deprecated":false,"image":"openwhisk/action-dotnet-v3.1:1.15.0","kind":"dotnet:3.1","requireMain":true}],"ruby":[{"attached":true,"default":true,"deprecated":false,"image":"openwhisk/action-ruby-v2.5:1.15.0","kind":"ruby:2.5","requireMain":false}],"swift":[{"attached":true,"default":true,"deprecated":false,"image":"openwhisk/action-swift-v4.2:1.15.0","kind":"swift:4.2","requireMain":false},{"attached":true,"default":false,"deprecated":false,"image":"openwhisk/action-swift-v5.1:1.15.0","kind":"swift:5.1","requireMain":false}]},"support":{"github":"<https://github.com/apache/openwhisk/issues|https://github.com/apache/openwhisk/issues>","slack":"<http://slack.openwhisk.org|http://slack.openwhisk.org>"}```
```HEAD is now at f54e081 release prep: change version in package.json to 2.2.0 (#221)
+ : /openwhisk
+ WSK_CLI=/openwhisk/bin/wsk
+ '[' 6 -ne 6 ']'
+ AUTH=789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP
+ EDGEHOST=<http://owdev-nginx.openwhisk.svc.cluster.local:80|http://owdev-nginx.openwhisk.svc.cluster.local:80>
+ APIHOST=<http://owdev-nginx.openwhisk.svc.cluster.local:80|http://owdev-nginx.openwhisk.svc.cluster.local:80>
+ WORKERS=worker0
+ DB_URL=<http://whisk_admin:some_passw0rd@owdev-couchdb.openwhisk.svc.cluster.local:5984|http://whisk_admin:some_passw0rd@owdev-couchdb.openwhisk.svc.cluster.local:5984>
+ DB_NAME=almalarmservice
+ DB_USERNAME=
+ DB_PASSWORD=
+ LIMIT_CRON_FIELDS=
+ ACTION_RUNTIME_VERSION=nodejs:10
+ '[' -f 789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP ']'
+ : <http://owdev-nginx.openwhisk.svc.cluster.local:80|http://owdev-nginx.openwhisk.svc.cluster.local:80>
+ : <http://whisk_admin:some_passw0rd@owdev-couchdb.openwhisk.svc.cluster.local:5984|http://whisk_admin:some_passw0rd@owdev-couchdb.openwhisk.svc.cluster.local:5984>
+ : almalarmservice
+ : <http://owdev-nginx.openwhisk.svc.cluster.local:80|http://owdev-nginx.openwhisk.svc.cluster.local:80>
+++ dirname ./installCatalog.sh
++ cd .
++ pwd
+ PACKAGE_HOME=/openwhisk-package-alarms
+ export WSK_CONFIG_FILE=
+ WSK_CONFIG_FILE=
+ echo Installing Alarms package.
Installing Alarms package.
+ /openwhisk/bin/wsk -i --apihost <http://owdev-nginx.openwhisk.svc.cluster.local:80|http://owdev-nginx.openwhisk.svc.cluster.local:80> package update --auth 789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP --shared yes alarms -a description 'Alarms and periodic utility' -a parameters '[ {"name":"trigger_payload", "required":false} ]' -p apihost <http://owdev-nginx.openwhisk.svc.cluster.local:80|http://owdev-nginx.openwhisk.svc.cluster.local:80> -p trigger_payload ''
ok: updated package alarms
+ cd action
+ '[' -e alarmFeed.zip ']'
+ cp -f alarmFeed_package.json package.json
+ npm install
npm WARN deprecated request@2.88.2: request has been deprecated, see <https://github.com/request/request/issues/3142|https://github.com/request/request/issues/3142>
npm WARN deprecated cloudant-follow@0.18.2: This package is no longer maintained.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See <https://v8.dev/blog/math-random|https://v8.dev/blog/math-random> for details.
alarmFeed@1.0.0 /openwhisk-package-alarms/action
├── @types/caseless@0.12.2  extraneous
├── @types/tough-cookie@4.0.2  extraneous
├── cloudant-follow@0.18.2  extraneous
├── errs@0.3.2  extraneous
├── form-data@2.5.1  extraneous
└─┬ needle@2.3.2 
  ├─┬ debug@3.2.7 
  │ └── ms@2.1.2 
  ├─┬ iconv-lite@0.4.24 
  │ └── safer-buffer@2.1.2 
  └── sax@1.2.4 

npm WARN alarmFeed@1.0.0 No description
npm WARN alarmFeed@1.0.0 No repository field.
npm WARN alarmFeed@1.0.0 No license field.
npm ERR! Linux 5.4.196-108.356.amzn2.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! path /openwhisk-package-alarms/action/node_modules/.staging/@types/node-7154234c/package.json
npm ERR! code ENOTDIR
npm ERR! errno -20
npm ERR! syscall open

npm ERR! ENOTDIR: not a directory, open '/openwhisk-package-alarms/action/node_modules/.staging/@types/node-7154234c/package.json'
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     &lt;<https://github.com/npm/npm/issues|https://github.com/npm/npm/issues>&gt;

npm ERR! Please include the following file with any support request:
npm ERR!     /openwhisk-package-alarms/action/npm-debug.log```
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1657208148873549?thread_ts=1657208148.873549&cid=C3TPCAQG1
----
2022-07-07 22:51:03 UTC - Matt Welke: Was playing around with the Python runtime lately. I followed the IBM Cloud docs tutorial where you add the `pyjokes` dependency and package it into a ZIP file including the virtual env. I first tried it with the venv program instead of the virtualenv program, because I'm pretty new to Python and I was under the impression that venv being newer, it should be preferred over virtualenv. It didn't work, said it was missing an "activate_this" file. I was able to get it to work by switching to virtualenv.

But I notice today that when I use virtualenv, my finished ZIP file is a bit smaller. I'm guessing that's the reason the project only supports virtualenv? Because the ZIP file must be less than 50 MB so every bit of space counts?
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1657234263078369
----
2022-07-07 22:52:01 UTC - Matt Welke: Another thing I noticed is that despite only having one dependency called `pyjokes`, my virtual environment seems pretty large. I wasn't expecting it to be 26 MB. My project is just this.
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1657234321988159
----
2022-07-07 22:52:15 UTC - Matt Welke: (Small main.py file, small helper, and one dependency - `pyjokes`)
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1657234335416009
----
2022-07-07 22:53:50 UTC - Matt Welke: I can see that `pyjokes` itself is less than 1 MB. And there appears to be a bunch of extra stuff in the virtual environment that to me, look like dev tools, not things you'd need to run your application in production. Things like "pip" and "setuptools". Is it really necessary to include those in the virtual environment as we deploy our application to production?
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1657234430824669
----
2022-07-07 22:55:51 UTC - Matt Welke: I didn't create a Stack Overflow for this because it's a bunch of questions. In summary, for anyone who would be willing to help me out, my questions are:
• What is the reason the project supports virtualenv and not venv? Is it because virtual environments created by virtualenv are a bit smaller?
• Is it necessary to include packages other than the ones listed in `requirements.txt` (and their transitive dependencies) when deploying a Python application to production?
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1657234551851249
----