apache / openwhisk-deploy-kube

The Apache OpenWhisk Kubernetes Deployment repository supports deploying the Apache OpenWhisk system on Kubernetes and OpenShift clusters.
https://openwhisk.apache.org/
Apache License 2.0
301 stars 231 forks source link

Install-package failed when deploying from helm repo #735

Closed lyudmilalala closed 2 years ago

lyudmilalala commented 2 years ago

I am trying to deploy Openwhisk on Windows Docker Desktop k8s

If I following the Deploying Released Charts from Helm Repository Section in README, the install-package pod will finally get status Error.

Final status of pods looks like this

NAMESPACE     NAME                                     READY   STATUS      RESTARTS          AGE
openwhisk     owdev-alarmprovider-687f79859b-rnhxk     1/1     Running     0                 5h46m
openwhisk     owdev-apigateway-56b8cc9dbf-kxbdz        1/1     Running     0                 5h46m
openwhisk     owdev-controller-0                       1/1     Running     0                 5h46m
openwhisk     owdev-couchdb-59f57cbff7-rxhkt           1/1     Running     0                 5h46m
openwhisk     owdev-gen-certs--1-6gtl7                 0/1     Completed   0                 5h46m
openwhisk     owdev-init-couchdb--1-gh9jl              0/1     Completed   0                 5h46m
openwhisk     owdev-install-packages--1-4wjvq          0/1     Error       0                 5h46m
openwhisk     owdev-install-packages--1-nh2hw          0/1     Error       0                 5h12m
openwhisk     owdev-install-packages--1-npqgd          0/1     Error       0                 5h16m
openwhisk     owdev-install-packages--1-pxn47          0/1     Error       0                 5h23m
openwhisk     owdev-invoker-0                          1/1     Running     0                 5h46m
openwhisk     owdev-kafka-0                            1/1     Running     0                 5h46m
openwhisk     owdev-kafkaprovider-5574d4bf5f-spfkd     1/1     Running     0                 5h46m
openwhisk     owdev-nginx-74fdfbf868-czfhk             1/1     Running     0                 5h46m
openwhisk     owdev-redis-68bfb4ccb8-n5ppj             1/1     Running     0                 5h46m
openwhisk     owdev-wskadmin                           1/1     Running     0                 5h46m
openwhisk     owdev-zookeeper-0                        1/1     Running     0                 5h46m
openwhisk     wskowdev-invoker-00-1-prewarm-nodejs10   1/1     Running     0                 5h44m
openwhisk     wskowdev-invoker-00-2-prewarm-nodejs10   1/1     Running     0                 5h44m

Part of the install-package log shows as below, and the full log is here.

+ npm install
npm WARN deprecated cloudant-follow@0.18.2: This package is no longer maintained.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
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 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.72-microsoft-standard-WSL2
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!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /openwhisk-package-alarms/action/npm-debug.log

Steps to reproduce the problem

Environment Windows 10 64bit docker desktop version 4.3.0 docker version 20.10 k8s version 1.22.4 helm version 3.4.2

mycluster.yaml

whisk:
  ingress:
    type: NodePort
    apiHostName: 192.168.65.4  # docker desktop node InternalIP
    apiHostPort: 31001
    useInternally: false

nginx:
  httpsNodePort: 31001

# try to 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"

Follow the instructions in README, run

helm repo add openwhisk https://openwhisk.apache.org/charts
helm repo update
helm install owdev openwhisk/openwhisk -n openwhisk --create-namespace -f mycluster.yaml

My guess

I think it is because npm v3.5.2 has been outdated for a long time.

I also notice that some docker images used by Deploying Released Charts from Helm Repository is much older than those used by Deploying from Git, for example the openwhisk/ow-utils image. I don't know if it is related to that this problem only occurs when I deploy by charts from the helm repository. (I cannot find npm version in logs when deploying from git. I am not really sure which docker container correspond to the install-package pod, so I also cannot enter it and see its npm version.)

Helm repo of Openwhisk is here. On the right hand side you can see Containers images.

I also want to know what potential differences will these different versions of images bring to my cluster.

Also, by the way, the service only generate at most four install-package pods. To make debug easier, I want to know if there is a way to let the deploy generate a new install-package pod automatically after the old ones are deleted.

style95 commented 2 years ago

This seems the same issue with https://github.com/apache/openwhisk/issues/5260 and it is supposed to be handled by https://github.com/apache/openwhisk-deploy-kube/pull/730

@hugy718 Is your issue resolved with the change?

linuswagner commented 2 years ago

The reason here is that @lyudmilalala is using the OpenWhisk Helm repo which points to the release version 1.0.0 from 2021.
This version does not include the fix and I can confirm that deploying version 1.0.0 through the Helm repo yields the problem that @lyudmilalala is describing.

When using the latest commit (3c8a72e73f724ae941bc33a8ad72797b21725088), this problem does not exist anymore.

Maybe it is a wise decision to publish another version in the Helm repo that works.

hugy718 commented 2 years ago

This seems the same issue with apache/openwhisk#5260 and it is supposed to be handled by #730

@hugy718 Is your issue resolved with the change?

Yes, the same issue. Should be fixed by the latest commit. @lyudmilalala May you try to deploy the latest commit. The steps are the same, and additional configurations needed.

lyudmilalala commented 2 years ago

Close this as many people have confirmed that it is caused by the image version.

Need to publish a new version to the helm repo. I am not sure if we have permission to do this.

If the update of helm repo cannot be done for a while, I would be glad to submit a push request to add warning in the deployment guidance to warn people about this thing.

style95 commented 2 years ago

@lyudmilalala The change is already included in the master. Please try again with the latest master.

agcom commented 9 months ago

Possibly related to https://github.com/npm/cli/issues/5032.

vishaliamops commented 7 months ago

The reason here is that @lyudmilalala is using the OpenWhisk Helm repo which points to the release version 1.0.0 from 2021. This version does not include the fix and I can confirm that deploying version 1.0.0 through the Helm repo yields the problem that @lyudmilalala is describing.

When using the latest commit (3c8a72e), this problem does not exist anymore.

Maybe it is a wise decision to publish another version in the Helm repo that works.

Hii @linuswagner I was able to get same error as mentioned earlier. I was unable to resolve the error. Can you specify the commands or changes we need to perform.